s4: torture: run test_durable_v2_open_reopen2_lease() in a subdirectory
authorRalph Boehme <slow@samba.org>
Tue, 17 Jul 2018 13:56:05 +0000 (15:56 +0200)
committerJeremy Allison <jra@samba.org>
Tue, 17 Jul 2018 22:04:10 +0000 (00:04 +0200)
Bug: https://bugzilla.samba.org/show_bug.cgi?id=13535

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
selftest/knownfail.d/samba3.smb2.durable-v2-open [new file with mode: 0644]
source4/torture/smb2/durable_v2_open.c

diff --git a/selftest/knownfail.d/samba3.smb2.durable-v2-open b/selftest/knownfail.d/samba3.smb2.durable-v2-open
new file mode 100644 (file)
index 0000000..facf1d0
--- /dev/null
@@ -0,0 +1 @@
+^samba3.smb2.durable-v2-open.reopen2-lease-v2\(nt4_dc\)$
index 3a0e0707d2c1a38628665821a1b24bf44b9a50f1..0a928ec8c2651321ebbd14b34c02de5fbd8a88e2 100644 (file)
@@ -1518,9 +1518,15 @@ bool test_durable_v2_open_reopen2_lease_v2(struct torture_context *tctx,
 
        options = tree->session->transport->options;
 
+       smb2_deltree(tree, __func__);
+       status = torture_smb2_testdir(tree, __func__, &_h);
+       torture_assert_ntstatus_ok_goto(tctx, status, ret, done,
+                                       "torture_smb2_testdir failed\n");
+       smb2_util_close(tree, _h);
+
        /* Choose a random name in case the state is left a little funky. */
-       snprintf(fname, 256, "durable_v2_open_reopen2_%s.dat",
-                generate_random_str(tctx, 8));
+       snprintf(fname, 256, "%s\\durable_v2_open_reopen2_%s.dat",
+                __func__, generate_random_str(tctx, 8));
 
        smb2_util_unlink(tree, fname);
 
@@ -1726,6 +1732,7 @@ done:
        }
 
        smb2_util_unlink(tree, fname);
+       smb2_deltree(tree, __func__);
 
        talloc_free(tree);