CI: add two tests for shadow_copy2 VFS module
authorRalph Boehme <slow@samba.org>
Tue, 21 Apr 2020 11:06:03 +0000 (13:06 +0200)
committerRalph Boehme <slow@samba.org>
Wed, 6 May 2020 10:18:38 +0000 (10:18 +0000)
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 <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
selftest/knownfail.d/samba3.blackbox.shadow_copy2 [new file with mode: 0644]
source3/script/tests/test_shadow_copy.sh

diff --git a/selftest/knownfail.d/samba3.blackbox.shadow_copy2 b/selftest/knownfail.d/samba3.blackbox.shadow_copy2
new file mode 100644 (file)
index 0000000..f869dc8
--- /dev/null
@@ -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\)$
index eba873f6525be89b5be5752f0e1ba58af5fa9de0..fe4bcb8720e3bad5a82a5ab29dc0e81f11530ddb 100755 (executable)
@@ -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`