From: Andreas Schneider Date: Thu, 21 Mar 2019 10:55:01 +0000 (+0100) Subject: s3:torture: Move the init of the locking out of the loop X-Git-Tag: tdb-1.4.1~653 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9b1d79a5dd5e7caf967cf49936d2eb52175e85cf;p=thirdparty%2Fsamba.git s3:torture: Move the init of the locking out of the loop Signed-off-by: Andreas Schneider Reviewed-by: Jeremy Allison --- diff --git a/source3/torture/test_cleanup.c b/source3/torture/test_cleanup.c index 8efdf35e080..d3186db75d2 100644 --- a/source3/torture/test_cleanup.c +++ b/source3/torture/test_cleanup.c @@ -281,6 +281,11 @@ bool run_cleanup3(int dummy) { create_duplicate_batch, "create_duplicate_batch" }, }; + if (!locking_init()) { + printf("locking_init failed\n"); + return false; + } + printf("CLEANUP3: Checking that a share mode is cleaned up on " "conflict\n"); @@ -296,10 +301,6 @@ bool run_cleanup3(int dummy) printf("%d %d %d\n", (int)id.devid, (int)id.inode, (int)id.extid); - if (!locking_init()) { - printf("locking_init failed\n"); - return false; - } lck = get_existing_share_mode_lock(talloc_tos(), id); if (lck == NULL) { printf("get_existing_share_mode_lock failed\n");