mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
common: use mount/umount helpers everywhere
Replace every explicit mount/umount of scratch or test devices with helper functions. This allows the next patch to add in hooks to these functions in order to set up & tear down overlayfs on every mount/umount (also adds _test_unmount(), which didn't exist prior) [Eryu Guan rebased the patch agains latest master and replaced more mount/umount with helpers] Signed-off-by: Eryu Guan <eguan@redhat.com> Signed-off-by: Eric Sandeen <esandeen@redhat.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
4545386ca0
commit
27d077ec0b
+3
-3
@@ -40,7 +40,7 @@ status=1 # failure is the default!
|
||||
_cleanup()
|
||||
{
|
||||
cd /
|
||||
umount $SCRATCH_MNT 2>/dev/null
|
||||
_scratch_unmount 2>/dev/null
|
||||
rm -f $tmp.*
|
||||
}
|
||||
trap "_cleanup; exit \$status" 0 1 2 3 15
|
||||
@@ -225,7 +225,7 @@ _exercise g
|
||||
_exercise u
|
||||
|
||||
echo "*** unmount"
|
||||
umount $SCRATCH_MNT
|
||||
_scratch_unmount
|
||||
|
||||
|
||||
_scratch_mkfs_xfs -m crc=1 2>/dev/null | _filter_mkfs 2>$tmp.mkfs
|
||||
@@ -241,7 +241,7 @@ _exercise gno
|
||||
_exercise pno
|
||||
|
||||
echo "*** unmount"
|
||||
umount $SCRATCH_MNT
|
||||
_scratch_unmount
|
||||
|
||||
# success, all done
|
||||
status=0
|
||||
|
||||
Reference in New Issue
Block a user