summaryrefslogtreecommitdiff
path: root/lib/common
Commit message (Collapse)AuthorAge
* Add a test that we can setup Blowfish encryption properlyChris Wilson2018-02-27
|
* Fix -Wundefined-bool-conversion compile failure of master branchChris Wilson2017-10-16
| | | | | | | | | | Master build fails with: lib/common/Timer.cpp:171:10: error: reference cannot be bound to dereferenced null pointer in well-defined C++ code; pointer may be assumed to always convert to true [-Werror,-Wundefined-bool-conversion]. Cannot get regtests to pass on this feature branch without fixing this. Also remove unused code from Timers.
* Increase precision of timing on Windows.Chris Wilson2017-06-22
| | | | | | | Should hopefully reduce random failures of timing-dependent tests which rely on subsecond precision for accuracy. (cherry picked from commit c845b2e39fffeb560983a301d810616a6495469d)
* Reduce precision of common timer testChris Wilson2017-06-22
| | | | | | | | | | | | | | | | | | Ideally timers would be perfectly accurate and we could sleep for 1.0 seconds, but on OSX in particular they could fire 50-100 ms late (I've seen 4 ms in practice) and we don't want the tests to fail because of this, because we don't really need that kind of precision in practice. So we reduce the timer intervals by 100ms to be safe. Increase logging level and add timestamps in testcommon. Should help to debug frequent test failures such as Condition [t2.HasExpired()] on OSX hosts on Travis. Add a SettingsGuard to the Console logger for its specific settings, such as showing times and microseconds. (cherry picked from commit a5e6cff1d435329b0121417ed9509e315ce0edd5) (cherry picked from commit 8d02eebce553ed822e0fcd60d6e319384e15ba4b)
* Fix infinite loop in RateLimitingStream::Write().Chris Wilson2016-09-11
|
* Throw exception with message, instead of logging then throwing.Chris Wilson2016-09-11
|
* Fix Unix compilation using CMake.Chris Wilson2016-09-09
| | | | | | | | | | Add platform detection that's compatible with the old buildsystem and its m4 autoconfigury. Make Travis build and test using CMake as a separate target. Remove unused function BoxGetTemporaryDirectoryName() to fixes compile using CMake on Unix.
* Update platform feature detection to work with CMake.Chris Wilson2016-09-03
| | | | | | | Rewrite some macros in forms that can be parsed by our parser written in CMake language (fake m4 with regexps). Fix incorrect conditional includes and incorrect #if/#ifdef assumptions.
* Fix deletion of test fixture directories with unicode names on Windows.Chris Wilson2015-12-25
| | | | | | | | We need to use CreateProcessW() instead of system() to pass these filenames to the rd command. Fixes every test that runs after test_unicode_filenames_can_be_backed_up in test/bbackupd.
* Fix deletion of fixtures between tests in test/backupstore.Chris Wilson2015-12-25
|
* Remove duplicate error number from Windows log messages.Chris Wilson2015-12-24
| | | | | GetErrorMessage() already includes the error number in the text string that it returns, so we don't need to include it again.
* Use rd instead of rmdir command, to try to work properly in appveyor.Chris Wilson2015-12-20
| | | | | I think something is on the PATH in Appveyor that makes rmdir /s/q fail, especially when run through Perl.
* Really fix file locking on WindowsChris Wilson2015-12-14
|
* Fix Windows file locking to work with MSVCChris Wilson2015-12-14
|
* Add CTest configurations to CMake. Make some tests work on Windows/MSVC.Chris Wilson2015-12-13
|
* Add some little string functions to Utils.cpp.Chris Wilson2015-12-13
| | | | | | | These functions check whether the beginning and end of a std::string match a supplied prefix or suffix, and remove that prefix or suffix, returning the remaining part. They are almost but not entirely trivial, and giving them names makes the code that uses them much more readable.
* Remove the duplicate copy constructor that MSVC warns about.Chris Wilson2015-12-13
|
* Define TEST_EXECUTABLE to allow it to have different names on MSVC/CMake.Chris Wilson2015-12-13
|
* Merge Arnaud Grandville's Windows fixes.Chris Wilson2015-12-09
|\ | | | | | | Merge branch 'master' of https://github.com/agrandville/boxbackup into appveyor
| * add specific define to allow the use of std::min and sd::max from windowsAG2015-10-26
| |
| * min & max are not from std namespaceAG2015-10-26
| | | | | | | | | | | | u_int8_t is unsigned char strings.h file is missing errors generated by deprecated functions are now hidden (C4996 warning)
| * Merge branch 'master' into fix_arm_struct_packingChris Wilson2015-09-21
| |\
| | * Really fix makeexception.pl.in this timeChris Wilson2015-09-02
| | |
| | * Fix exception message corruption.Chris Wilson2015-08-31
| | | | | | | | | | | | | | | Using the c_str() of a std::string after the string has been freed is unsafe and can lead to corrupted error messages in tests, or worse.
| * | Add support for uint16 types to ArchiveChris Wilson2015-09-19
| |/
* / Remove non-standard BSD u_int* types.Chris Wilson2015-12-08
|/ | | | | | | MSVC doesn't like them, and they're not necessary now that we have stdint.h. Remove some compatibility typedefs from BoxPlatform.h and emu.h which are not needed any longer either.
* Whitespace, import order and comment fixesChris Wilson2015-08-29
|
* Reset NamedLock file descriptor immediately after closing.Chris Wilson2015-08-15
| | | | | | Otherwise, if we fail to unlink the lockfile, we will try to close it again, which will fail because it's already closed, and we'll never get around to unlinking it.
* Fix memory leak tracking of calloc() allocationsChris Wilson2015-08-08
|
* Allow moving a CollectInBufferStream's contents to another oneChris Wilson2015-08-07
|
* Allow releasing a MemoryBlockGuardChris Wilson2015-08-07
|
* Whitespace cleanupChris Wilson2015-08-07
|
* Add S3Store account creation.Chris Wilson2015-07-31
|
* Move InvalidConfiguration exception to CommonException.Chris Wilson2015-07-31
| | | | Allows it to be used by S3Store, or in fact anything that uses Configuration.
* Move load_config_file to Test.cpp to allow reuse.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.
* 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
|
* 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 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.
* Define BOX_SOCKET_ERROR_MESSAGE, replace more BOX_LOG_SOCKET_ERROR calls ↵Chris Wilson2015-04-15
| | | | with it.
* 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.