summaryrefslogtreecommitdiff
path: root/source3/torture/torture.c
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2018-10-19 15:24:14 +0200
committerVolker Lendecke <vl@samba.org>2018-10-27 21:24:23 +0200
commitd48a2bc376a36b1ee00ed929c2317d72c96e3ee5 (patch)
treef39ee39ef2357970c4c715e1cfda504b8802d229 /source3/torture/torture.c
parent4db918b44d8779af7c6738537cf7cce3a240b41b (diff)
downloadsamba-d48a2bc376a36b1ee00ed929c2317d72c96e3ee5.tar.gz
s3:torture: Rename the test file and remove it if it exists
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/torture/torture.c')
-rw-r--r--source3/torture/torture.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source3/torture/torture.c b/source3/torture/torture.c
index 71ff4d60f36..333b1f1c26a 100644
--- a/source3/torture/torture.c
+++ b/source3/torture/torture.c
@@ -8121,6 +8121,7 @@ static bool run_chain1(int dummy)
struct tevent_req *reqs[3], *smbreqs[3];
bool done = false;
const char *str = "foobar";
+ const char *fname = "\\test_chain";
NTSTATUS status;
printf("starting chain1 test\n");
@@ -8130,7 +8131,9 @@ static bool run_chain1(int dummy)
smbXcli_conn_set_sockopt(cli1->conn, sockops);
- reqs[0] = cli_openx_create(talloc_tos(), evt, cli1, "\\test",
+ cli_unlink(cli1, fname, FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN);
+
+ reqs[0] = cli_openx_create(talloc_tos(), evt, cli1, fname,
O_CREAT|O_RDWR, 0, &smbreqs[0]);
if (reqs[0] == NULL) return false;
tevent_req_set_callback(reqs[0], chain1_open_completion, NULL);