diff options
author | Andreas Schneider <asn@samba.org> | 2018-10-19 15:24:14 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2018-10-27 21:24:23 +0200 |
commit | d48a2bc376a36b1ee00ed929c2317d72c96e3ee5 (patch) | |
tree | f39ee39ef2357970c4c715e1cfda504b8802d229 /source3/torture/torture.c | |
parent | 4db918b44d8779af7c6738537cf7cce3a240b41b (diff) | |
download | samba-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.c | 5 |
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); |