torture3: Fix the local-dbwrap-ctdb test
authorVolker Lendecke <vl@samba.org>
Mon, 23 Mar 2020 12:01:29 +0000 (13:01 +0100)
committerRalph Boehme <slow@samba.org>
Tue, 28 Apr 2020 09:08:39 +0000 (09:08 +0000)
We need to O_CREAT the database when connecting

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/torture/test_dbwrap_ctdb.c

index eddcdf11290581b3474443e2e99115ec5c54cc68..d147e8c5cfdd2c412beaeec60b8ef197c5e65768 100644 (file)
@@ -36,9 +36,16 @@ bool run_local_dbwrap_ctdb(int dummy)
 
        msg_ctx = global_messaging_context();
 
-       db = db_open_ctdb(talloc_tos(), msg_ctx, "torture.tdb",
-                         0, TDB_DEFAULT,
-                         O_RDWR, 0755, DBWRAP_LOCK_ORDER_1, DBWRAP_FLAG_NONE);
+       db = db_open_ctdb(
+               talloc_tos(),
+               msg_ctx,
+               "torture.tdb",
+               0,
+               TDB_DEFAULT,
+               O_RDWR|O_CREAT,
+               0755,
+               DBWRAP_LOCK_ORDER_1,
+               DBWRAP_FLAG_NONE);
        if (db == NULL) {
                perror("db_open_ctdb failed");
                goto fail;