summaryrefslogtreecommitdiff
path: root/test/bbackupd
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2014-12-26 23:17:05 +0000
committerChris Wilson <chris+github@qwirx.com>2014-12-26 23:17:05 +0000
commite3d2f96ec6611d9c9b0055bb5ac7ba1f1c5dafe1 (patch)
tree76865f10e09ff7f6cd190315e039318a7c04a757 /test/bbackupd
parenta1d64b63efbe641a1404ca1c49754c46f9a142b2 (diff)
Fix compile errors in tests on Windows.
Diffstat (limited to 'test/bbackupd')
-rw-r--r--test/bbackupd/testbbackupd.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/test/bbackupd/testbbackupd.cpp b/test/bbackupd/testbbackupd.cpp
index eb6c3ee2..c862c636 100644
--- a/test/bbackupd/testbbackupd.cpp
+++ b/test/bbackupd/testbbackupd.cpp
@@ -2576,7 +2576,7 @@ bool test_unicode_filenames_can_be_backed_up()
}
// Check that bbackupquery shows the dir in console encoding
- command = BBACKUPQUERY " -Wwarning "
+ std::string command = BBACKUPQUERY " -Wwarning "
"-c testfiles/bbackupd.conf "
"-q \"list Test1\" quit";
pid_t bbackupquery_pid;
@@ -3627,21 +3627,21 @@ bool test_compare_detects_attribute_changes()
BOX_NOTICE("skipping test on this platform");
// requires openfile(), GetFileTime() and attrib.exe
#else
- bbackupd.RunSyncNow()
+ bbackupd.RunSyncNow();
// TODO FIXME dedent
{
// make one of the files read-only, expect a compare failure
- compareReturnValue = ::system("attrib +r "
+ int exit_status = ::system("attrib +r "
"testfiles\\restore-Test1\\f1.dat");
- TEST_RETURN(compareReturnValue, 0);
+ TEST_RETURN(exit_status, 0);
TEST_COMPARE(Compare_Different);
// set it back, expect no failures
- compareReturnValue = ::system("attrib -r "
+ exit_status = ::system("attrib -r "
"testfiles\\restore-Test1\\f1.dat");
- TEST_RETURN(compareReturnValue, 0);
+ TEST_RETURN(exit_status, 0);
TEST_COMPARE(Compare_Same);
@@ -4051,7 +4051,8 @@ bool test_locked_file_behaviour()
// Test that locked files cannot be backed up,
// and the appropriate error is reported.
- handle = openfile("testfiles/TestDir1/f1.dat", O_LOCK);
+ HANDLE handle = openfile("testfiles/TestDir1/f1.dat",
+ O_LOCK, 0);
TEST_THAT_OR(handle != INVALID_HANDLE_VALUE, FAIL);
{