| Commit message (Collapse) | Author | Age |
| |
|
|
|
|
| |
This is hopefully the cause of the segfaults reported by Brendon Baumgartner.
|
|
|
|
|
| |
It's incompatible with having a logger that logs everything, regardless of
the global log level.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When entries are added to a directory by a command (BackupStoreContext),
and when entries are removed from a directory (by housekeeping), update the
parent directory's entry for us if our size has changed.
Make BackupStoreCheck check for, report and fix errors when directory entries
are directories and the size is wrong (as well as files).
Conflicts:
test/backupstore/testbackupstore.cpp
Fix directories loaded without size being set, leading to warnings later.
We can't check that the old size in the parent entry matched the old real size
of the directory, unless we set the old real size in the directory.
And we don't need to pass the old directory size to
HousekeepStoreAccount::DeleteFile, because we can get it from the directory
itself.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Otherwise the protocol might be broken and can't be used any more, even if
we made an effort to return an Error reply instead of throwing an exception.
This used to not be a problem because an Error reply would terminate the
connection anyway, but it no longer does. So if the client also didn't
terminate, but tried to handle the exception and keep using the connection,
then it might find that its next command fails because the protocol is broken.
|
|
|
|
| |
Just like adding a file does.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We pass a std::auto_ptr<SocketStream> to every Protocol subclass when we
construct it, and it takes control of this object. This reduces the risk of:
* accidentally reusing the same SocketStream for multiple Protocols
(it happened to me in testbackupstore);
* holding onto a reference to the SocketStream;
* allowing a locally-scoped SocketStream to go out of scope and be released
while still being referenced by a live Protocol.
|
|
|
|
|
|
| |
Fix the new tests so that they mostly pass. To squash.
Remove the test for nonexistent GetObject, not implemented yet. To squash.
|
|
|
|
|
| |
If it fails to clear the reference counts properly, it will leave objects
still existing, and checking the account will reattach them.
|
| |
|
|
|
|
|
|
| |
Use SETUP macro and tearDown function in tests.
Make tests return bool instead of int, and check it.
|
|
|
|
| |
This reverts commit 59c3fdf8be1def3f237a4b51eb27773b4f42bbcd.
|
|
|
|
|
|
| |
Being able to see the actual and expected values helps with debugging.
More cleanup of comments.
|
| |
|
| |
|
|
|
|
| |
Move ExpectedRefCounts definition to where it's needed.
|
|
|
|
| |
Saves ~2 lines each time it's used. And we use it a lot in testbackupstore.
|
| |
|
|
|
|
| |
Backported from new testbackupstore, to reduce diff.
|
|
|
|
|
|
| |
Will help to ensure that individual test cases run properly, even if a
previous test didn't clear up after itself. Splitting up testbackupstore
into idempotent testcases is coming soon.
|
|
|
|
|
| |
Backport a few new functions to simplify tests.
|
| |
|
|
|
|
|
| |
Will hopefully prevent future confusion about the meaning of this info
variable.
|
| |
|
| |
|
|
|
|
|
| |
You can only pass a std::auto_ptr<IOStream> to SendStream now. Nothing
else will do for Clang. But you can cast a std::auto_ptr<subclass>.
|
|
|
|
|
| |
that's been disposed (Windows only).
|
| |
|
| |
|
|
|
|
|
| |
flag and ExtraData.
|
|
|
|
|
|
|
|
|
| |
loaded and saved properly, and the "bbstoreaccounts enabled" command
works.
Test that the conversion of historic BackupStoreInfo v1 format files
works properly.
|
|
|
|
|
| |
Rename ProtocolObject to Message.
|
| |
|
|
|
|
|
| |
operations.
|
|
|
|
|
| |
missing.
|
|
|
|
|
| |
housekeeping directly.
|
| |
|
|
|
|
|
|
|
|
| |
it can't accidentally be used as one.
Fix use of encrypted filename in deleted file message, thanks to Kenny
Millington for reporting.
|
| |
|
|
|
|
|
| |
daemon can't clean up after itself.
|
|
|
|
|
|
| |
subsequent changes in the other connection get a new whole-second timestamp
and hopefully fix test failures reported by Alex Harper on MacOS X.
|
|
|
|
|
|
| |
the directory cache in the store on filesystem with low timestamp
resolution (e.g. OSX).
|
|
|
|
|
|
|
|
|
| |
Fix memory leak.
Reformat comments.
(refs #3)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
All of these use lib/server/WinNamedPipeStream on Win32, so they don't
belong in lib/common.
Made LaunchServer() work on Win32.
Added constants for paths to executables, for use in tests, removing the
need for #ifdefs and clumsy DIRECTORY_SEPARATORs in paths.
Added terminate_bbackupd() and wait_for_operation() functions.
Update unit tests to #include "ServerControl.h" if they need it.
(refs #3)
|
| |
|
|
|
|
|
| |
infrastructure/buildenv-testmain-template.cpp) (refs #3)
|