summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2012-03-21 00:57:14 +1030
committerRusty Russell <rusty@rustcorp.com.au>2012-03-22 01:57:37 +0100
commiteafd83736918bc5953e4a91cf2d893e68f2da2a2 (patch)
treeb478ff4c7f10af225d6b972eca29339eefcea039
parent4882a4cd68f90ee2c0808bffe114cd147e665c5c (diff)
downloadsamba-eafd83736918bc5953e4a91cf2d893e68f2da2a2.tar.gz
samba-eafd83736918bc5953e4a91cf2d893e68f2da2a2.tar.bz2
samba-eafd83736918bc5953e4a91cf2d893e68f2da2a2.zip
lib/tdb: fix up run-die-during-transaction test cases on Solaris.
By using a different include order, we end up with a different version of FILE_OFFSET_BITS (and probably other things) in parts of the test. The different variants get linked together, and the result is weird: the stat returns 0 size. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-rw-r--r--lib/tdb/test/run-die-during-transaction.c3
-rw-r--r--lib/tdb/test/run-nested-traverse.c2
-rw-r--r--lib/tdb/test/run-no-lock-during-traverse.c2
-rw-r--r--lib/tdb/test/run-traverse-in-transaction.c2
4 files changed, 4 insertions, 5 deletions
diff --git a/lib/tdb/test/run-die-during-transaction.c b/lib/tdb/test/run-die-during-transaction.c
index e65f811119..d6502f4ea4 100644
--- a/lib/tdb/test/run-die-during-transaction.c
+++ b/lib/tdb/test/run-die-during-transaction.c
@@ -1,4 +1,4 @@
-#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);
static ssize_t write_check(int fd, const void *buf, size_t count);
@@ -9,7 +9,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"
diff --git a/lib/tdb/test/run-nested-traverse.c b/lib/tdb/test/run-nested-traverse.c
index 1742b11108..83efd0d8ca 100644
--- a/lib/tdb/test/run-nested-traverse.c
+++ b/lib/tdb/test/run-nested-traverse.c
@@ -1,6 +1,6 @@
+#include "../common/tdb_private.h"
#include "lock-tracking.h"
#define fcntl fcntl_with_lockcheck
-#include "../common/tdb_private.h"
#include "../common/io.c"
#include "../common/tdb.c"
#include "../common/lock.c"
diff --git a/lib/tdb/test/run-no-lock-during-traverse.c b/lib/tdb/test/run-no-lock-during-traverse.c
index 21e6d88e9c..25d9d784bf 100644
--- a/lib/tdb/test/run-no-lock-during-traverse.c
+++ b/lib/tdb/test/run-no-lock-during-traverse.c
@@ -1,8 +1,8 @@
+#include "../common/tdb_private.h"
#include "lock-tracking.h"
#define fcntl fcntl_with_lockcheck
-#include "../common/tdb_private.h"
#include "../common/io.c"
#include "../common/tdb.c"
#include "../common/lock.c"
diff --git a/lib/tdb/test/run-traverse-in-transaction.c b/lib/tdb/test/run-traverse-in-transaction.c
index 44c3dabc91..d8455176a2 100644
--- a/lib/tdb/test/run-traverse-in-transaction.c
+++ b/lib/tdb/test/run-traverse-in-transaction.c
@@ -1,6 +1,6 @@
#include "lock-tracking.h"
-#define fcntl fcntl_with_lockcheck
#include "../common/tdb_private.h"
+#define fcntl fcntl_with_lockcheck
#include "../common/io.c"
#include "../common/tdb.c"
#include "../common/lock.c"