mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
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:
committed by
Dave Chinner
parent
aa69397ed1
commit
813524b566
+11
-11
@@ -51,25 +51,25 @@ 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"
|
||||
|
||||
loops=1024
|
||||
nr_loops=$((loops - 1))
|
||||
BLKSZ=65536
|
||||
blksz=65536
|
||||
|
||||
echo "Initialize files"
|
||||
echo > "$seqres.full"
|
||||
_pwrite_byte 0x61 0 $((loops * BLKSZ)) "$TESTDIR/file1" >> "$seqres.full"
|
||||
_pwrite_byte 0x62 0 $((loops * BLKSZ)) "$TESTDIR/file2" >> "$seqres.full"
|
||||
_pwrite_byte 0x61 0 $((loops * blksz)) "$testdir/file1" >> "$seqres.full"
|
||||
_pwrite_byte 0x62 0 $((loops * blksz)) "$testdir/file2" >> "$seqres.full"
|
||||
_scratch_remount
|
||||
|
||||
# Direct I/O overwriter...
|
||||
overwrite() {
|
||||
while [ ! -e "$TESTDIR/finished" ]; do
|
||||
while [ ! -e "$testdir/finished" ]; do
|
||||
seq $nr_loops -1 0 | while read i; do
|
||||
_pwrite_byte 0x63 $((i * BLKSZ)) $BLKSZ -d "$TESTDIR/file2" >> "$seqres.full"
|
||||
_pwrite_byte 0x63 $((i * blksz)) $blksz -d "$testdir/file2" >> "$seqres.full"
|
||||
done
|
||||
done
|
||||
}
|
||||
@@ -78,12 +78,12 @@ echo "Reflink and dio write the target"
|
||||
overwrite &
|
||||
seq 1 10 | while read j; do
|
||||
seq 0 $nr_loops | while read i; do
|
||||
_reflink_range "$TESTDIR/file1" $((i * BLKSZ)) \
|
||||
"$TESTDIR/file2" $((i * BLKSZ)) $BLKSZ >> "$seqres.full"
|
||||
_reflink_range "$testdir/file1" $((i * blksz)) \
|
||||
"$testdir/file2" $((i * blksz)) $blksz >> "$seqres.full"
|
||||
[ $? -ne 0 ] && exit
|
||||
done
|
||||
done
|
||||
touch "$TESTDIR/finished"
|
||||
touch "$testdir/finished"
|
||||
wait
|
||||
|
||||
echo "Check for damage"
|
||||
|
||||
Reference in New Issue
Block a user