From 61af1d8fe20580d59a760f53e63cc984861e7324 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sat, 10 Mar 2007 15:31:25 +0000 Subject: Check for return code 3 (unreadable files) instead of return code 2 (refs #3, depends on [1378]) --- test/bbackupd/testbbackupd.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'test') 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); -- cgit v1.2.1