| Commit message (Collapse) | Author | Age |
| |
|
|
|
|
|
|
|
| |
Normally this will be done by housekeeping anyway, so it's not that useful,
but it's good to check for it in tests, especially when testing
BackupStoreCheck's ability to repair bad things that happened to the store
when they involve references.
|
|
|
|
|
|
|
|
|
|
| |
Add a standard method to Replyable that will be called if a recoverable
exception (a BoxException) occurs, and can return a protocol Message to be
sent to the client, such as an error code for various standard errors, or
rethrow the exception.
If you want something different, catch exceptions and return the desired
reply yourself, or you'll get the default handling.
|
| |
|
|
|
|
|
|
| |
Conflicts:
test/backupstore/testbackupstore.cpp
|
| |
|
|
|
|
| |
Use them in testbackupstorefix to reduce code duplication.
|
|
|
|
|
| |
Fix a couple of compiler warnings, and don't continue the test if we failed
to load the configuration file.
|
|
|
|
|
|
| |
Thanks to Jean-Yves Moulin for reporting this issue. When bbackupd is configured
to create locations whose names contain a slash, it was impossible to escape it,
and thus to enter the directory in bbackupquery to inspect or restore it.
|
| |
|
|
|
|
|
|
|
| |
This caused the issue reported by Brendon Baumgartner and described in my
email to the Box Backup list on Mon, 21 Apr 2014 at 18:44:38. If the directory
disappears then we used to try to send an empty attributes block to the server,
which is illegal.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
Split single monolithic test into many smaller ones, which can be run
separately. Allows easier testing of new features in isolation.
Merged back changes from the test refactor branch to reduce diffs.
|
|
|
|
|
| |
Reduces warnings about network operations with no timeout. May prevent some
hangs that might have occurred waiting forever for network data in the past.
|
|
|
|
|
|
|
|
|
| |
This will allow the client to eventually have more information about what went
wrong on the server, if the server admin agrees, and makes test debugging easier.
Backport some additional testbackupstore tests from the test refactor branch.
Merged back changes from the test refactor branch to reduce diffs.
|
|
|
|
| |
Merged back changes from the test refactor branch to reduce diffs.
|
|
|
|
| |
Merged back changes from the test refactor branch to reduce diffs.
|
|
|
|
|
|
| |
Makes way for more use of local protocol objects and protocol subclasses.
Merged back changes from the test refactor branch to reduce diffs.
|
|
|
|
| |
Merged back changes from the test refactor branch to reduce diffs.
|
|
|
|
|
|
| |
Hopefully all of these changes are inconsequential.
Merged back changes from the test refactor branch to reduce diffs.
|
|
|
|
|
|
|
|
|
| |
Merged back changes from the test refactor branch to reduce diffs.
Fix wrong setting of log level in compare() function.
We want to only show errors if we expect mismatches, and show warnings if we
didn't expect mismatches. I had it the other way around before.
|
|
|
|
|
|
|
| |
For some reason the timing changed and the test was no longer waiting for the
same length of time as bbackupd, causing it to fail.
Merged back changes from the test refactor branch to reduce diffs.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Similar to TEST_COMMAND_RETURNS_ERROR_OR, but allows any command or sequence
to cause the error, without direct access to the command message.
Refactor so that TEST_COMMAND_RETURNS_ERROR_OR calls TEST_PROTOCOL_ERROR_OR
to make the assertion on the last error seen by the protocol.
|
|
|
|
| |
We don't really need these, so clean up by removing them.
|
|
|
|
|
|
|
|
| |
Conflicts:
bin/bbackupd/BackupDaemon.cpp
bin/bbackupd/BackupDaemon.h
test/bbackupd/testbbackupd.cpp
|
| |
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
| |
It's much easier to debug these tests if we can step into them.
|
|
|
|
|
|
| |
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.
|