tests: use lowercase variables for all the new reflink tests

Since $TESTDIR is a local variable, make it lowercase to avoid
confusion with $TEST_DIR.  While we're at it, make all the local
variables lowercase.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
This commit is contained in:
Darrick J. Wong
2016-02-08 09:27:15 +11:00
committed by Dave Chinner
parent aa69397ed1
commit 813524b566
89 changed files with 2290 additions and 2290 deletions
+16 -16
View File
@@ -32,7 +32,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
_cleanup()
{
cd /
rm -rf "$tmp".* "$TESTDIR"
rm -rf "$tmp".* "$testdir"
}
# get standard environment, filters and checks
@@ -51,31 +51,31 @@ echo "Format and mount"
_scratch_mkfs > "$seqres.full" 2>&1
_scratch_mount >> "$seqres.full" 2>&1
TESTDIR="$SCRATCH_MNT/test-$seq"
rm -rf $TESTDIR
mkdir $TESTDIR
testdir="$SCRATCH_MNT/test-$seq"
rm -rf $testdir
mkdir $testdir
echo "Create the original files"
BLKSZ=65536
_pwrite_byte 0x61 0 $((BLKSZ + 17)) "$TESTDIR/file1" >> "$seqres.full"
_cp_reflink "$TESTDIR/file1" "$TESTDIR/file2"
_pwrite_byte 0x61 0 $((BLKSZ + 17)) "$TESTDIR/file2.chk" >> "$seqres.full"
blksz=65536
_pwrite_byte 0x61 0 $((blksz + 17)) "$testdir/file1" >> "$seqres.full"
_cp_reflink "$testdir/file1" "$testdir/file2"
_pwrite_byte 0x61 0 $((blksz + 17)) "$testdir/file2.chk" >> "$seqres.full"
_scratch_remount
echo "Compare files"
md5sum "$TESTDIR/file1" | _filter_scratch
md5sum "$TESTDIR/file2" | _filter_scratch
md5sum "$TESTDIR/file2.chk" | _filter_scratch
md5sum "$testdir/file1" | _filter_scratch
md5sum "$testdir/file2" | _filter_scratch
md5sum "$testdir/file2.chk" | _filter_scratch
echo "CoW and unmount"
"$XFS_IO_PROG" -f -c "pwrite -S 0x63 $((BLKSZ + 17)) 17" "$TESTDIR/file2" >> "$seqres.full"
"$XFS_IO_PROG" -f -c "pwrite -S 0x63 $((BLKSZ + 17)) 17" "$TESTDIR/file2.chk" >> "$seqres.full"
"$XFS_IO_PROG" -f -c "pwrite -S 0x63 $((blksz + 17)) 17" "$testdir/file2" >> "$seqres.full"
"$XFS_IO_PROG" -f -c "pwrite -S 0x63 $((blksz + 17)) 17" "$testdir/file2.chk" >> "$seqres.full"
_scratch_remount
echo "Compare files"
md5sum "$TESTDIR/file1" | _filter_scratch
md5sum "$TESTDIR/file2" | _filter_scratch
md5sum "$TESTDIR/file2.chk" | _filter_scratch
md5sum "$testdir/file1" | _filter_scratch
md5sum "$testdir/file2" | _filter_scratch
md5sum "$testdir/file2.chk" | _filter_scratch
echo "Check for damage"
umount "$SCRATCH_MNT"