s3: torture: Add call to smbtorture smb2.twrp.openroot
[samba.git] / source3 / script / tests / test_shadow_copy_torture.sh
index 3b05fc50f72d0cced55dfda4078ecb3c2f582f7f..240a008350603eea83689ae114f4c7f301f9e2d7 100755 (executable)
@@ -75,6 +75,7 @@ test_shadow_copy_write()
         failed=`expr $failed + 1`
 }
 
+
 test_shadow_copy_stream()
 {
     local msg
@@ -104,6 +105,25 @@ EOF
         failed=`expr $failed + 1`
 }
 
+test_shadow_copy_openroot()
+{
+    local msg
+
+    msg=$1
+
+    #delete snapshots from previous tests
+    find $WORKDIR -name ".snapshots" -exec rm -rf {} \; 1>/dev/null 2>&1
+    build_snapshots
+
+    testit "opening shadow copy root of share" \
+          $SMBTORTURE \
+          -U$USERNAME%$PASSWORD \
+          "//$SERVER/shadow_write" \
+          --option="torture:twrp_snapshot=$SNAPSHOT" \
+          smb2.twrp.openroot || \
+        failed=`expr $failed + 1`
+}
+
 build_files $WORKDIR
 
 # test open for writing and write behaviour of snapshoted files
@@ -111,4 +131,6 @@ test_shadow_copy_write "write behaviour of snapshoted files"
 
 test_shadow_copy_stream "reading stream of snapshotted file"
 
+test_shadow_copy_openroot "opening root of shadow copy share"
+
 exit $failed