tdb2: more tests, hash collision fixes, attribute support.
[ccan] / ccan / tdb2 / test / run-expand.c
index 7785969c921d3aec002dbb76cf9f866d95429131..181087e0da8244f1a77c119684edce5828c99b53 100644 (file)
@@ -27,9 +27,8 @@ int main(int argc, char *argv[])
 
        /* First, lower level expansion tests. */
        for (i = 0; i < sizeof(flags) / sizeof(flags[0]); i++) {
-               tdb = tdb_open("/tmp/run-new_database.tdb", flags[i],
-                              O_RDWR|O_CREAT|O_TRUNC, 0600, NULL);
-               tdb->log = tap_log_fn;
+               tdb = tdb_open("run-expand.tdb", flags[i],
+                              O_RDWR|O_CREAT|O_TRUNC, 0600, &tap_log_attr);
                ok1(tdb);
                if (!tdb)
                        continue;
@@ -101,9 +100,8 @@ int main(int argc, char *argv[])
 
        /* Now using tdb_expand. */
        for (i = 0; i < sizeof(flags) / sizeof(flags[0]); i++) {
-               tdb = tdb_open("/tmp/run-new_database.tdb", flags[i],
-                              O_RDWR|O_CREAT|O_TRUNC, 0600, NULL);
-               tdb->log = tap_log_fn;
+               tdb = tdb_open("run-expand.tdb", flags[i],
+                              O_RDWR|O_CREAT|O_TRUNC, 0600, &tap_log_attr);
                ok1(tdb);
                if (!tdb)
                        continue;