]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: torture: In torture_chkpath_test(), use torture_deltree() for setup and cleanup.
authorJeremy Allison <jra@samba.org>
Thu, 2 Dec 2021 22:16:38 +0000 (14:16 -0800)
committerRalph Boehme <slow@samba.org>
Thu, 9 Dec 2021 18:06:35 +0000 (18:06 +0000)
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/torture/torture.c

index 634e84d6a9c9e8b9c457ff6ff38bd302855c408f..fb057ba67eea1c258cd95e90d762b951d7f9366c 100644 (file)
@@ -9977,9 +9977,7 @@ bool torture_chkpath_test(int dummy)
        printf("starting chkpath test\n");
 
        /* cleanup from an old run */
-       cli_rmdir(cli, "\\chkpath.dir\\dir2");
-       cli_unlink(cli, "\\chkpath.dir\\*", FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN);
-       cli_rmdir(cli, "\\chkpath.dir");
+       torture_deltree(cli, "\\chkpath.dir");
 
        status = cli_mkdir(cli, "\\chkpath.dir");
        if (!NT_STATUS_IS_OK(status)) {
@@ -10040,9 +10038,7 @@ bool torture_chkpath_test(int dummy)
                ret = False;
        }
 
-       cli_rmdir(cli, "\\chkpath.dir\\dir2");
-       cli_unlink(cli, "\\chkpath.dir\\*", FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN);
-       cli_rmdir(cli, "\\chkpath.dir");
+       torture_deltree(cli, "\\chkpath.dir");
 
        if (!torture_close_connection(cli)) {
                return False;