From be54395832f9c79180a2228c5d7099ddae0fa37f Mon Sep 17 00:00:00 2001 From: Aurélien Aptel Date: Thu, 27 Jun 2013 15:07:42 +0200 Subject: test_smbclient_tarmode.pl: improve incremental test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: David Disseldorp Reviewed-by: Jim McDonough --- source3/script/tests/test_smbclient_tarmode.pl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'source3/script') 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)); } } -- cgit