#!/usr/bin/env bash # # Blackbox test for shadow_copy2 VFS - SMB1 only. # if [ $# -lt 7 ]; then cat <$destdir/foo } # build a snapshots directory build_snapshots() { local snapdir snapdir=$WORKDIR/.snapshots mkdir -p $snapdir mkdir $snapdir/$SNAPSHOT build_files $snapdir/$SNAPSHOT } 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 over SMB1" \ $SMBTORTURE \ -U$USERNAME%$PASSWORD \ "//$SERVER/shadow_write" \ --option="torture:twrp_snapshot=$SNAPSHOT" \ base.smb1-twrp-openroot || failed=$(expr $failed + 1) } build_files $WORKDIR # test open for writing and write behaviour of snapshoted files test_shadow_copy_openroot "opening root of shadow copy share" exit $failed