| Commit message (Collapse) | Author | Age |
... | |
|
|
|
|
| |
NamedLock simply didn't work before. This may cause test failures, but the
tests are already failing on Windows, and must be fixed.
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Timer.cpp.
|
| |
|
|
|
|
| |
Allows Archive to be used safely on network streams.
|
| |
|
| |
|
|
|
|
|
| |
Should make the Travis logs shorter and more readable.
|
|
|
|
|
|
| |
We have more fine-grained control over logging now, including ability to log
to a file in bbackupquery and all daemons, and users can't redirect stderr on
Windows. https://www.boxbackup.org/ticket/50
|
| |
|
|
|
|
|
|
| |
We need to use the saved Windows error code from GetLastError(), rather than
calling it again, because another system call has run in the mean time and
GetLastError() will now return 0.
|
|
|
|
|
|
| |
Fixes tests broken by changing current directory, for example in bbackupquery,
which meant that the report file was written in the wrong place and couldn't
be found by the test, causing a failure.
|
| |
|
| |
|
|
|
|
|
| |
This is better for C++ style and potential missing null termination.
|
| |
|
|
|
|
|
|
|
| |
Reduce precision in log messages from microseconds to milliseconds.
Log the amount of time actually slept in ShortSleep().
|
|
|
|
|
|
| |
There's not much point logging with higher precision when no normal platform
will deliver it.
|
| |
|
| |
|
| |
|
|
|
|
| |
Prevents backup log files from becoming too large.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
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.
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
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.
|
|
|
|
|
| |
Use the standard macros to report file error messages in the standard
format, including a filename and message in the exception.
|
|
|
|
| |
Useful in testing whether code logs the expected messages or not.
|
|
|
|
| |
This is very useful with the forthcoming Capture logger.
|
|
|
|
|
| |
It's incompatible with having a logger that logs everything, regardless of
the global log level.
|
|
|
|
|
|
|
|
| |
This is useful to return from a test if an assertion/check fails, instead of
throwing an exception.
Also add logging of the actual error code received (with name) to
TEST_COMMAND_RETURNS_ERROR(_OR).
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Otherwise the protocol might be broken and can't be used any more, even if
we made an effort to return an Error reply instead of throwing an exception.
This used to not be a problem because an Error reply would terminate the
connection anyway, but it no longer does. So if the client also didn't
terminate, but tried to handle the exception and keep using the connection,
then it might find that its next command fails because the protocol is broken.
|
|
|
|
|
|
| |
Fix test/common memory leak checks now that MemBlockStream allocates another
block.
|
| |
|
|
|
|
| |
Allows aborting tests from any depth of function calls.
|