From f23992c09a6fb4f5647e6805e1701000ca1dffa8 Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Tue, 21 Apr 2020 13:06:03 +0200 Subject: [PATCH] CI: add two tests for shadow_copy2 VFS module Note that the test "fetch a previous version of a regular file via non-canonical basepath" doesn't fail by "luck" because it runs into the "creating file" optimisation in unix_convert(). BUG: https://bugzilla.samba.org/show_bug.cgi?id=14350 Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison (cherry picked from commit 6557777c86d72a185b3fe4061a8b5791fd748924) --- selftest/knownfail.d/samba3.blackbox.shadow_copy2 | 4 ++++ source3/script/tests/test_shadow_copy.sh | 12 ++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 selftest/knownfail.d/samba3.blackbox.shadow_copy2 diff --git a/selftest/knownfail.d/samba3.blackbox.shadow_copy2 b/selftest/knownfail.d/samba3.blackbox.shadow_copy2 new file mode 100644 index 00000000000..f869dc899ab --- /dev/null +++ b/selftest/knownfail.d/samba3.blackbox.shadow_copy2 @@ -0,0 +1,4 @@ +^samba3.blackbox.shadow_copy2.NT1.fetch a previous version of a regular file via non-canonical parent path\(fileserver_smb1_done\)$ +^samba3.blackbox.shadow_copy2.SMB3.fetch a previous version of a regular file via non-canonical parent path\(fileserver\)$ +^samba3.blackbox.shadow_copy2.NT1.fetch a previous version of a regular file via non-canonical path\(fileserver_smb1_done\)$ +^samba3.blackbox.shadow_copy2.SMB3.fetch a previous version of a regular file via non-canonical path\(fileserver\)$ diff --git a/source3/script/tests/test_shadow_copy.sh b/source3/script/tests/test_shadow_copy.sh index eba873f6525..fe4bcb8720e 100755 --- a/source3/script/tests/test_shadow_copy.sh +++ b/source3/script/tests/test_shadow_copy.sh @@ -333,6 +333,18 @@ test_shadow_copy_everywhere() test_fetch_snap_file $share "bar/baz" 6 || \ failed=`expr $failed + 1` + testit "fetch a previous version of a regular file via non-canonical parent path" \ + test_fetch_snap_file $share "BAR/baz" 6 || \ + failed=`expr $failed + 1` + + testit "fetch a previous version of a regular file via non-canonical basepath" \ + test_fetch_snap_file $share "bar/BAZ" 6 || \ + failed=`expr $failed + 1` + + testit "fetch a previous version of a regular file via non-canonical path" \ + test_fetch_snap_file $share "BAR/BAZ" 6 || \ + failed=`expr $failed + 1` + testit_expect_failure "fetch a (non-existent) previous version of a symlink" \ test_fetch_snap_file $share "bar/lfoo" 6 || \ failed=`expr $failed + 1` -- 2.47.2