Changeset 2369
- Timestamp:
- 29/10/2008 20:55:43 (3 years ago)
- File:
-
- 1 edited
-
box/trunk/test/bbackupd/testbbackupd.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
box/trunk/test/bbackupd/testbbackupd.cpp
r2347 r2369 1003 1003 intercept_setup_delay("testfiles/TestDir1/spacetest/f1", 1004 1004 0, 4000, SYS_read, 1); 1005 pid = start_internal_daemon(); 1006 intercept_clear_setup(); 1007 1008 fd = open("testfiles/TestDir1/spacetest/f1", O_WRONLY); 1009 TEST_THAT(fd > 0); 1010 // write again, to update the file's timestamp 1011 TEST_EQUAL(sizeof(buffer), write(fd, buffer, sizeof(buffer)), 1012 "Buffer write"); 1013 TEST_THAT(close(fd) == 0); 1014 1015 wait_for_backup_operation(); 1016 // can't test whether intercept was triggered, because 1017 // it's in a different process. 1018 // TEST_THAT(intercept_triggered()); 1019 TEST_THAT(stop_internal_daemon(pid)); 1005 { 1006 Timers::Init(); 1007 BackupDaemon bbackupd; 1008 bbackupd.Configure("testfiles/bbackupd.conf"); 1009 bbackupd.InitCrypto(); 1010 1011 fd = open("testfiles/TestDir1/spacetest/f1", O_WRONLY); 1012 TEST_THAT(fd > 0); 1013 // write again, to update the file's timestamp 1014 TEST_EQUAL(1, write(fd, "z", 1), "Buffer write"); 1015 TEST_THAT(close(fd) == 0); 1016 1017 // wait long enough to put file into sync window 1018 wait_for_operation(5); 1019 1020 bbackupd.RunSyncNow(); 1021 TEST_THAT(intercept_triggered()); 1022 intercept_clear_setup(); 1023 Timers::Cleanup(); 1024 } 1020 1025 1021 1026 // check that the diff was aborted, i.e. upload was not a diff … … 1175 1180 std::string line; 1176 1181 TEST_THAT(reader.GetLine(line)); 1177 if (line == "Send ListDirectory(0x3,0xffff ffff,0xc,true)")1182 if (line == "Send ListDirectory(0x3,0xffff,0xc,true)") 1178 1183 { 1179 1184 found1 = true;
Note: See TracChangeset
for help on using the changeset viewer.
