1 #include "tdb2-source.h"
2 #include <ccan/tap/tap.h>
6 static void log_fn(struct tdb1_context *tdb, enum tdb1_debug_level level, const char *fmt, ...)
8 unsigned int *count = tdb1_get_logging_private(tdb);
9 if (strstr(fmt, "spinlocks"))
13 /* The code should barf on TDBs created with rwlocks. */
14 int main(int argc, char *argv[])
16 struct tdb1_context *tdb;
17 unsigned int log_count;
18 struct tdb1_logging_context log_ctx = { log_fn, &log_count };
22 /* We should fail to open rwlock-using tdbs of either endian. */
24 tdb = tdb1_open_ex("test/rwlock-le.tdb1", 0, 0, O_RDWR, 0,
30 tdb = tdb1_open_ex("test/rwlock-be.tdb1", 0, 0, O_RDWR, 0,