X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Ftdb%2Ftest%2Frun-endian.c;h=0fae16214814bdabb1e30b1326908361f62af586;hp=6583c53ce0b06c778e7889cab831281a410d3d82;hb=16f4f30fdd9748d54274745df8a443d32d15bc53;hpb=39357f4e89f4ac02eb11861812cbfc67b4f1d4ef diff --git a/ccan/tdb/test/run-endian.c b/ccan/tdb/test/run-endian.c index 6583c53c..0fae1621 100644 --- a/ccan/tdb/test/run-endian.c +++ b/ccan/tdb/test/run-endian.c @@ -8,9 +8,12 @@ #include #include #include +#include +#include #include #include #include +#include "logging.h" int main(int argc, char *argv[]) { @@ -18,8 +21,9 @@ int main(int argc, char *argv[]) TDB_DATA key, data; plan_tests(13); - tdb = tdb_open("/tmp/test.tdb", 1024, TDB_CLEAR_IF_FIRST|TDB_CONVERT, - O_CREAT|O_TRUNC|O_RDWR, 0600); + tdb = tdb_open_ex("run-endian.tdb", 1024, + TDB_CLEAR_IF_FIRST|TDB_CONVERT, + O_CREAT|O_TRUNC|O_RDWR, 0600, &taplogctx, NULL); ok1(tdb); key.dsize = strlen("hi"); @@ -45,7 +49,8 @@ int main(int argc, char *argv[]) tdb_close(tdb); /* Reopen: should read it */ - tdb = tdb_open("/tmp/test.tdb", 1024, 0, O_RDWR, 0); + tdb = tdb_open_ex("run-endian.tdb", 1024, 0, O_RDWR, 0, + &taplogctx, NULL); ok1(tdb); key.dsize = strlen("hi");