3 # Blackbox test for shadow_copy2 VFS.
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 # build a hierarchy of files, symlinks, and directories
35 echo "$content" > $destdir/foo
38 # build a snapshots directory
43 snapdir=$WORKDIR/.snapshots
46 mkdir $snapdir/$SNAPSHOT
48 build_files $snapdir/$SNAPSHOT
51 test_shadow_copy_write()
57 #delete snapshots from previous tests
58 find $WORKDIR -name ".snapshots" -exec rm -rf {} \; 1>/dev/null 2>&1
61 testit "writing to shadow copy of a file" \
63 -U$USERNAME%$PASSWORD \
64 "//$SERVER/shadow_write" \
65 --option="torture:twrp_file=foo" \
66 --option="torture:twrp_snapshot=$SNAPSHOT" \
68 failed=`expr $failed + 1`
73 # test open for writing and write behaviour of snapshoted files
74 test_shadow_copy_write "write behaviour of snapshoted files"