3 # Blackbox test for shadow_copy2 VFS - SMB1 only.
8 Usage: test_shadow_copy SERVER SERVER_IP DOMAIN USERNAME PASSWORD WORKDIR SMBTORTURE
19 SMBTORTURE
="$VALGRIND ${7}"
22 incdir
=$
(dirname $0)/..
/..
/..
/testprogs
/blackbox
25 SNAPSHOT
="@GMT-2015.10.31-19.40.30"
29 cd $SELFTEST_TMPDIR ||
exit 1
31 # build a hierarchy of files, symlinks, and directories
37 echo "$content" >$destdir/foo
40 # build a snapshots directory
45 snapdir
=$WORKDIR/.snapshots
48 mkdir
$snapdir/$SNAPSHOT
50 build_files
$snapdir/$SNAPSHOT
53 test_shadow_copy_openroot
()
59 #delete snapshots from previous tests
60 find $WORKDIR -name ".snapshots" -exec rm -rf {} \
; 1>/dev
/null
2>&1
63 testit
"opening shadow copy root of share over SMB1" \
65 -U$USERNAME%$PASSWORD \
66 "//$SERVER/shadow_write" \
67 --option="torture:twrp_snapshot=$SNAPSHOT" \
68 base.smb1-twrp-openroot ||
69 failed
=$
(expr $failed + 1)
74 # test open for writing and write behaviour of snapshoted files
75 test_shadow_copy_openroot
"opening root of shadow copy share"