diff options
Diffstat (limited to 'test/bbackupd')
-rw-r--r-- | test/bbackupd/testbbackupd.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/test/bbackupd/testbbackupd.cpp b/test/bbackupd/testbbackupd.cpp index 122a5f09..25b00ef5 100644 --- a/test/bbackupd/testbbackupd.cpp +++ b/test/bbackupd/testbbackupd.cpp @@ -3708,11 +3708,17 @@ bool test_sync_new_files() // TODO FIXME dedent { - // Add some more files and modify others - // Use the m flag this time so they have a recent modification time + // Add some more files and modify others. Use the m flag this + // time so they have a recent modification time. TEST_THAT(unpack_files("test3", "testfiles", "m")); + + // OpenBSD's tar interprets the "-m" option quite differently: + // it sets the time to epoch zero (1 Jan 1970) instead of the + // current time, which doesn't help us. So reset the timestamp + // on a file with the touch command, so it won't be backed up. + TEST_RETURN(::system("touch testfiles/TestDir1/chsh"), 0); - // Wait and test + // At least one file is too new to be backed up on the first run. bbackupd.RunSyncNow(); TEST_COMPARE(Compare_Different); |