smbtorture Remove random file name before we start RW2
authorAndrew Bartlett <abartlet@samba.org>
Tue, 22 Feb 2011 00:21:53 +0000 (11:21 +1100)
committerJeremy Allison <jra@samba.org>
Wed, 23 Feb 2011 00:47:08 +0000 (16:47 -0800)
(cherry picked from commit b73cfabdf5cc28a91a72df8b64cf57021e08f0b0)

source3/torture/torture.c

index 73b75bbe3bbf3a9ba2c98091a66246dffa91c411..2670485bcca7597e761c42c0dd5be1f13f026879 100644 (file)
@@ -677,6 +677,10 @@ static bool rw_torture3(struct cli_state *c, char *lockfname)
 
        if (procnum == 0)
        {
+               if (!NT_STATUS_IS_OK(cli_unlink(c, lockfname, aSYSTEM | aHIDDEN))) {
+                       printf("unlink failed (%s) (normal, this file should not exist)\n", cli_errstr(c));
+               }
+
                if (!NT_STATUS_IS_OK(cli_open(c, lockfname, O_RDWR | O_CREAT | O_EXCL, 
                                 DENY_NONE, &fnum))) {
                        printf("first open read/write of %s failed (%s)\n",