mirror of
https://github.com/samba-team/samba.git
synced 2025-02-10 13:57:47 +03:00
test_smbclient_tarmode.pl: improve incremental test
instead of using archived and non-archived files for the test, use archive and various flags (system, hidden, readonly). Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jim McDonough <jmcd@samba.org>
This commit is contained in:
parent
947775ee00
commit
be54395832
@ -139,7 +139,7 @@ sub test_creation_incremental {
|
||||
say "TEST: creation -- incremental w/ $mode (backup only archived files)";
|
||||
|
||||
my %files;
|
||||
my $n = 5;
|
||||
my $n = 10;
|
||||
for(1..$n) {
|
||||
my $f = "file-$_";
|
||||
my $md5 = create_file(localpath($f));
|
||||
@ -149,6 +149,9 @@ sub test_creation_incremental {
|
||||
$files{"./$DIR/$f"} = $md5;
|
||||
set_attr(remotepath($f), 'a');
|
||||
}
|
||||
else {
|
||||
set_attr(remotepath($f), ((qw/n r s h/)[$_ % 4]))
|
||||
}
|
||||
}
|
||||
|
||||
if($mode =~ /inc/) {
|
||||
@ -399,7 +402,7 @@ sub set_attr {
|
||||
my ($file, $dir) = fileparse($fullpath);
|
||||
|
||||
smb_client('-D', $dir, '-c', qq{setmode "$file" -rsha});
|
||||
if(@flags) {
|
||||
if(@flags && $flags[0] !~ /n/i) {
|
||||
smb_client('-D', $dir, '-c', qq{setmode "$file" +}.join('', @flags));
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user