1 #include "tdb2-source.h"
2 #include <ccan/tap/tap.h>
6 static void log_fn(struct tdb_context *tdb, enum tdb_log_level level,
7 enum TDB_ERROR ecode, const char *message, void *priv)
9 unsigned int *count = priv;
10 if (strstr(message, "spinlocks"))
14 /* The code should barf on TDBs created with rwlocks. */
15 int main(int argc, char *argv[])
17 struct tdb_context *tdb;
18 unsigned int log_count;
19 struct tdb1_logging_context log_ctx = { log_fn, &log_count };
23 /* We should fail to open rwlock-using tdbs of either endian. */
25 tdb = tdb1_open_ex("test/rwlock-le.tdb1", 0, 0, O_RDWR, 0,
31 tdb = tdb1_open_ex("test/rwlock-be.tdb1", 0, 0, O_RDWR, 0,