mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
fstests: use _scratch_shutdown instead of calling src/godown
Overlayfs introduces some complexity with regards to what path we have to use to shut down the scratch filesystem: it's SCRATCH_MNT for regular filesystems, but it's OVL_BASE_SCRATCH_MNT (i.e. the lower mount of the overlay) if overlayfs is enabled. The helper works through all that, so we might as well use it. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
This commit is contained in:
committed by
Eryu Guan
parent
afeb3b711c
commit
58937c3f24
+1
-1
@@ -92,7 +92,7 @@ echo "touch files"
|
||||
touch $SCRATCH_MNT/{0,1,2,3,4,5,6,7,8,9}{0,1,2,3,4,5,6,7,8,9}
|
||||
|
||||
echo "going down:"
|
||||
src/godown -f $SCRATCH_MNT
|
||||
_scratch_shutdown -f
|
||||
|
||||
echo "unmounting shutdown filesystem:"
|
||||
_scratch_unmount 2>&1 | _filter_scratch
|
||||
|
||||
+1
-1
@@ -47,7 +47,7 @@ _scratch_mount
|
||||
# recovery.
|
||||
$FSSTRESS_PROG -n 9999 -p 2 -w -d $SCRATCH_MNT > /dev/null 2>&1 &
|
||||
sleep 5
|
||||
src/godown -f $SCRATCH_MNT
|
||||
_scratch_shutdown -f
|
||||
$KILLALL_PROG -q $FSSTRESS_PROG
|
||||
wait
|
||||
_scratch_unmount
|
||||
|
||||
+1
-1
@@ -56,7 +56,7 @@ _scratch_mount "-o logbsize=32k"
|
||||
# Run a workload to dirty the log, wait a bit and shutdown the fs.
|
||||
$FSSTRESS_PROG -d $SCRATCH_MNT -p 4 -n 99999999 >> $seqres.full 2>&1 &
|
||||
sleep 10
|
||||
./src/godown -f $SCRATCH_MNT
|
||||
_scratch_shutdown -f
|
||||
wait
|
||||
|
||||
# Remount with a different log buffer size. Going from 32k to 64k increases the
|
||||
|
||||
+2
-2
@@ -52,7 +52,7 @@ src/multi_open_unlink -f $SCRATCH_MNT/test_file -n $num_files -s $delay &
|
||||
sleep 3
|
||||
|
||||
echo "godown"
|
||||
src/godown -v -f $SCRATCH_MNT >> $seqres.full
|
||||
_scratch_shutdown -v -f >> $seqres.full
|
||||
|
||||
# time for multi_open_unlink to exit out after its delay
|
||||
# so we have no references and can unmount
|
||||
@@ -69,7 +69,7 @@ _try_scratch_mount $mnt >>$seqres.full 2>&1 \
|
||||
|| _fail "mount failed: $mnt $MOUNT_OPTIONS"
|
||||
|
||||
echo "godown"
|
||||
src/godown -v -f $SCRATCH_MNT >> $seqres.full
|
||||
_scratch_shutdown -v -f >> $seqres.full
|
||||
|
||||
echo "unmount"
|
||||
_scratch_unmount
|
||||
|
||||
+2
-2
@@ -65,7 +65,7 @@ pid=$!
|
||||
sleep 10
|
||||
|
||||
echo "godown"
|
||||
src/godown -v -f $SCRATCH_MNT >> $seqres.full
|
||||
_scratch_shutdown -v -f >> $seqres.full
|
||||
|
||||
# kill the multi_open_unlink
|
||||
kill $pid 2>/dev/null
|
||||
@@ -83,7 +83,7 @@ _scratch_mount $mnt >>$seqres.full 2>&1 \
|
||||
|| _fail "mount failed: $mnt $MOUNT_OPTIONS"
|
||||
|
||||
echo "godown"
|
||||
src/godown -v -f $SCRATCH_MNT >> $seqres.full
|
||||
_scratch_shutdown -v -f >> $seqres.full
|
||||
|
||||
echo "unmount"
|
||||
_scratch_unmount
|
||||
|
||||
Reference in New Issue
Block a user