1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-04 17:47:26 +03:00

s3/script/tests: call smbclient deltree to remove remote files

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14581

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Noel Power 2020-11-30 10:41:57 +00:00 committed by Jeremy Allison
parent 363bfa4e1c
commit 6c7dc4959f

View File

@ -303,6 +303,8 @@ sub test_creation_attr {
@inc = grep { $_->attr('a') && !$_->attr_any('h', 's') } @all;
smb_tar('tarmode inc nohidden nosystem', '-Tc', $TAR, $DIR);
$err += check_tar($TAR, \@inc);
# adjust attr so remote files can be deleted with deltree
File::walk(sub { $_->set_attr(qw/n r s h/) }, File::tree($DIR));
$err;
}
@ -398,7 +400,10 @@ sub test_creation_incremental {
} else {
smb_tar('', '-Tcg', $TAR, $DIR);
}
return check_tar($TAR, \@files);
my $res = check_tar($TAR, \@files);
# adjust attr so remote files can be deleted with deltree
File::walk(sub { $_->set_attr(qw/n r s h/) }, File::tree($DIR));
return $res
}
@ -916,7 +921,7 @@ Remove all files in the server C<$DIR> (not root)
sub reset_remote {
# remove_tree($LOCALPATH . '/'. $DIR);
# make_path($LOCALPATH . '/'. $DIR);
remove_tree($LOCALPATH, {keep_root => 1});
smb_client_cmd(0, '-c', "deltree ./*");
}
=head3 C<reset_tmp( )>