diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2012-02-14 14:45:21 +1030 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2012-02-14 14:45:21 +1030 |
commit | 205242e1769f96e0e8fccd52378965d35dd02093 (patch) | |
tree | 5bce8a0d01f0f6dd2360b93033934d27a93d9eef /lib/tdb/test/run-open-during-transaction.c | |
parent | 8fa345d952328c5866f3a0f835f3599343c51b00 (diff) | |
download | samba-205242e1769f96e0e8fccd52378965d35dd02093.tar.gz samba-205242e1769f96e0e8fccd52378965d35dd02093.tar.bz2 samba-205242e1769f96e0e8fccd52378965d35dd02093.zip |
tdb/test: fix up tests for use in SAMBA tdb code.
1) Make sure we include "tdb_private.h" first, to get the right headers
(esp. the correct setting of _FILE_OFFSET_BITS before unistd.h).
2) Fix 3G file test since expand logic has changed.
3) Fix nested transaction test, since default is to allow nesting.
4) Capture fdatasync, which was slowing down transaction expand.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'lib/tdb/test/run-open-during-transaction.c')
-rw-r--r-- | lib/tdb/test/run-open-during-transaction.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/tdb/test/run-open-during-transaction.c b/lib/tdb/test/run-open-during-transaction.c index bd6e33d563..f4a00525d8 100644 --- a/lib/tdb/test/run-open-during-transaction.c +++ b/lib/tdb/test/run-open-during-transaction.c @@ -1,5 +1,4 @@ -#define _XOPEN_SOURCE 500 -#include <unistd.h> +#include "../common/tdb_private.h" #include "lock-tracking.h" static ssize_t pwrite_check(int fd, const void *buf, size_t count, off_t offset); @@ -11,7 +10,6 @@ static int ftruncate_check(int fd, off_t length); #define fcntl fcntl_with_lockcheck #define ftruncate ftruncate_check -#include "../common/tdb_private.h" #include "../common/io.c" #include "../common/tdb.c" #include "../common/lock.c" |