| Commit message (Collapse) | Author | Age |
| |
|
|
|
|
| |
Use them in testbackupstorefix to reduce code duplication.
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Avoid duplicate reporting, and include a message in the exceptions thrown.
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.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
| |
Similar to TEST_COMMAND_RETURNS_ERROR_OR, but allows any command or sequence
to cause the error, without direct access to the command message.
Refactor so that TEST_COMMAND_RETURNS_ERROR_OR calls TEST_PROTOCOL_ERROR_OR
to make the assertion on the last error seen by the protocol.
|
|
|
|
| |
We don't really need these, so clean up by removing them.
|
|
|
|
|
|
|
|
| |
Conflicts:
bin/bbackupd/BackupDaemon.cpp
bin/bbackupd/BackupDaemon.h
test/bbackupd/testbbackupd.cpp
|
|
|
|
|
|
| |
Conflicts:
bin/bbackupd/BackupClientDirectoryRecord.cpp
|
| |
|
|
|
|
|
| |
Useful to help debug problems such as invalid file headers when the source
of the stream might not be too obvious.
|
|
|
|
| |
This is hopefully the cause of the segfaults reported by Brendon Baumgartner.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Will hopefully help to debug Brendon Baumgartner's issue with backups not
completing and repeating over and over, due to this error:
> Apr 18 11:14:09 hosting bbackupd[18990]: WARNING: Exception thrown:
> ServerException(Protocol_BadUsage) (Sending a stream with a definite
> size of zero is not allowed in the protocol) at Protocol.cpp:703
|
|
|
|
|
|
|
| |
If libedit is installed then -ledit will be detected and added to the link
line, which makes the test for getpeereid pass. Then SocketStream.cpp tries
to use it, but that won't work unless we include bsd/unistd.h where the
prototype is declared.
|
| |
|
|
|
|
|
| |
Makes the daemon responsive to polling and commands, even during a file
upload operation.
|
|
|
|
| |
Allows command-line tools to reuse the same option processing.
|
|
|
|
|
| |
Report the exception message details if it's a BoxException, so it's more
user friendly.
|