summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* Merge branch 'master' of /home/chris/projects/2004/boxi/bb-gitChris Wilson2014-10-31
|
* Repair the refcount database while checking accounts for errors.Chris Wilson2014-10-31
| | | | | | | 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.
* Refactor handling of exceptions in protocol server command executors.Chris Wilson2014-10-31
| | | | | | | | | | 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.
* Delay daemon startup while it's not being used, for clarity.Chris Wilson2014-10-31
|
* Add a test that temporary and permanent refcount dbs are independentChris Wilson2014-10-31
| | | | | | Conflicts: test/backupstore/testbackupstore.cpp
* Whitespace, comment and readability fixesChris Wilson2014-10-31
|
* Refactor StartClient and StopClient out of testbbackupd.Chris Wilson2014-10-31
| | | | Use them in testbackupstorefix to reduce code duplication.
* Minor test fixes to testbbackupd.Chris Wilson2014-09-18
| | | | | Fix a couple of compiler warnings, and don't continue the test if we failed to load the configuration file.
* Fix inability to access locations starting with a slash.Chris Wilson2014-09-18
| | | | | | 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.
* Whitespace fixesChris Wilson2014-09-18
|
* Add test for disappearing directory causing attempt to upload an empty stream.Chris Wilson2014-09-18
| | | | | | | 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.
* optlen could become bigger than sizeof(info) in future and that's OKChris Wilson2014-09-18
|
* Move MockClientContext and MockBackupDaemon up in testbbackupd fileChris Wilson2014-09-18
|
* Add a function to compare a backup using a local protocolChris Wilson2014-09-18
|
* Add check for trying to ReceiveStream when no stream availableChris Wilson2014-09-18
|
* Update comment to match current method nameChris Wilson2014-09-18
|
* Fix formatting of subsecond timestamps in log messagesChris Wilson2014-09-18
|
* Add check for tracking the same memory block twiceChris Wilson2014-09-18
|
* Whitespace fixesChris Wilson2014-09-18
|
* Improve exception message if a Daemon is used without being configured firstChris Wilson2014-09-18
|
* Increase built-in backtrace length from 10 to 20.Chris Wilson2014-09-04
| | | | Helps track down missing network operation timeouts.
* Major refactor of testbbackupd.Chris Wilson2014-09-04
| | | | | | | 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.
* Add missing timeouts in StreamableMemBlock::Set and testbbackupd.Chris Wilson2014-09-04
| | | | | Reduces warnings about network operations with no timeout. May prevent some hangs that might have occurred waiting forever for network data in the past.
* Add a std::string GetLine() to IOStreamGetLine.Chris Wilson2014-09-04
| | | | This is needed by the refactored bbackupd tests.
* Fix error in BufferedStream::StreamDataLeft.Chris Wilson2014-09-04
| | | | | | | | 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.
* Fix tests broken by changing working directory.Chris Wilson2014-09-04
| | | | | | | | | | | 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.
* Improve directory cache messages in BackupStoreContext.Chris Wilson2014-09-04
| | | | May help to debug issues with directory cache invalidation in future.
* Reinstate the -o and -d options to bbackupquery list.Chris Wilson2014-09-04
| | | | Accidentally removed by the previous change to enhance sorting of list output.
* Add the new object ID to NotifyFileUploaded messages.Chris Wilson2014-09-04
|
* Handle raidfile versioning better on low time accuracy systems.Chris Wilson2014-09-04
| | | | | | | | | 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.
* Allow changing exclude lists when reconfiguring BackupDaemon.Chris Wilson2014-09-04
| | | | | 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.
* Catch exceptions while executing store commands, and return an error message.Chris Wilson2014-09-04
| | | | | | | | | 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.
* Split test_multiple_uploads in two.Chris Wilson2014-09-04
| | | | Merged back changes from the test refactor branch to reduce diffs.
* Add EstimatedBytesToUpload to NotifyFileUploadingPatch.Chris Wilson2014-09-04
| | | | Merged back changes from the test refactor branch to reduce diffs.
* Refactor Timer reschedule to avoid second scan over timer list.Chris Wilson2014-09-04
| | | | Merged back changes from the test refactor branch to reduce diffs.
* Refactor FileStream exception throwing.Chris Wilson2014-09-04
| | | | | | Avoid duplicate reporting, and include a message in the exceptions thrown. Merged back changes from the test refactor branch to reduce diffs.
* Add support for all logging options in test executables.Chris Wilson2014-09-04
| | | | Merged back changes from the test refactor branch to reduce diffs.
* Allow access to BackupDaemon's BackupClientContext for tests.Chris Wilson2014-09-04
| | | | | | | | | | | | | | | | | | 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.
* More use of functions to simplify testbbackupd.Chris Wilson2014-09-04
| | | | Merged back changes from the test refactor branch to reduce diffs.
* Changed many uses of BackupProtocolClient to BackupProtocolCallable.Chris Wilson2014-09-04
| | | | | | Makes way for more use of local protocol objects and protocol subclasses. Merged back changes from the test refactor branch to reduce diffs.
* Define setup and teardown functions and macros, and use them.Chris Wilson2014-09-04
| | | | Merged back changes from the test refactor branch to reduce diffs.
* Backport Timers::Cleanup that's safe to use in test cleanup.Chris Wilson2014-09-04
| | | | | | | | | | 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.
* Simplify code with macros, update comments and fix whitespace.Chris Wilson2014-09-04
| | | | | | Hopefully all of these changes are inconsequential. Merged back changes from the test refactor branch to reduce diffs.
* Define some functions to reduce duplication in testbbackupd.Chris Wilson2014-09-04
| | | | | | | | | 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.
* Fix timing issue with bbackupd test for recovery after error.Chris Wilson2014-08-24
| | | | | | | 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.
* Fix tests broken by bbackupquery list recursive option change.Chris Wilson2014-08-17
|
* Add option to sort results of bbackupquery ls command.Chris Wilson2014-08-15
| | | | | | | | | | 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.
* Improve commentChris Wilson2014-08-15
|
* Fix poll timeout calculation for infinite timeouts.Chris Wilson2014-08-15
|
* Add missing network operation timeouts to test/basicserver.Chris Wilson2014-08-15
|