tdb2: make tests work in parallel.
authorRusty Russell <rusty@rustcorp.com.au>
Mon, 12 Sep 2011 04:50:40 +0000 (14:20 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Mon, 12 Sep 2011 04:50:40 +0000 (14:20 +0930)
Lazy cut & paste of tdb names causes failure when we run in parallel.

ccan/tdb2/test/api-21-parse_record.c
ccan/tdb2/test/api-80-tdb_fd.c
ccan/tdb2/test/api-81-seqnum.c
ccan/tdb2/test/api-firstkey-nextkey.c
ccan/tdb2/test/run-12-check.c
ccan/tdb2/test/run-20-growhash.c

index 4a9cf05c53c0057a33ce6add3c172b526e1f4c9d..def4f456ff7d75ee1cdae8ddebb652f9e4567e83 100644 (file)
@@ -59,7 +59,7 @@ int main(int argc, char *argv[])
 
        plan_tests(sizeof(flags) / sizeof(flags[0]) * 2 + 1);
        for (i = 0; i < sizeof(flags) / sizeof(flags[0]); i++) {
-               tdb = tdb_open("run-14-exists.tdb", flags[i],
+               tdb = tdb_open("api-21-parse_record.tdb", flags[i],
                               O_RDWR|O_CREAT|O_TRUNC, 0600, &tap_log_attr);
                if (ok1(tdb))
                        ok1(test_records(tdb));
index b321f5975557e71cc61bc70e98bd24e55f2f0cb6..0088f9b74d3121b761dde41cb8d83639e5e8dbe9 100644 (file)
@@ -20,7 +20,7 @@ int main(int argc, char *argv[])
 
        plan_tests(sizeof(flags) / sizeof(flags[0]) * 3);
        for (i = 0; i < sizeof(flags) / sizeof(flags[0]); i++) {
-               tdb = tdb_open("run-new_database.tdb", flags[i],
+               tdb = tdb_open("api-80-tdb_fd.tdb", flags[i],
                               O_RDWR|O_CREAT|O_TRUNC, 0600, &tap_log_attr);
                if (!ok1(tdb))
                        continue;
index c41b9ce3dd40f7444b57407f209bdbd7e8884bf2..c1eb75170bd69215c704244f0aa9c6f18f2fd25a 100644 (file)
@@ -24,7 +24,7 @@ int main(int argc, char *argv[])
 
        plan_tests(sizeof(flags) / sizeof(flags[0]) * 15 + 8 * 13);
        for (i = 0; i < sizeof(flags) / sizeof(flags[0]); i++) {
-               tdb = tdb_open("run-new_database.tdb", flags[i]|TDB_SEQNUM,
+               tdb = tdb_open("api-81-seqnum.tdb", flags[i]|TDB_SEQNUM,
                               O_RDWR|O_CREAT|O_TRUNC, 0600, &tap_log_attr);
                if (!ok1(tdb))
                        continue;
index 0c0951416fc0600243ae8e130e2016449a3529d4..e0374d8680c6100df8b0bf2e9774af6b79d3d601 100644 (file)
@@ -69,7 +69,7 @@ int main(int argc, char *argv[])
        plan_tests(sizeof(flags) / sizeof(flags[0])
                   * (NUM_RECORDS*6 + (NUM_RECORDS-1)*3 + 22) + 1);
        for (i = 0; i < sizeof(flags) / sizeof(flags[0]); i++) {
-               tdb = tdb_open("run-traverse.tdb", flags[i],
+               tdb = tdb_open("api-firstkey-nextkey.tdb", flags[i],
                               O_RDWR|O_CREAT|O_TRUNC, 0600,
                               flags[i] & TDB_VERSION1 ? NULL : &seed_attr);
                ok1(tdb);
index f55b942cc5bd38b365d89a1619eef4b1b0d199ef..06abe422ab436e1198e9625ef48f8b1eb7af39f1 100644 (file)
@@ -38,7 +38,7 @@ int main(int argc, char *argv[])
        failtest_suppress = true;
        plan_tests(sizeof(flags) / sizeof(flags[0]) * 3 + 1);
        for (i = 0; i < sizeof(flags) / sizeof(flags[0]); i++) {
-               tdb = tdb_open("run-10-simple-store.tdb", flags[i],
+               tdb = tdb_open("run-12-check.tdb", flags[i],
                               O_RDWR|O_CREAT|O_TRUNC, 0600, &tap_log_attr);
                ok1(tdb);
                ok1(tdb_store(tdb, key, data, TDB_INSERT) == 0);
index 890bcd27818aeed610856f94c5603ce43ed07958..65cead03584dbf47c16cb89ba6d279fff1250339 100644 (file)
@@ -56,7 +56,7 @@ int main(int argc, char *argv[])
        for (i = 0; i < sizeof(flags) / sizeof(flags[0]); i++) {
                struct hash_info h;
 
-               tdb = tdb_open("run-04-basichash.tdb", flags[i],
+               tdb = tdb_open("run-20-growhash.tdb", flags[i],
                               O_RDWR|O_CREAT|O_TRUNC, 0600, &hattr);
                ok1(tdb);
                if (!tdb)