From: Andreas Schneider Date: Fri, 19 Oct 2018 13:24:14 +0000 (+0200) Subject: s3:torture: Rename the test file and remove it if it exists X-Git-Tag: tdb-1.3.17~1138 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d48a2bc376a36b1ee00ed929c2317d72c96e3ee5;p=thirdparty%2Fsamba.git s3:torture: Rename the test file and remove it if it exists Signed-off-by: Andreas Schneider Reviewed-by: Jeremy Allison --- 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);