| Commit message (Collapse) | Author | Age |
| |
|
| |
|
|
|
|
| |
wrong
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
See discussion of incompatible struct packing on ARM processors:
http://lists.boxbackup.org/pipermail/boxbackup/2010-November/005818.html
http://lists.boxbackup.org/pipermail/boxbackup/2011-February/005978.html
Thanks to Leif Linderstam for identifying the problem and proposing a
solution. This is just a test for the problem, not a fix in itself.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a new exception code to represent an object being completely missing (not
found on the store at all), separate from not being found in a particular
directory.
Improve mapping of server-side exceptions to protocol error messages returned
to the client.
Add handling for missing exceptions, such as
BackupStoreException::PatchChainInfoBadInDirectory, and the new
BackupStoreException::ObjectDoesNotExist.
Fix mapping for BackupStoreException::CouldNotFindEntryInDirectory to make it
distinguistable from BackupStoreException::ObjectDoesNotExist.
|
| |
|
|
|
|
|
| |
Also checks the returned error code, and gives more useful diagnostics on
failure.
|
|
|
|
|
|
|
| |
Refactor all common code from testbbackupd and testbackupstore to allow other
test suites to contain multiple tests and execute selected tests more easily.
Report all test results within a suite in a standard, easy to read summary.
|
|
|
|
|
|
| |
Once again, the Windows issue of being unable to delete or overwrite an
open file causes issues. In this case it's only test failures. We need to
be diligent about closing open file handles and protocol sessions in tests.
|
|
|
|
|
| |
I needed reliable exit codes to run the tests in a loop to catch an
intermittent failure.
|
| |
|
|
|
|
| |
Files need to be closed before renaming over them on Windows.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Conflicts:
test/backupstore/testbackupstore.cpp
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
| |
We don't really need these, so clean up by removing them.
|
| |
|
|
|
|
| |
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.
|