The time to run tests under valgrind has become excessive; particularly
the failure tests which fork(). Thus we cut down testing:
1) api-94-repack: reduce from 234 seconds to 2 seconds by cutting
iterations, despite adding TDB_VERSION1 tests.
2) api-missing-entries: reduce from 17 seconds to under 1 second by
not checking db inside loop, but at end.
This reduces the total ccanlint time from 729 to 489 seconds.
#include <fcntl.h>
#include "logging.h"
#include <fcntl.h>
#include "logging.h"
static bool store_all(struct tdb_context *tdb)
{
static bool store_all(struct tdb_context *tdb)
{
struct tdb_context *tdb;
int flags[] = { TDB_DEFAULT, TDB_NOMMAP,
TDB_CONVERT, TDB_NOMMAP|TDB_CONVERT,
struct tdb_context *tdb;
int flags[] = { TDB_DEFAULT, TDB_NOMMAP,
TDB_CONVERT, TDB_NOMMAP|TDB_CONVERT,
+ TDB_VERSION1, TDB_VERSION1|TDB_NOMMAP,
+ TDB_VERSION1|TDB_CONVERT,
+ TDB_VERSION1|TDB_NOMMAP|TDB_CONVERT
};
plan_tests(sizeof(flags) / sizeof(flags[0]) * 6 + 1);
};
plan_tests(sizeof(flags) / sizeof(flags[0]) * 6 + 1);
.fn = failhash } };
hattr.base.next = &tap_log_attr;
.fn = failhash } };
hattr.base.next = &tap_log_attr;
- plan_tests(1 + 2 * NUM_RECORDS + 1);
+ plan_tests(1 + NUM_RECORDS + 2);
tdb = tdb_open("run-missing-entries.tdb", TDB_INTERNAL,
O_RDWR|O_CREAT|O_TRUNC, 0600, &hattr);
tdb = tdb_open("run-missing-entries.tdb", TDB_INTERNAL,
O_RDWR|O_CREAT|O_TRUNC, 0600, &hattr);
for (i = 0; i < NUM_RECORDS; i++) {
ok1(tdb_store(tdb, key, data, TDB_REPLACE) == 0);
for (i = 0; i < NUM_RECORDS; i++) {
ok1(tdb_store(tdb, key, data, TDB_REPLACE) == 0);
- ok1(tdb_check(tdb, NULL, NULL) == 0);
+ ok1(tdb_check(tdb, NULL, NULL) == 0);