summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2007-03-10 15:31:25 +0000
committerChris Wilson <chris+github@qwirx.com>2007-03-10 15:31:25 +0000
commit61af1d8fe20580d59a760f53e63cc984861e7324 (patch)
tree4746a01e82958d10fee67805e9302a552f0ae053 /test
parent9b85fab48fcbe222fbb49f0d90f6326b0934dbf5 (diff)
Check for return code 3 (unreadable files) instead of return code 2
(refs #3, depends on [1378])
Diffstat (limited to 'test')
-rw-r--r--test/bbackupd/testbbackupd.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/bbackupd/testbbackupd.cpp b/test/bbackupd/testbbackupd.cpp
index d1bf4a98..ea96a220 100644
--- a/test/bbackupd/testbbackupd.cpp
+++ b/test/bbackupd/testbbackupd.cpp
@@ -1131,14 +1131,23 @@ int test_bbackupd()
TEST_THAT(fd != -1);
::close(fd);
}
+
// Wait and test...
wait_for_backup_operation();
compareReturnValue = ::system("../../bin/bbackupquery/bbackupquery -q -c testfiles/bbackupd.conf -l testfiles/query3e.log \"compare -ac\" quit");
- TEST_THAT(compareReturnValue == 2*256); // should find differences
+
+ // Check that unreadable files were found
+ TEST_THAT(compareReturnValue == 3*256);
+
+ // Check for memory leaks during compare
TestRemoteProcessMemLeaks("bbackupquery.memleaks");
+
// Check that it was reported correctly
TEST_THAT(TestFileExists("testfiles/notifyran.read-error.1"));
+
+ // Check that the error was only reorted once
TEST_THAT(!TestFileExists("testfiles/notifyran.read-error.2"));
+
// Set permissions on file and dir to stop errors in the future
::chmod("testfiles/TestDir1/sub23/read-fail-test-dir", 0770);
::chmod("testfiles/TestDir1/read-fail-test-file", 0770);