[Box Backup-commit] COMMIT r1290 - box/chris/general/test/bbackupd

boxbackup-dev at fluffy.co.uk boxbackup-dev at fluffy.co.uk
Wed Feb 14 23:19:00 GMT 2007


Author: chris
Date: 2007-02-14 23:18:59 +0000 (Wed, 14 Feb 2007)
New Revision: 1290

Modified:
   box/chris/general/test/bbackupd/testbbackupd.cpp
Log:
Use O_LOCK for locked file tests.


Modified: box/chris/general/test/bbackupd/testbbackupd.cpp
===================================================================
--- box/chris/general/test/bbackupd/testbbackupd.cpp	2007-02-14 23:18:34 UTC (rev 1289)
+++ box/chris/general/test/bbackupd/testbbackupd.cpp	2007-02-14 23:18:59 UTC (rev 1290)
@@ -1699,7 +1699,7 @@
 		// Now we have about three seconds to work
 
 		handle = openfile("testfiles/TestDir1/lockedfile",
-			O_CREAT | O_EXCL, 0);
+			O_CREAT | O_EXCL | O_LOCK, 0);
 		TEST_THAT(handle != INVALID_HANDLE_VALUE);
 
 		if (handle != 0)
@@ -1732,7 +1732,7 @@
 			// open the file again, compare and check that compare
 			// reports the correct error message (and finishes)
 			handle = openfile("testfiles/TestDir1/lockedfile",
-				O_CREAT | O_EXCL, 0);
+				O_LOCK, 0);
 			TEST_THAT(handle != INVALID_HANDLE_VALUE);
 
 			compareReturnValue = ::system(BBACKUPQUERY 




More information about the Boxbackup-commit mailing list