diff options
author | Aurélien Aptel <aurelien.aptel@gmail.com> | 2013-06-27 15:07:42 +0200 |
---|---|---|
committer | Jim McDonough <jmcd@samba.org> | 2013-11-05 08:42:40 -0500 |
commit | be54395832f9c79180a2228c5d7099ddae0fa37f (patch) | |
tree | f560fa0bab816513a4221c9e34f6f7ebf52600e0 /source3/script/tests | |
parent | 947775ee00632a67b8b088a544bc3474b7e2f8df (diff) | |
download | samba-be54395832f9c79180a2228c5d7099ddae0fa37f.tar.gz samba-be54395832f9c79180a2228c5d7099ddae0fa37f.tar.xz samba-be54395832f9c79180a2228c5d7099ddae0fa37f.zip |
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>
Diffstat (limited to 'source3/script/tests')
-rwxr-xr-x | source3/script/tests/test_smbclient_tarmode.pl | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source3/script/tests/test_smbclient_tarmode.pl b/source3/script/tests/test_smbclient_tarmode.pl index 90c3fb66782..db5df83dc3e 100755 --- a/source3/script/tests/test_smbclient_tarmode.pl +++ b/source3/script/tests/test_smbclient_tarmode.pl @@ -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)); } } |