summaryrefslogtreecommitdiff
path: root/lib/backupstore
Commit message (Collapse)AuthorAge
* Fix check for existing BackupStoreInfo file on S3 storesChris Wilson2015-08-29
|
* Whitespace, import order and comment fixesChris Wilson2015-08-29
|
* Allow verifying a BackupStoreFile without closing underlying streamChris Wilson2015-08-29
|
* Add missing header include.Chris Wilson2015-08-23
| | | | | Fixes compilation on Windows.
* Whitespace, layout and comment cleanups.Chris Wilson2015-08-15
|
* Improve exception handling on backup store side.Chris Wilson2015-08-15
| | | | | | | | | | | | | | | | 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.
* Add a BackupStoreFile encoding streaming verifierChris Wilson2015-08-07
|
* Whitespace cleanupChris Wilson2015-08-07
|
* Improve error message when TEST_PROTOCOL_ERROR_OR() fails.Chris Wilson2015-08-06
| | | | | | The protocol command didn't succeed, it just returned a result with an unexpected type, so make the failure message reflect that and give details of the response actually received, to help with debugging.
* Fix StartClient() to store new pid correctlyChris Wilson2015-08-06
|
* Compile fixChris Wilson2015-07-31
|
* Add S3Store account creation.Chris Wilson2015-07-31
|
* Refactor to allow sharing code for starting and stopping daemons in tests.Chris Wilson2015-07-31
| | | | | The new StartDaemon() and StopDaemon() in ServerControl.cpp/h are generic, and used by StartClient() and StartServer() in StoreTestUtils.cpp/h.
* Refactor BackupStoreInfo to allow creating them without RaidFiles.Chris Wilson2015-07-31
| | | | | They can now be created using a constructor, and written to any IOStream. Needed for writing them to an S3Store.
* Remove duplicate declaration of test functions.Chris Wilson2015-07-25
|
* Refactor BackupStoreInfo to allow loading from any IOStream.Chris Wilson2015-07-19
|
* Major test refactor to support test suites.Chris Wilson2015-07-01
| | | | | | | 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.
* Refactor store account control to allow other store types.Chris Wilson2015-06-28
| | | | | Move common code into a base class, leaving bbstored-specific code. Add skeleton of an S3 store type.
* Initialise ModificationTime when uploading complete file.Chris Wilson2015-06-10
|
* Fix test failures on Windows caused by keeping files open too long.Chris Wilson2015-05-16
| | | | | | 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.
* Fix missing account lock while checking for errors.Chris Wilson2015-05-06
| | | | | | | | | | | The old assertion, that the write lock file exists before starting checking, was erroneously passing before when no lock was held, because the lockfile was never deleted. Now that we delete it when unlocking the account, this started causing test failures. Changed the way that accounts are checked for errors to use a function that acquires a write lock first, and modified test to disconnect open clients before starting checking the account, to fix it.
* Fix minor test problem caused by not deleting a file between tests.Chris Wilson2015-05-04
|
* Fix tests failing because they can't delete the lock file.Chris Wilson2015-05-04
| | | | Deleting the account deletes the lockfile, so unlocking fails.
* Add ability to run commands in context with TEST_CHECK_THROWS_AND_OR.Chris Wilson2015-04-15
| | | | | Allows the exception message to be captured before it goes out of scope.
* Fix test failures caused by failure to commit the temporary refcount DB.Chris Wilson2015-04-06
| | | | Files need to be closed before renaming over them on Windows.
* Improve error logging in win32 emu library.Chris Wilson2015-04-06
| | | | | | Consistently capture the last Windows error code in the global variable winerrno. Add logging macros that report the Windows error message for this error code.
* Fix crash when compiled in release mode caused by refcount not decrementing.Chris Wilson2015-02-26
| | | | | | The call to decrement the refcount was in an ASSERT macro, so compiled out in release mode.
* Fix test failures caused by using plain stat() instead of emu_stat().Chris Wilson2014-12-26
| | | | | | | On Windows, plain stat() no longer handles slashes in filenames correctly (since upgrading MinGW? Or switching to 64-bit Windows?). We need to use POSIX fstat() for now in RaidFile, but we can still use the emu_stat, and in fact we should, to fix path translation.
* Fix test failures caused by store path ending with slash on Windows.Chris Wilson2014-12-26
|
* Fix MinGW64 compile error due to pointers being too large for uint32_t.Chris Wilson2014-12-26
|
* Replace sprintf() with snprintf(), fixes compile warnings on OpenBSD.Chris Wilson2014-12-22
| | | | | And compile errors on recent MinGW.
* Fix detection of filesystems without extended attribute support on NetBSD.Chris Wilson2014-12-06
| | | | | | | | | | | NetBSD (version 6) uses ENOTSUP as the errno code to indicate missing support for extended attribute in the filesystem. This appears to be at odds with other Unixes: https://mail-index.netbsd.org/tech-kern/2011/12/13/msg012185.html We need to detect and handle ENOTSUP to stop the backup daemon from killing itself while trying to read extended attributes from the first file in the backup set.
* Fix test failures caused by reference count database changes.Chris Wilson2014-11-16
|
* Add cache invalidation checks to BackupStoreDirectory.Chris Wilson2014-11-16
| | | | | | | | | | Allows us to catch programming errors related to use of a cached reference to a directory after the cache may have been invalidated by requesting another directory from the cache, which could clear it. In DEBUG builds, the cache is no longer cleared, but any entries in it are invalidated, which is effectively a memory leak, but these builds should only be used for running tests, where it doesn't matter.
* 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.
* 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.
* Whitespace fixesChris Wilson2014-09-18
|
* 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.
* 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.
* Add EstimatedBytesToUpload to NotifyFileUploadingPatch.Chris Wilson2014-09-04
| | | | 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.
* 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.
* Trivial white space fixes.Chris Wilson2014-08-15
|
* Improve readability of block checksum match message.Chris Wilson2014-08-15
| | | | Mute the mismatch message, as there are just too many of them.
* Fix deadlock waiting for read or write on closed connection.Chris Wilson2014-08-15
| | | | | | | | If the system is suspended then it may not realise that a TCP connection has been closed, while waiting for data to arrive on it. We didn't used to apply a timeout to this read operation. Now we use the connection's default timeout on all read and write operations. Network operations that don't pass a timeout will be logged with a backtrace, so that they can be fixed.