| Commit message (Collapse) | Author | Age |
| |
|
| |
|
| |
|
|
|
|
|
| |
Fixes compilation on Windows.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
The new StartDaemon() and StopDaemon() in ServerControl.cpp/h are generic,
and used by StartClient() and StartServer() in StoreTestUtils.cpp/h.
|
|
|
|
|
| |
They can now be created using a constructor, and written to any IOStream.
Needed for writing them to an S3Store.
|
| |
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Move common code into a base class, leaving bbstored-specific code.
Add skeleton of an S3 store type.
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
Deleting the account deletes the lockfile, so unlocking fails.
|
|
|
|
|
| |
Allows the exception message to be captured before it goes out of scope.
|
|
|
|
| |
Files need to be closed before renaming over them on Windows.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
The call to decrement the refcount was in an ASSERT macro, so compiled out in
release mode.
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
| |
And compile errors on recent MinGW.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
Use them in testbackupstorefix to reduce code duplication.
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
Mute the mismatch message, as there are just too many of them.
|
|
|
|
|
|
|
|
| |
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.
|