summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAge
* Refactor to allow non-bbstored store configurations.Chris Wilson2015-06-28
| | | | | | Make some keys not required in BackupDaemonConfigVerify, and verify them afterwards instead, when the rest of the configuration file has been read (and in future, the store type would be known.)
* Allow MemoryBlockGuard to guard a block passed in (already malloced).Chris Wilson2015-06-10
|
* Add support for optional items in Archives.Chris Wilson2015-06-10
| | | | | If the item is not present (the end of the Archive is reached instead) then a default value is returned instead of throwing an exception.
* Add missing timeouts to Archive Read() calls.Chris Wilson2015-06-10
|
* Fix logging of NamedLock acquisition for O_EXLOCK method.Chris Wilson2015-06-10
|
* Add usage example for -L option, showing how module names were compiled inChris Wilson2015-06-10
|
* Initialise ModificationTime when uploading complete file.Chris Wilson2015-06-10
|
* Add command-line help to test executables.Chris Wilson2015-06-10
|
* Fix error reporting from Reg* functions.Chris Wilson2015-05-16
| | | | | | Unlike the rest of the Win32 API, these functions return their error code, and it's not accessible using GetLastError(). Thanks to Enrique Perez-Terron for reporting this issue.
* 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.
* Improve exception message when unlink() on a raidfile stripe failsChris Wilson2015-05-16
|
* Use FileModificationTime instead of raw stat() on Windows.Chris Wilson2015-05-16
| | | | | | | | | | | Fixes test failures caused by using seconds since epoch on Windows, instead of a box_time_t, and rounding it to the nearest 10^6, which is fine for a box_time_t (all other platforms), but 10^6 seconds is a rather long time to ignore changes for on Windows. This also makes it possible to support subsecond precision on Windows via FileModificationTime() in future, and have RaidFile detect such subsecond changes.
* Fix NamedLock release on Windows.Chris Wilson2015-05-16
| | | | | | On Windows we can't delete the file while it's open, and we don't need to, because we opened it for exclusive use, so another process can't lock it between us unlocking and deleting it.
* 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 lock race condition by unlinking before closing the file handle.Chris Wilson2015-05-04
|
* Add extra logging for acquiring and releasing NamedLocks.Chris Wilson2015-05-04
|
* Add command-line option to limit log messages to certain file(s).Chris Wilson2015-05-04
| | | | | E.g. you can run with -L NamedLock.cpp to only show messages logged in that file. You can also repeat it to only show messages from certain files.
* 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.
* Define BOX_SOCKET_ERROR_MESSAGE, replace more BOX_LOG_SOCKET_ERROR calls ↵Chris Wilson2015-04-15
| | | | with it.
* Use THROW_EXCEPTION_MESSAGE macro to save a message in exceptions.Chris Wilson2015-04-15
|
* 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.
* Add a static GetMessage() to get exception message for a known subtype code.Chris Wilson2015-04-15
|
* Fix file locking on Windows.Chris Wilson2015-04-13
| | | | | NamedLock simply didn't work before. This may cause test failures, but the tests are already failing on Windows, and must be fixed.
* 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.
* Catch setitimer() failure, throw exceptions with descriptive messages in ↵Chris Wilson2015-04-06
| | | | Timer.cpp.
* Whitespace and semicolon-after-macro fixes.Chris Wilson2015-04-06
|
* Add missing timeouts to Archive reads.Chris Wilson2015-04-06
| | | | Allows Archive to be used safely on network streams.
* 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 BOX_SYSLOG macro to provide a category.Chris Wilson2015-02-25
|
* Reduce verbosity of testcommon by hiding some log messages.Chris Wilson2015-02-25
|
* Reduce test output noise by hiding some error messages in tests.Chris Wilson2015-02-25
| | | | | Should make the Travis logs shorter and more readable.
* Add test for hardlink handling.Chris Wilson2015-01-04
|
* Don't redirect logging to stderr any more.Chris Wilson2015-01-04
| | | | | | 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
* Compile fix for MSVC (Visual Studio) 2010.Chris Wilson2015-01-02
|
* Compile fix for loading BoxConfig.h in MinGWChris Wilson2015-01-02
|
* Add missing include file for PATH_MAX.Chris Wilson2015-01-02
|
* Fix random timezone errors on restore.Chris Wilson2015-01-02
| | | | Work in UTC inside Box Backup, not local time.
* Remove unused variableChris Wilson2015-01-02
|
* Fix error logging when file open fails on Windows.Chris Wilson2015-01-02
| | | | | | 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.
* Write memory leak report files to current working directory saved at startup.Chris Wilson2015-01-02
| | | | | | 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.
* Fix overlapped I/O in WinNamedPipeStream.Chris Wilson2014-12-28
| | | | Broken by previous changes to introduce overlapped I/O for writes.
* Whitespace and comment fixes.Chris Wilson2014-12-28
| | | | Improve correctness and reduce code duplication in bbackupctl.
* Improve debugging of named pipe operations and bbackupctl pipe interaction.Chris Wilson2014-12-28
|
* Add missing timeouts on command socket writes.Chris Wilson2014-12-28
|
* Add comment about reason for code duplication.Chris Wilson2014-12-26
| | | | | The mysterious case of the missing Write(const std::string&) in the night-time, or rather in subclasses of IOStream which declares it.
* Improve some exception messages in lib/raidfile.Chris Wilson2014-12-26
| | | | | Use the new macros to ensure that exceptions contain a message and filename, following the new standard format.
* 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
|