X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Ftdb2%2Ftest%2Frun-01-new_database.c;h=a5f0dd3727edb25bd3ecdde209a38bd87e8dc4eb;hp=4cfd04d91ce73c558a28d4bbc350474a6e31301f;hb=0b93bd102aad6b61f1e569fb12aabc6352a1d7cd;hpb=efdf0f2d8f34b4c01c82c558b350ec36c7329b1e diff --git a/ccan/tdb2/test/run-01-new_database.c b/ccan/tdb2/test/run-01-new_database.c index 4cfd04d9..a5f0dd37 100644 --- a/ccan/tdb2/test/run-01-new_database.c +++ b/ccan/tdb2/test/run-01-new_database.c @@ -1,12 +1,5 @@ #include -#include -#include -#include -#include -#include -#include -#include -#include +#include "tdb2-source.h" #include #include #include "logging.h" @@ -18,7 +11,12 @@ int main(int argc, char *argv[]) struct tdb_context *tdb; int flags[] = { TDB_INTERNAL, TDB_DEFAULT, TDB_NOMMAP, TDB_INTERNAL|TDB_CONVERT, TDB_CONVERT, - TDB_NOMMAP|TDB_CONVERT }; + TDB_NOMMAP|TDB_CONVERT, + TDB_INTERNAL|TDB_VERSION1, TDB_VERSION1, + TDB_NOMMAP|TDB_VERSION1, + TDB_INTERNAL|TDB_CONVERT|TDB_VERSION1, + TDB_CONVERT|TDB_VERSION1, + TDB_NOMMAP|TDB_CONVERT|TDB_VERSION1 }; failtest_init(argc, argv); failtest_hook = block_repeat_failures; @@ -29,12 +27,11 @@ int main(int argc, char *argv[]) O_RDWR|O_CREAT|O_TRUNC, 0600, &tap_log_attr); if (!ok1(tdb)) failtest_exit(exit_status()); - if (tdb) { - bool ok = ok1(tdb_check(tdb, NULL, NULL) == 0); - tdb_close(tdb); - if (!ok) - failtest_exit(exit_status()); - } + + failtest_suppress = true; + ok1(tdb_check(tdb, NULL, NULL) == 0); + failtest_suppress = false; + tdb_close(tdb); if (!ok1(tap_log_messages == 0)) break; }