| 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.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Helps track down missing network operation timeouts.
|
|
|
|
|
|
|
| |
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 is needed by the refactored bbackupd tests.
|
|
|
|
|
|
|
|
| |
StreamDataLeft() incorrectly returned false when there was still data
buffered, which made IOStream::CopyStreamTo stop copying early, resulting
in incomplete files when copying data out of a BufferedStream. This meant
that tests involving a local protocol, where a BufferedStream was copied
directly to a RaidFile, resulted in corrupted files that would not verify.
|
|
|
|
|
|
|
|
|
|
|
| |
Store the current working directory at the beginning of the first test, and
restore it at the beginning of every subsequent test.
Improve cleanup after tests: delete and recreate the bbackupd state directory.
Remove check for reference counts and account errors from tearDown, because
they are too hard to retrofit to testbbackupd, and already copied into
testbackupstore tearDown.
|
|
|
|
| |
May help to debug issues with directory cache invalidation in future.
|
|
|
|
| |
Accidentally removed by the previous change to enhance sorting of list output.
|
| |
|
|
|
|
|
|
|
|
|
| |
We simulate a 1 second accuracy clock in DEBUG mode on all systems, to help
catch corner cases in tests. This now applies to both RAID and non-RAID files.
We always add file size to the version number to help detect changes,
especially in such cases. In RELEASE builds, we use as much accuracy from the
clock as we can get, as well as file size.
|
|
|
|
|
| |
Some tests need to do this. I don't think it happens in normal use,
because the daemon's response to HUP takes a different path, I think.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Avoid duplicate reporting, and include a message in the exceptions thrown.
Merged back changes from the test refactor branch to reduce diffs.
|
|
|
|
| |
Merged back changes from the test refactor branch to reduce diffs.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The std::auto_ptr is now returned unclosed. If the caller of RunSyncNow()
does nothing with the return value, then it will be released, closing the
connection. However the caller can save the std::auto_ptr locally and
poke around in it if necessary. This interface is designed for tests only!
Merged back changes from the test refactor branch to reduce diffs.
Fix failure to record client store marker, after BackupClientContext refactor.
This caused the daemon not to abort safely if the CSM changed under our feet,
meaning that our cached data is invalid.
Fix for earlier patch to allow tests to access the BackupClientContext after
backup completes, because a new CSM wasn't generated in time for bbackupd to
record it, because the connection wasn't closed yet.
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
Allows it not to throw an exception if timers weren't initialised when
cleanup was requested. Normally we want an exception thrown, but not while
we're cleaning up a test that might have failed with timers uninitialised.
More timers fixes after cleanup no-exception option.
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.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The new default is to sort by name, with directories first.
Put the documentation on the "ls" command, instead of the "list" command,
since that's annoyed me too many times.
The recursive list option is changed from "-r" to "-R", to match the shell
ls command.
|
| |
|
| |
|
| |
|