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
+17 -17
View File
@@ -37,7 +37,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
@@ -52,37 +52,37 @@ _require_cp_reflink
rm -f "$seqres.full"
TESTDIR="$TEST_DIR/test-$seq"
rm -rf "$TESTDIR"
mkdir "$TESTDIR"
testdir="$TEST_DIR/test-$seq"
rm -rf "$testdir"
mkdir "$testdir"
echo "Create the original file blocks"
BLKSZ=65536
NR=9
_pwrite_byte 0x61 0 $((BLKSZ * 256)) "$TESTDIR/file1" >> "$seqres.full"
blksz=65536
nr=9
_pwrite_byte 0x61 0 $((blksz * 256)) "$testdir/file1" >> "$seqres.full"
_test_remount
md5sum "$TESTDIR/file1" | _filter_test_dir
csum="$(_md5_checksum "$TESTDIR/file1")"
md5sum "$testdir/file1" | _filter_test_dir
csum="$(_md5_checksum "$testdir/file1")"
echo "Create the reflink copies"
seq 2 $NR | while read i; do
_cp_reflink "$TESTDIR/file1" "$TESTDIR/file$i"
seq 2 $nr | while read i; do
_cp_reflink "$testdir/file1" "$testdir/file$i"
done
_test_remount
echo "Rewrite the copies"
seq 2 $NR | while read i; do
_pwrite_byte 0x62 0 $((BLKSZ * 256)) "$TESTDIR/file$i" -d >> "$seqres.full"
seq 2 $nr | while read i; do
_pwrite_byte 0x62 0 $((blksz * 256)) "$testdir/file$i" -d >> "$seqres.full"
done
_test_remount
echo "Examine original file"
md5sum "$TESTDIR/file1" | _filter_test_dir
md5sum "$TESTDIR/file2" | _filter_test_dir
md5sum "$testdir/file1" | _filter_test_dir
md5sum "$testdir/file2" | _filter_test_dir
mod_csum="$(_md5_checksum "$TESTDIR/file2")"
new_csum="$(_md5_checksum "$TESTDIR/file1")"
mod_csum="$(_md5_checksum "$testdir/file2")"
new_csum="$(_md5_checksum "$testdir/file1")"
test "${csum}" != "${mod_csum}" || echo "checksums do not match"
test "${csum}" = "${new_csum}" || echo "checksums do not match"