* [PATCH 1/6] misc: convert all $UMOUNT_PROG to a _umount helper
2024-12-31 23:35 ` [PATCHSET 4/5] fstests: live health monitoring of filesystems Darrick J. Wong
@ 2024-12-31 23:57 ` Darrick J. Wong
2024-12-31 23:57 ` [PATCH 2/6] misc: convert all umount(1) invocations to _umount Darrick J. Wong
` (4 subsequent siblings)
5 siblings, 0 replies; 24+ messages in thread
From: Darrick J. Wong @ 2024-12-31 23:57 UTC (permalink / raw)
To: zlang, djwong; +Cc: fstests, linux-xfs
From: Darrick J. Wong <djwong@kernel.org>
We're going to start collecting ephemeral(ish) filesystem stats in the
next patch, so switch all the $UMOUNT_PROG to a helper.
sed -e 's/$UMOUNT_PROG/_umount/g' -i $(git ls-files common tests check)
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
common/btrfs | 2 +-
common/dmdelay | 4 ++--
common/dmdust | 4 ++--
common/dmerror | 2 +-
common/dmflakey | 4 ++--
common/dmhugedisk | 2 +-
common/dmlogwrites | 4 ++--
common/dmthin | 4 ++--
common/overlay | 10 +++++-----
common/rc | 33 +++++++++++++++++++--------------
tests/btrfs/020 | 2 +-
tests/btrfs/029 | 2 +-
tests/btrfs/031 | 2 +-
tests/btrfs/060 | 2 +-
tests/btrfs/065 | 2 +-
tests/btrfs/066 | 2 +-
tests/btrfs/067 | 2 +-
tests/btrfs/068 | 2 +-
tests/btrfs/075 | 2 +-
tests/btrfs/089 | 2 +-
tests/btrfs/124 | 2 +-
tests/btrfs/125 | 2 +-
tests/btrfs/185 | 4 ++--
tests/btrfs/197 | 4 ++--
tests/btrfs/219 | 12 ++++++------
tests/btrfs/254 | 2 +-
tests/ext4/032 | 4 ++--
tests/ext4/052 | 4 ++--
tests/ext4/053 | 32 ++++++++++++++++----------------
tests/ext4/056 | 2 +-
tests/generic/042 | 4 ++--
tests/generic/067 | 6 +++---
tests/generic/081 | 2 +-
tests/generic/085 | 4 ++--
tests/generic/108 | 2 +-
tests/generic/361 | 2 +-
tests/generic/373 | 2 +-
tests/generic/374 | 2 +-
tests/generic/459 | 2 +-
tests/generic/604 | 2 ++
tests/generic/648 | 6 +++---
tests/generic/698 | 4 ++--
tests/generic/699 | 8 ++++----
tests/generic/704 | 2 +-
tests/generic/730 | 2 +-
tests/generic/731 | 2 +-
tests/generic/732 | 4 ++--
tests/generic/746 | 8 ++++----
tests/overlay/003 | 2 +-
tests/overlay/004 | 2 +-
tests/overlay/005 | 6 +++---
tests/overlay/014 | 4 ++--
tests/overlay/022 | 2 +-
tests/overlay/025 | 4 ++--
tests/overlay/029 | 6 +++---
tests/overlay/031 | 8 ++++----
tests/overlay/035 | 2 +-
tests/overlay/036 | 8 ++++----
tests/overlay/037 | 6 +++---
tests/overlay/040 | 2 +-
tests/overlay/041 | 2 +-
tests/overlay/042 | 2 +-
tests/overlay/043 | 2 +-
tests/overlay/044 | 2 +-
tests/overlay/048 | 4 ++--
tests/overlay/049 | 2 +-
tests/overlay/050 | 2 +-
tests/overlay/051 | 4 ++--
tests/overlay/052 | 2 +-
tests/overlay/053 | 4 ++--
tests/overlay/054 | 2 +-
tests/overlay/055 | 4 ++--
tests/overlay/056 | 2 +-
tests/overlay/057 | 4 ++--
tests/overlay/059 | 2 +-
tests/overlay/060 | 2 +-
tests/overlay/062 | 2 +-
tests/overlay/063 | 2 +-
tests/overlay/065 | 22 +++++++++++-----------
tests/overlay/067 | 2 +-
tests/overlay/068 | 4 ++--
tests/overlay/069 | 6 +++---
tests/overlay/070 | 6 +++---
tests/overlay/071 | 6 +++---
tests/overlay/076 | 2 +-
tests/overlay/077 | 2 +-
tests/overlay/078 | 2 +-
tests/overlay/079 | 2 +-
tests/overlay/080 | 2 +-
tests/overlay/081 | 14 +++++++-------
tests/overlay/083 | 2 +-
tests/overlay/084 | 10 +++++-----
tests/overlay/085 | 2 +-
tests/overlay/086 | 8 ++++----
tests/xfs/078 | 4 ++--
tests/xfs/148 | 6 +++---
tests/xfs/149 | 4 ++--
tests/xfs/186 | 4 ++--
tests/xfs/289 | 4 ++--
tests/xfs/507 | 2 +-
tests/xfs/513 | 4 ++--
tests/xfs/544 | 2 +-
tests/xfs/806 | 4 ++--
103 files changed, 226 insertions(+), 219 deletions(-)
diff --git a/common/btrfs b/common/btrfs
index 64f38cc240ab8b..b82c8f5a934cfd 100644
--- a/common/btrfs
+++ b/common/btrfs
@@ -352,7 +352,7 @@ _btrfs_stress_subvolume()
while [ ! -e $stop_file ]; do
$BTRFS_UTIL_PROG subvolume create $btrfs_mnt/$subvol_name
_mount -o subvol=$subvol_name $btrfs_dev $subvol_mnt
- $UMOUNT_PROG $subvol_mnt
+ _umount $subvol_mnt
$BTRFS_UTIL_PROG subvolume delete $btrfs_mnt/$subvol_name
done
}
diff --git a/common/dmdelay b/common/dmdelay
index 794ea37ba200ce..691e22538a622b 100644
--- a/common/dmdelay
+++ b/common/dmdelay
@@ -26,7 +26,7 @@ _mount_delay()
_unmount_delay()
{
- $UMOUNT_PROG $SCRATCH_MNT
+ _umount $SCRATCH_MNT
}
_cleanup_delay()
@@ -34,7 +34,7 @@ _cleanup_delay()
# If dmsetup load fails then we need to make sure to do resume here
# otherwise the umount will hang
$DMSETUP_PROG resume delay-test > /dev/null 2>&1
- $UMOUNT_PROG $SCRATCH_MNT > /dev/null 2>&1
+ _umount $SCRATCH_MNT > /dev/null 2>&1
_dmsetup_remove delay-test
}
diff --git a/common/dmdust b/common/dmdust
index 56fcc0e0fffa1e..13461c2dd3a006 100644
--- a/common/dmdust
+++ b/common/dmdust
@@ -22,7 +22,7 @@ _mount_dust()
_unmount_dust()
{
- $UMOUNT_PROG $SCRATCH_MNT
+ _umount $SCRATCH_MNT
}
_cleanup_dust()
@@ -30,6 +30,6 @@ _cleanup_dust()
# If dmsetup load fails then we need to make sure to do resume here
# otherwise the umount will hang
$DMSETUP_PROG resume dust-test > /dev/null 2>&1
- $UMOUNT_PROG $SCRATCH_MNT > /dev/null 2>&1
+ _umount $SCRATCH_MNT > /dev/null 2>&1
_dmsetup_remove dust-test
}
diff --git a/common/dmerror b/common/dmerror
index 2f006142a309fe..1e6a35230f3ccb 100644
--- a/common/dmerror
+++ b/common/dmerror
@@ -106,7 +106,7 @@ _dmerror_cleanup()
test -n "$NON_ERROR_RTDEV" && $DMSETUP_PROG resume error-rttest &>/dev/null
$DMSETUP_PROG resume error-test > /dev/null 2>&1
- $UMOUNT_PROG $SCRATCH_MNT > /dev/null 2>&1
+ _umount $SCRATCH_MNT > /dev/null 2>&1
test -n "$NON_ERROR_LOGDEV" && _dmsetup_remove error-logtest
test -n "$NON_ERROR_RTDEV" && _dmsetup_remove error-rttest
diff --git a/common/dmflakey b/common/dmflakey
index 52da3b100fbe45..64723f983b27ec 100644
--- a/common/dmflakey
+++ b/common/dmflakey
@@ -67,7 +67,7 @@ _mount_flakey()
_unmount_flakey()
{
- $UMOUNT_PROG $SCRATCH_MNT
+ _umount $SCRATCH_MNT
}
_cleanup_flakey()
@@ -78,7 +78,7 @@ _cleanup_flakey()
test -n "$NON_FLAKEY_RTDEV" && $DMSETUP_PROG resume flakey-rttest &> /dev/null
$DMSETUP_PROG resume flakey-test > /dev/null 2>&1
- $UMOUNT_PROG $SCRATCH_MNT > /dev/null 2>&1
+ _umount $SCRATCH_MNT > /dev/null 2>&1
_dmsetup_remove flakey-test
test -n "$NON_FLAKEY_LOGDEV" && _dmsetup_remove flakey-logtest
diff --git a/common/dmhugedisk b/common/dmhugedisk
index 502f0243772d52..a02bff4351d9be 100644
--- a/common/dmhugedisk
+++ b/common/dmhugedisk
@@ -39,7 +39,7 @@ _dmhugedisk_init()
_dmhugedisk_cleanup()
{
- $UMOUNT_PROG $SCRATCH_MNT > /dev/null 2>&1
+ _umount $SCRATCH_MNT > /dev/null 2>&1
_dmsetup_remove huge-test
_dmsetup_remove huge-test-zero
}
diff --git a/common/dmlogwrites b/common/dmlogwrites
index c054acb875a384..a1a5c415338276 100644
--- a/common/dmlogwrites
+++ b/common/dmlogwrites
@@ -145,7 +145,7 @@ _log_writes_mount()
_log_writes_unmount()
{
- $UMOUNT_PROG $SCRATCH_MNT
+ _umount $SCRATCH_MNT
}
# _log_writes_replay_log <mark>
@@ -177,7 +177,7 @@ _log_writes_remove()
_log_writes_cleanup()
{
- $UMOUNT_PROG $SCRATCH_MNT > /dev/null 2>&1
+ _umount $SCRATCH_MNT > /dev/null 2>&1
_log_writes_remove
}
diff --git a/common/dmthin b/common/dmthin
index 7107d50804896e..38d561c8eb25d6 100644
--- a/common/dmthin
+++ b/common/dmthin
@@ -23,7 +23,7 @@ DMTHIN_VOL_DEV="/dev/mapper/$DMTHIN_VOL_NAME"
_dmthin_cleanup()
{
- $UMOUNT_PROG $SCRATCH_MNT > /dev/null 2>&1
+ _umount $SCRATCH_MNT > /dev/null 2>&1
_dmsetup_remove $DMTHIN_VOL_NAME
_dmsetup_remove $DMTHIN_POOL_NAME
_dmsetup_remove $DMTHIN_META_NAME
@@ -32,7 +32,7 @@ _dmthin_cleanup()
_dmthin_check_fs()
{
- $UMOUNT_PROG $SCRATCH_MNT > /dev/null 2>&1
+ _umount $SCRATCH_MNT > /dev/null 2>&1
_check_scratch_fs $DMTHIN_VOL_DEV
}
diff --git a/common/overlay b/common/overlay
index da1d8d2c3183f4..2877f31e22ebd9 100644
--- a/common/overlay
+++ b/common/overlay
@@ -142,18 +142,18 @@ _overlay_base_unmount()
[ -n "$dev" -a -n "$mnt" ] || return 0
- $UMOUNT_PROG $mnt
+ _umount $mnt
}
_overlay_test_unmount()
{
- $UMOUNT_PROG $TEST_DIR
+ _umount $TEST_DIR
_overlay_base_unmount "$OVL_BASE_TEST_DEV" "$OVL_BASE_TEST_DIR"
}
_overlay_scratch_unmount()
{
- $UMOUNT_PROG $SCRATCH_MNT
+ _umount $SCRATCH_MNT
_overlay_base_unmount "$OVL_BASE_SCRATCH_DEV" "$OVL_BASE_SCRATCH_MNT"
}
@@ -342,7 +342,7 @@ _overlay_check_scratch_dirs()
# Need to umount overlay for scratch dir check
local ovl_mounted=`_is_dir_mountpoint $SCRATCH_MNT`
- [ -z "$ovl_mounted" ] || $UMOUNT_PROG $SCRATCH_MNT
+ [ -z "$ovl_mounted" ] || _umount $SCRATCH_MNT
# Check dirs with extra overlay options
_overlay_check_dirs $lowerdir $upperdir $workdir $*
@@ -387,7 +387,7 @@ _overlay_check_fs()
else
# Check and umount overlay for dir check
ovl_mounted=`_is_dir_mountpoint $ovl_mnt`
- [ -z "$ovl_mounted" ] || $UMOUNT_PROG $ovl_mnt
+ [ -z "$ovl_mounted" ] || _umount $ovl_mnt
fi
_overlay_check_dirs $base_mnt/$OVL_LOWER $base_mnt/$OVL_UPPER \
diff --git a/common/rc b/common/rc
index 0ede68eb912440..d3ee76e01db892 100644
--- a/common/rc
+++ b/common/rc
@@ -233,6 +233,11 @@ _mount()
return $ret
}
+_umount()
+{
+ $UMOUNT_PROG $*
+}
+
# Call _mount to do mount operation but also save mountpoint to
# MOUNTED_POINT_STACK. Note that the mount point must be the last parameter
_get_mount()
@@ -266,7 +271,7 @@ _put_mount()
local last_mnt=`echo $MOUNTED_POINT_STACK | awk '{print $1}'`
if [ -n "$last_mnt" ]; then
- $UMOUNT_PROG $last_mnt
+ _umount $last_mnt
fi
MOUNTED_POINT_STACK=`echo $MOUNTED_POINT_STACK | cut -d\ -f2-`
}
@@ -275,7 +280,7 @@ _put_mount()
_clear_mount_stack()
{
if [ -n "$MOUNTED_POINT_STACK" ]; then
- $UMOUNT_PROG $MOUNTED_POINT_STACK
+ _umount $MOUNTED_POINT_STACK
fi
MOUNTED_POINT_STACK=""
}
@@ -420,20 +425,20 @@ _scratch_unmount()
_overlay_scratch_unmount
;;
btrfs)
- $UMOUNT_PROG $SCRATCH_MNT
+ _umount $SCRATCH_MNT
;;
tmpfs)
$UMOUNT_PROG $SCRATCH_MNT
;;
*)
- $UMOUNT_PROG $SCRATCH_DEV
+ _umount $SCRATCH_DEV
;;
esac
}
_scratch_umount_idmapped()
{
- $UMOUNT_PROG $SCRATCH_MNT
+ _umount $SCRATCH_MNT
}
_scratch_remount()
@@ -457,7 +462,7 @@ _scratch_cycle_mount()
;;
overlay)
if [ "$OVL_BASE_FSTYP" = tmpfs ]; then
- $UMOUNT_PROG $SCRATCH_MNT
+ _umount $SCRATCH_MNT
unmounted=true
fi
;;
@@ -505,9 +510,9 @@ _move_mount()
# Replace $mnt with $tmp. Use a temporary bind-mount because
# mount --move will fail with certain mount propagation layouts.
- $UMOUNT_PROG $mnt || _fail "Failed to unmount $mnt"
+ _umount $mnt || _fail "Failed to unmount $mnt"
_mount --bind $tmp $mnt || _fail "Failed to bind-mount $tmp to $mnt"
- $UMOUNT_PROG $tmp || _fail "Failed to unmount $tmp"
+ _umount $tmp || _fail "Failed to unmount $tmp"
rmdir $tmp
}
@@ -573,7 +578,7 @@ _test_unmount()
if [ "$FSTYP" == "overlay" ]; then
_overlay_test_unmount
else
- $UMOUNT_PROG $TEST_DEV
+ _umount $TEST_DEV
fi
}
@@ -587,7 +592,7 @@ _test_cycle_mount()
;;
overlay)
if [ "$OVL_BASE_FSTYP" = tmpfs ]; then
- $UMOUNT_PROG $TEST_DIR
+ _umount $TEST_DIR
unmounted=true
fi
;;
@@ -1375,7 +1380,7 @@ _repair_scratch_fs()
# Fall through to repair base fs
dev=$OVL_BASE_SCRATCH_DEV
fstyp=$OVL_BASE_FSTYP
- $UMOUNT_PROG $OVL_BASE_SCRATCH_MNT
+ _umount $OVL_BASE_SCRATCH_MNT
fi
# Let's hope fsck -y suffices...
fsck -t $fstyp -y $dev 2>&1
@@ -2189,7 +2194,7 @@ _require_logdev()
_notrun "This test requires USE_EXTERNAL to be enabled"
# ensure its not mounted
- $UMOUNT_PROG $SCRATCH_LOGDEV 2>/dev/null
+ _umount $SCRATCH_LOGDEV 2>/dev/null
}
# This test requires that an external log device is not in use
@@ -3281,7 +3286,7 @@ _umount_or_remount_ro()
local mountpoint=`_is_dev_mounted $device`
if [ $USE_REMOUNT -eq 0 ]; then
- $UMOUNT_PROG $device
+ _umount $device
else
_remount $device ro
fi
@@ -3799,7 +3804,7 @@ _require_scratch_dev_pool()
_notrun "$i is part of TEST_DEV, this test requires unique disks"
fi
if _mount | grep -q $i; then
- if ! $UMOUNT_PROG $i; then
+ if ! _umount $i; then
echo "failed to unmount $i - aborting"
exit 1
fi
diff --git a/tests/btrfs/020 b/tests/btrfs/020
index 7e5c6fd7b25229..f6fadab1f00bdb 100755
--- a/tests/btrfs/020
+++ b/tests/btrfs/020
@@ -17,7 +17,7 @@ _cleanup()
{
cd /
rm -f $tmp.*
- $UMOUNT_PROG $loop_mnt
+ _umount $loop_mnt
_destroy_loop_device $loop_dev1
losetup -d $loop_dev2 >/dev/null 2>&1
_destroy_loop_device $loop_dev3
diff --git a/tests/btrfs/029 b/tests/btrfs/029
index c37ad63fb613db..9799b275250e5a 100755
--- a/tests/btrfs/029
+++ b/tests/btrfs/029
@@ -74,7 +74,7 @@ cp --reflink=always $orig_file $copy_file >> $seqres.full 2>&1 || echo "cp refli
md5sum $orig_file | _filter_testdir_and_scratch
md5sum $copy_file | _filter_testdir_and_scratch
-$UMOUNT_PROG $reflink_test_dir
+_umount $reflink_test_dir
# success, all done
status=0
diff --git a/tests/btrfs/031 b/tests/btrfs/031
index 8ac73d3a86e70b..92c1d26f865ba9 100755
--- a/tests/btrfs/031
+++ b/tests/btrfs/031
@@ -99,7 +99,7 @@ mv $testdir2/file* $subvol2/
echo "Verify the file contents:"
_checksum_files
-$UMOUNT_PROG $cross_mount_test_dir
+_umount $cross_mount_test_dir
# success, all done
status=0
diff --git a/tests/btrfs/060 b/tests/btrfs/060
index 75c10bd23c36f5..0bf88f86ca822b 100755
--- a/tests/btrfs/060
+++ b/tests/btrfs/060
@@ -82,7 +82,7 @@ run_test()
fi
# in case the subvolume is still mounted
- $UMOUNT_PROG $subvol_mnt >/dev/null 2>&1
+ _umount $subvol_mnt >/dev/null 2>&1
_scratch_unmount
# we called _require_scratch_nocheck instead of _require_scratch
# do check after test for each profile config
diff --git a/tests/btrfs/065 b/tests/btrfs/065
index b87c66d6e3d45e..9cd38fefe46875 100755
--- a/tests/btrfs/065
+++ b/tests/btrfs/065
@@ -90,7 +90,7 @@ run_test()
fi
# in case the subvolume is still mounted
- $UMOUNT_PROG $subvol_mnt >/dev/null 2>&1
+ _umount $subvol_mnt >/dev/null 2>&1
_scratch_unmount
# we called _require_scratch_nocheck instead of _require_scratch
# do check after test for each profile config
diff --git a/tests/btrfs/066 b/tests/btrfs/066
index cc7cd9b7273d1c..b3db57049714ad 100755
--- a/tests/btrfs/066
+++ b/tests/btrfs/066
@@ -82,7 +82,7 @@ run_test()
fi
# in case the subvolume is still mounted
- $UMOUNT_PROG $subvol_mnt >/dev/null 2>&1
+ _umount $subvol_mnt >/dev/null 2>&1
_scratch_unmount
# we called _require_scratch_nocheck instead of _require_scratch
# do check after test for each profile config
diff --git a/tests/btrfs/067 b/tests/btrfs/067
index 0b473050027a0a..ede9abbc689fe0 100755
--- a/tests/btrfs/067
+++ b/tests/btrfs/067
@@ -83,7 +83,7 @@ run_test()
fi
# in case the subvolume is still mounted
- $UMOUNT_PROG $subvol_mnt >/dev/null 2>&1
+ _umount $subvol_mnt >/dev/null 2>&1
_scratch_unmount
# we called _require_scratch_nocheck instead of _require_scratch
# do check after test for each profile config
diff --git a/tests/btrfs/068 b/tests/btrfs/068
index 83e932e8417c0d..82dac5fd90ba85 100755
--- a/tests/btrfs/068
+++ b/tests/btrfs/068
@@ -83,7 +83,7 @@ run_test()
fi
# in case the subvolume is still mounted
- $UMOUNT_PROG $subvol_mnt >/dev/null 2>&1
+ _umount $subvol_mnt >/dev/null 2>&1
_scratch_unmount
# we called _require_scratch_nocheck instead of _require_scratch
# do check after test for each profile config
diff --git a/tests/btrfs/075 b/tests/btrfs/075
index 737c4ffdd57865..8e78bd3d4b2336 100755
--- a/tests/btrfs/075
+++ b/tests/btrfs/075
@@ -15,7 +15,7 @@ _cleanup()
{
cd /
rm -f $tmp.*
- $UMOUNT_PROG $subvol_mnt >/dev/null 2>&1
+ _umount $subvol_mnt >/dev/null 2>&1
}
. ./common/filter
diff --git a/tests/btrfs/089 b/tests/btrfs/089
index 8f8e37b6fde87b..ade38a6d189eaa 100755
--- a/tests/btrfs/089
+++ b/tests/btrfs/089
@@ -35,7 +35,7 @@ mount --bind "$SCRATCH_MNT/testvol/testdir" "$SCRATCH_MNT/testvol/mnt"
$BTRFS_UTIL_PROG subvolume delete "$SCRATCH_MNT/testvol" >>$seqres.full 2>&1
# Unmount the bind mount, which should still be alive.
-$UMOUNT_PROG "$SCRATCH_MNT/testvol/mnt"
+_umount "$SCRATCH_MNT/testvol/mnt"
echo "Silence is golden"
status=0
diff --git a/tests/btrfs/124 b/tests/btrfs/124
index af079c2864de8e..19f8bbfc6b922e 100755
--- a/tests/btrfs/124
+++ b/tests/btrfs/124
@@ -132,7 +132,7 @@ if [ "$checkpoint1" != "$checkpoint3" ]; then
echo "Inital sum does not match with data on dev2 written by balance"
fi
-$UMOUNT_PROG $dev2
+_umount $dev2
_scratch_dev_pool_put
_btrfs_rescan_devices
_test_mount
diff --git a/tests/btrfs/125 b/tests/btrfs/125
index c8c0dd422f72b6..7acef2d38cda46 100755
--- a/tests/btrfs/125
+++ b/tests/btrfs/125
@@ -144,7 +144,7 @@ if [ "$checkpoint1" != "$checkpoint3" ]; then
echo "Inital sum does not match with data on dev2 written by balance"
fi
-$UMOUNT_PROG $dev2
+_umount $dev2
_scratch_dev_pool_put
_btrfs_rescan_devices
_test_mount
diff --git a/tests/btrfs/185 b/tests/btrfs/185
index 8d0643450f5d7d..c3b52fc2dbff66 100755
--- a/tests/btrfs/185
+++ b/tests/btrfs/185
@@ -15,7 +15,7 @@ mnt=$TEST_DIR/$seq.mnt
# Override the default cleanup function.
_cleanup()
{
- $UMOUNT_PROG $mnt > /dev/null 2>&1
+ _umount $mnt > /dev/null 2>&1
rm -rf $mnt > /dev/null 2>&1
cd /
rm -f $tmp.*
@@ -62,7 +62,7 @@ $BTRFS_UTIL_PROG device scan $device_1 >> $seqres.full 2>&1
_fail "if it fails here, then it means subvolume mount at boot may fail "\
"in some configs."
-$UMOUNT_PROG $mnt > /dev/null 2>&1
+_umount $mnt > /dev/null 2>&1
_scratch_dev_pool_put
# success, all done
diff --git a/tests/btrfs/197 b/tests/btrfs/197
index 9f1d879a4e267a..913dbb2d3a50ef 100755
--- a/tests/btrfs/197
+++ b/tests/btrfs/197
@@ -15,7 +15,7 @@ _begin_fstest auto quick volume
# Override the default cleanup function.
_cleanup()
{
- $UMOUNT_PROG $TEST_DIR/$seq.mnt >/dev/null 2>&1
+ _umount $TEST_DIR/$seq.mnt >/dev/null 2>&1
rm -rf $TEST_DIR/$seq.mnt
cd /
rm -f $tmp.*
@@ -67,7 +67,7 @@ workout()
grep -q "${SCRATCH_DEV_NAME[1]}" $tmp.output && _fail "found stale device"
$BTRFS_UTIL_PROG device remove "${SCRATCH_DEV_NAME[1]}" "$TEST_DIR/$seq.mnt"
- $UMOUNT_PROG $TEST_DIR/$seq.mnt
+ _umount $TEST_DIR/$seq.mnt
_scratch_unmount
_spare_dev_put
_scratch_dev_pool_put
diff --git a/tests/btrfs/219 b/tests/btrfs/219
index 052f61a399ae66..efe5096746652a 100755
--- a/tests/btrfs/219
+++ b/tests/btrfs/219
@@ -21,8 +21,8 @@ _cleanup()
rm -f $tmp.*
# The variables are set before the test case can fail.
- $UMOUNT_PROG ${loop_mnt1} &> /dev/null
- $UMOUNT_PROG ${loop_mnt2} &> /dev/null
+ _umount ${loop_mnt1} &> /dev/null
+ _umount ${loop_mnt2} &> /dev/null
rm -rf $loop_mnt1
rm -rf $loop_mnt2
@@ -66,7 +66,7 @@ loop_dev2=`_create_loop_device $fs_img2`
# Normal single device case, should pass just fine
_mount $loop_dev1 $loop_mnt1 > /dev/null 2>&1 || \
_fail "Couldn't do initial mount"
-$UMOUNT_PROG $loop_mnt1
+_umount $loop_mnt1
_btrfs_forget_or_module_reload
@@ -75,15 +75,15 @@ _btrfs_forget_or_module_reload
# measure.
_mount $loop_dev1 $loop_mnt1 > /dev/null 2>&1 || \
_fail "Failed to mount the second time"
-$UMOUNT_PROG $loop_mnt1
+_umount $loop_mnt1
_mount $loop_dev2 $loop_mnt2 > /dev/null 2>&1 || \
_fail "We couldn't mount the old generation"
-$UMOUNT_PROG $loop_mnt2
+_umount $loop_mnt2
_mount $loop_dev1 $loop_mnt1 > /dev/null 2>&1 || \
_fail "Failed to mount the second time"
-$UMOUNT_PROG $loop_mnt1
+_umount $loop_mnt1
# Now try mount them at the same time, if kernel does not support
# temp-fsid feature then mount will fail.
diff --git a/tests/btrfs/254 b/tests/btrfs/254
index d9c9eea9c7bf23..eda32be1c2b1d1 100755
--- a/tests/btrfs/254
+++ b/tests/btrfs/254
@@ -96,7 +96,7 @@ test_add_device()
$BTRFS_UTIL_PROG filesystem show -m $SCRATCH_MNT | \
_filter_btrfs_filesystem_show
- $UMOUNT_PROG $seq_mnt
+ _umount $seq_mnt
_scratch_unmount
cleanup_dmdev
}
diff --git a/tests/ext4/032 b/tests/ext4/032
index 9a1b9312cc42cc..6e98f4f4ebb8de 100755
--- a/tests/ext4/032
+++ b/tests/ext4/032
@@ -63,7 +63,7 @@ ext4_online_resize()
fi
cat $tmp.resize2fs >> $seqres.full
echo "+++ umount fs" | tee -a $seqres.full
- $UMOUNT_PROG ${IMG_MNT}
+ _umount ${IMG_MNT}
echo "+++ check fs" | tee -a $seqres.full
_check_generic_filesystem $LOOP_DEVICE >> $seqres.full 2>&1 || \
@@ -77,7 +77,7 @@ _cleanup()
cd /
[ -n "$LOOP_DEVICE" ] && _destroy_loop_device $LOOP_DEVICE > /dev/null 2>&1
rm -f $tmp.*
- $UMOUNT_PROG ${IMG_MNT} > /dev/null 2>&1
+ _umount ${IMG_MNT} > /dev/null 2>&1
rm -f ${IMG_FILE} > /dev/null 2>&1
}
diff --git a/tests/ext4/052 b/tests/ext4/052
index edcdc02515f725..ce3f90eb7e6d02 100755
--- a/tests/ext4/052
+++ b/tests/ext4/052
@@ -18,7 +18,7 @@ _cleanup()
cd /
rm -r -f $tmp.*
if [ ! -z "$loop_mnt" ]; then
- $UMOUNT_PROG $loop_mnt
+ _umount $loop_mnt
rm -rf $loop_mnt
fi
[ ! -z "$fs_img" ] && rm -rf $fs_img
@@ -63,7 +63,7 @@ then
status=1
fi
-$UMOUNT_PROG $loop_mnt || _fail "umount failed"
+_umount $loop_mnt || _fail "umount failed"
loop_mnt=
$E2FSCK_PROG -fn $fs_img >> $seqres.full 2>&1 || _fail "file system corrupted"
diff --git a/tests/ext4/053 b/tests/ext4/053
index 4f20d217d5fd7a..0beb2201260162 100755
--- a/tests/ext4/053
+++ b/tests/ext4/053
@@ -20,7 +20,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
_cleanup()
{
cd /
- $UMOUNT_PROG $SCRATCH_MNT > /dev/null 2>&1
+ _umount $SCRATCH_MNT > /dev/null 2>&1
if [ -n "$LOOP_LOGDEV" ];then
_destroy_loop_device $LOOP_LOGDEV 2>/dev/null
fi
@@ -237,7 +237,7 @@ not_mnt() {
if simple_mount -o $1 $SCRATCH_DEV $SCRATCH_MNT; then
print_log "(mount unexpectedly succeeded)"
fail
- $UMOUNT_PROG $SCRATCH_MNT
+ _umount $SCRATCH_MNT
return
fi
ok
@@ -248,7 +248,7 @@ not_mnt() {
return
fi
not_remount $1
- $UMOUNT_PROG $SCRATCH_MNT
+ _umount $SCRATCH_MNT
}
mnt_only() {
@@ -270,7 +270,7 @@ mnt() {
fi
mnt_only $*
- $UMOUNT_PROG $SCRATCH_MNT 2> /dev/null
+ _umount $SCRATCH_MNT 2> /dev/null
[ "$t2fs" -eq 0 ] && return
@@ -289,7 +289,7 @@ mnt() {
-e 's/data=writeback/journal_data_writeback/')
$TUNE2FS_PROG -o $op_set $SCRATCH_DEV > /dev/null 2>&1
mnt_only "defaults" $check
- $UMOUNT_PROG $SCRATCH_MNT 2> /dev/null
+ _umount $SCRATCH_MNT 2> /dev/null
if [ "$op_set" = ^* ]; then
op_set=${op_set#^}
else
@@ -309,12 +309,12 @@ remount() {
do_mnt remount,$2 $3
if [ $? -ne 0 ]; then
fail
- $UMOUNT_PROG $SCRATCH_MNT 2> /dev/null
+ _umount $SCRATCH_MNT 2> /dev/null
return
else
ok
fi
- $UMOUNT_PROG $SCRATCH_MNT 2> /dev/null
+ _umount $SCRATCH_MNT 2> /dev/null
# Now just specify mnt
print_log "mounting $fstype \"$1\" "
@@ -328,7 +328,7 @@ remount() {
ok
fi
- $UMOUNT_PROG $SCRATCH_MNT 2> /dev/null
+ _umount $SCRATCH_MNT 2> /dev/null
}
# Test that the filesystem cannot be remounted with option(s) $1 (meaning that
@@ -364,7 +364,7 @@ mnt_then_not_remount() {
return
fi
not_remount $2
- $UMOUNT_PROG $SCRATCH_MNT
+ _umount $SCRATCH_MNT
}
@@ -400,8 +400,8 @@ LOGDEV_DEVNUM=`echo "${majmin%:*}*2^8 + ${majmin#*:}" | bc`
fstype=
for fstype in ext2 ext3 ext4; do
- $UMOUNT_PROG $SCRATCH_MNT 2> /dev/null
- $UMOUNT_PROG $SCRATCH_DEV 2> /dev/null
+ _umount $SCRATCH_MNT 2> /dev/null
+ _umount $SCRATCH_DEV 2> /dev/null
do_mkfs $SCRATCH_DEV ${SIZE}k
@@ -418,7 +418,7 @@ for fstype in ext2 ext3 ext4; do
continue
fi
- $UMOUNT_PROG $SCRATCH_MNT 2> /dev/null
+ _umount $SCRATCH_MNT 2> /dev/null
not_mnt failme
mnt
@@ -552,7 +552,7 @@ for fstype in ext2 ext3 ext4; do
# dax mount options
simple_mount -o dax=always $SCRATCH_DEV $SCRATCH_MNT > /dev/null 2>&1
if [ $? -eq 0 ]; then
- $UMOUNT_PROG $SCRATCH_MNT 2> /dev/null
+ _umount $SCRATCH_MNT 2> /dev/null
mnt dax
mnt dax=always
mnt dax=never
@@ -633,7 +633,7 @@ for fstype in ext2 ext3 ext4; do
not_remount jqfmt=vfsv1
not_remount noquota
mnt_only remount,usrquota,grpquota ^usrquota,^grpquota
- $UMOUNT_PROG $SCRATCH_MNT > /dev/null 2>&1
+ _umount $SCRATCH_MNT > /dev/null 2>&1
# test clearing/changing quota when enabled
do_mkfs -E quotatype=^prjquota $SCRATCH_DEV ${SIZE}k
@@ -654,7 +654,7 @@ for fstype in ext2 ext3 ext4; do
mnt_only remount,usrquota,grpquota usrquota,grpquota
quotaoff -f $SCRATCH_MNT >> $seqres.full 2>&1
mnt_only remount,noquota ^usrquota,^grpquota,quota
- $UMOUNT_PROG $SCRATCH_MNT > /dev/null 2>&1
+ _umount $SCRATCH_MNT > /dev/null 2>&1
# Quota feature
echo "== Testing quota feature " >> $seqres.full
@@ -696,7 +696,7 @@ for fstype in ext2 ext3 ext4; do
done #for fstype in ext2 ext3 ext4; do
-$UMOUNT_PROG $SCRATCH_MNT > /dev/null 2>&1
+_umount $SCRATCH_MNT > /dev/null 2>&1
echo "$ERR errors encountered" >> $seqres.full
status=$ERR
diff --git a/tests/ext4/056 b/tests/ext4/056
index 8a290b11d69772..f9cb690fdfc80b 100755
--- a/tests/ext4/056
+++ b/tests/ext4/056
@@ -70,7 +70,7 @@ do_resize()
# delay
sleep 0.2
_scratch_unmount >> $seqres.full 2>&1 \
- || _fail "$UMOUNT_PROG failed. Exiting"
+ || _fail "_umount failed. Exiting"
}
run_test()
diff --git a/tests/generic/042 b/tests/generic/042
index fd0ef705a18c3e..bea23ce29ac327 100755
--- a/tests/generic/042
+++ b/tests/generic/042
@@ -44,7 +44,7 @@ _crashtest()
_filter_xfs_io
$here/src/godown -f $mnt
- $UMOUNT_PROG $mnt
+ _umount $mnt
_mount $img $mnt
# We should /never/ see 0xCD in the file, because we wrote that pattern
@@ -54,7 +54,7 @@ _crashtest()
_hexdump $file
fi
- $UMOUNT_PROG $mnt
+ _umount $mnt
}
# Modify as appropriate.
diff --git a/tests/generic/067 b/tests/generic/067
index b6e984f5231753..19ee28d2cd945e 100755
--- a/tests/generic/067
+++ b/tests/generic/067
@@ -66,7 +66,7 @@ umount_symlink_device()
rm -f $symlink
echo "# umount symlink to device, which is not mounted" >>$seqres.full
ln -s $SCRATCH_DEV $symlink
- $UMOUNT_PROG $symlink >>$seqres.full 2>&1
+ _umount $symlink >>$seqres.full 2>&1
}
# umount a path name that is 256 bytes long, this should fail gracefully,
@@ -78,7 +78,7 @@ umount_toolong_name()
_scratch_mount 2>&1 | tee -a $seqres.full
echo "# umount a too-long name" >>$seqres.full
- $UMOUNT_PROG $longname >>$seqres.full 2>&1
+ _umount $longname >>$seqres.full 2>&1
_scratch_unmount 2>&1 | tee -a $seqres.full
}
@@ -93,7 +93,7 @@ lazy_umount_symlink()
rm -f $symlink
ln -s $SCRATCH_MNT/testdir $symlink
- $UMOUNT_PROG -l $symlink >>$seqres.full 2>&1
+ _umount -l $symlink >>$seqres.full 2>&1
# _scratch_unmount should not be blocked
_scratch_unmount 2>&1 | tee -a $seqres.full
}
diff --git a/tests/generic/081 b/tests/generic/081
index 468c87ac9a9f0a..57dc07a36395f8 100755
--- a/tests/generic/081
+++ b/tests/generic/081
@@ -32,7 +32,7 @@ _cleanup()
# other tests to fail.
while test -e /dev/mapper/$vgname-$snapname || \
test -e /dev/mapper/$vgname-$lvname; do
- $UMOUNT_PROG $mnt >> $seqres.full 2>&1
+ _umount $mnt >> $seqres.full 2>&1
$LVM_PROG lvremove -f $vgname/$snapname >>$seqres.full 2>&1
$LVM_PROG lvremove -f $vgname/$lvname >>$seqres.full 2>&1
$LVM_PROG vgremove -f $vgname >>$seqres.full 2>&1
diff --git a/tests/generic/085 b/tests/generic/085
index cbabd257cad8f0..8c33386b7c383e 100755
--- a/tests/generic/085
+++ b/tests/generic/085
@@ -27,7 +27,7 @@ cleanup_dmdev()
$DMSETUP_PROG resume $lvdev >/dev/null 2>&1
[ -n "$pid" ] && kill -9 $pid 2>/dev/null
wait $pid
- $UMOUNT_PROG $lvdev >/dev/null 2>&1
+ _umount $lvdev >/dev/null 2>&1
_dmsetup_remove $node
}
@@ -70,7 +70,7 @@ done &
pid=$!
for ((i=0; i<100; i++)); do
_mount $lvdev $SCRATCH_MNT >/dev/null 2>&1
- $UMOUNT_PROG $lvdev >/dev/null 2>&1
+ _umount $lvdev >/dev/null 2>&1
done &
pid="$pid $!"
diff --git a/tests/generic/108 b/tests/generic/108
index da13715f27ac21..e1df7ee1886cde 100755
--- a/tests/generic/108
+++ b/tests/generic/108
@@ -18,7 +18,7 @@ _cleanup()
{
cd /
echo running > /sys/block/`_short_dev $SCSI_DEBUG_DEV`/device/state
- $UMOUNT_PROG $SCRATCH_MNT >>$seqres.full 2>&1
+ _umount $SCRATCH_MNT >>$seqres.full 2>&1
$LVM_PROG vgremove -f $vgname >>$seqres.full 2>&1
$LVM_PROG pvremove -f $SCRATCH_DEV $SCSI_DEBUG_DEV >>$seqres.full 2>&1
$UDEV_SETTLE_PROG
diff --git a/tests/generic/361 b/tests/generic/361
index c2ebda3c1a01ad..456271b8d80308 100755
--- a/tests/generic/361
+++ b/tests/generic/361
@@ -16,7 +16,7 @@ _begin_fstest auto quick
# Override the default cleanup function.
_cleanup()
{
- $UMOUNT_PROG $fs_mnt
+ _umount $fs_mnt
_destroy_loop_device $loop_dev
cd /
rm -f $tmp.*
diff --git a/tests/generic/373 b/tests/generic/373
index 0d5a50cbee40b8..6ede189ead70bd 100755
--- a/tests/generic/373
+++ b/tests/generic/373
@@ -60,7 +60,7 @@ md5sum $testdir/file | _filter_scratch
md5sum $othertestdir/otherfile | filter_otherdir
echo "Unmount otherdir"
-$UMOUNT_PROG $otherdir
+_umount $otherdir
rm -rf $otherdir
# success, all done
diff --git a/tests/generic/374 b/tests/generic/374
index 977a2b268bbc98..bbdd8e66b4897b 100755
--- a/tests/generic/374
+++ b/tests/generic/374
@@ -59,7 +59,7 @@ echo "Check output"
md5sum $testdir/file $othertestdir/otherfile | filter_md5
echo "Unmount otherdir"
-$UMOUNT_PROG $otherdir
+_umount $otherdir
rm -rf $otherdir
# success, all done
diff --git a/tests/generic/459 b/tests/generic/459
index 32ee899f929819..e8799f75bf8e05 100755
--- a/tests/generic/459
+++ b/tests/generic/459
@@ -28,7 +28,7 @@ _cleanup()
xfs_freeze -u $SCRATCH_MNT 2>/dev/null
cd /
rm -f $tmp.*
- $UMOUNT_PROG $SCRATCH_MNT >>$seqres.full 2>&1
+ _umount $SCRATCH_MNT >>$seqres.full 2>&1
$LVM_PROG vgremove -ff $vgname >>$seqres.full 2>&1
$LVM_PROG pvremove -ff $SCRATCH_DEV >>$seqres.full 2>&1
$UDEV_SETTLE_PROG
diff --git a/tests/generic/604 b/tests/generic/604
index c2e03c2eabb871..124eea853ecf70 100755
--- a/tests/generic/604
+++ b/tests/generic/604
@@ -26,6 +26,8 @@ done
# mount the base fs. Delay the mount attempt by a small amount in the hope
# that the mount() call will try to lock s_umount /after/ umount has already
# taken it.
+# This is the /one/ place in fstests where we need to call the umount binary
+# directly.
$UMOUNT_PROG $SCRATCH_MNT &
sleep 0.01s ; _scratch_mount
wait
diff --git a/tests/generic/648 b/tests/generic/648
index 29d1b470bded4a..3e995a02983931 100755
--- a/tests/generic/648
+++ b/tests/generic/648
@@ -20,7 +20,7 @@ _cleanup()
$KILLALL_PROG -9 fsstress > /dev/null 2>&1
wait
if [ -n "$loopmnt" ]; then
- $UMOUNT_PROG $loopmnt 2>/dev/null
+ _umount $loopmnt 2>/dev/null
rm -r -f $loopmnt
fi
rm -f $tmp.*
@@ -111,7 +111,7 @@ while _soak_loop_running $((25 * TIME_FACTOR)); do
# Mount again to replay log after loading working table, so we have a
# consistent fs after test.
- $UMOUNT_PROG $loopmnt
+ _umount $loopmnt
is_unmounted=1
# We must unmount dmerror at here, or whole later testing will crash.
# So try to umount enough times, before we have no choice.
@@ -137,7 +137,7 @@ done
# Make sure the fs image file is ok
if [ -f "$loopimg" ]; then
if _mount $loopimg $loopmnt -o loop; then
- $UMOUNT_PROG $loopmnt &> /dev/null
+ _umount $loopmnt &> /dev/null
else
_metadump_dev $DMERROR_DEV $seqres.scratch.final.md
echo "final scratch mount failed"
diff --git a/tests/generic/698 b/tests/generic/698
index 28928b2fb32532..f432837a216f82 100755
--- a/tests/generic/698
+++ b/tests/generic/698
@@ -17,8 +17,8 @@ _begin_fstest auto quick perms attr idmapped mount
_cleanup()
{
cd /
- $UMOUNT_PROG $SCRATCH_MNT/target-mnt 2>/dev/null
- $UMOUNT_PROG $SCRATCH_MNT 2>/dev/null
+ _umount $SCRATCH_MNT/target-mnt 2>/dev/null
+ _umount $SCRATCH_MNT 2>/dev/null
rm -r -f $tmp.*
}
diff --git a/tests/generic/699 b/tests/generic/699
index 677307538a484b..5cff1cbaa67c4e 100755
--- a/tests/generic/699
+++ b/tests/generic/699
@@ -15,9 +15,9 @@ _begin_fstest auto quick perms attr idmapped mount
_cleanup()
{
cd /
- $UMOUNT_PROG $SCRATCH_MNT/target-mnt
- $UMOUNT_PROG $SCRATCH_MNT/ovl-merge 2>/dev/null
- $UMOUNT_PROG $SCRATCH_MNT 2>/dev/null
+ _umount $SCRATCH_MNT/target-mnt
+ _umount $SCRATCH_MNT/ovl-merge 2>/dev/null
+ _umount $SCRATCH_MNT 2>/dev/null
rm -r -f $tmp.*
}
@@ -113,7 +113,7 @@ setup_overlayfs_idmapped_lower_metacopy_on()
reset_overlayfs()
{
- $UMOUNT_PROG $SCRATCH_MNT/ovl-merge 2>/dev/null
+ _umount $SCRATCH_MNT/ovl-merge 2>/dev/null
rm -rf $upper $work $merge
}
diff --git a/tests/generic/704 b/tests/generic/704
index f39d47066ccc4a..31d52a97b37f9d 100755
--- a/tests/generic/704
+++ b/tests/generic/704
@@ -14,7 +14,7 @@ _cleanup()
{
cd /
rm -r -f $tmp.*
- [ -d "$SCSI_DEBUG_MNT" ] && $UMOUNT_PROG $SCSI_DEBUG_MNT 2>/dev/null
+ [ -d "$SCSI_DEBUG_MNT" ] && _umount $SCSI_DEBUG_MNT 2>/dev/null
_put_scsi_debug_dev
}
diff --git a/tests/generic/730 b/tests/generic/730
index 062314ea01e7b5..650c604d5fbefd 100755
--- a/tests/generic/730
+++ b/tests/generic/730
@@ -12,7 +12,7 @@ _begin_fstest auto quick
_cleanup()
{
cd /
- $UMOUNT_PROG $SCSI_DEBUG_MNT >>$seqres.full 2>&1
+ _umount $SCSI_DEBUG_MNT >>$seqres.full 2>&1
_put_scsi_debug_dev
rm -f $tmp.*
}
diff --git a/tests/generic/731 b/tests/generic/731
index cd39e8b09e3906..2621f6e237741d 100755
--- a/tests/generic/731
+++ b/tests/generic/731
@@ -13,7 +13,7 @@ _begin_fstest auto quick
_cleanup()
{
cd /
- $UMOUNT_PROG $SCSI_DEBUG_MNT >>$seqres.full 2>&1
+ _umount $SCSI_DEBUG_MNT >>$seqres.full 2>&1
_put_scsi_debug_dev
rm -f $tmp.*
}
diff --git a/tests/generic/732 b/tests/generic/732
index d08028c2333d1b..63406ddc163f2c 100755
--- a/tests/generic/732
+++ b/tests/generic/732
@@ -15,8 +15,8 @@ _begin_fstest auto quick rename
# Override the default cleanup function.
_cleanup()
{
- $UMOUNT_PROG $testdir1 2>/dev/null
- $UMOUNT_PROG $testdir2 2>/dev/null
+ _umount $testdir1 2>/dev/null
+ _umount $testdir2 2>/dev/null
cd /
rm -r -f $tmp.*
}
diff --git a/tests/generic/746 b/tests/generic/746
index 651affe07b40bc..2b40c964371175 100755
--- a/tests/generic/746
+++ b/tests/generic/746
@@ -38,7 +38,7 @@ esac
# Override the default cleanup function.
_cleanup()
{
- $UMOUNT_PROG $loop_dev &> /dev/null
+ _umount $loop_dev &> /dev/null
_destroy_loop_device $loop_dev
if [ $status -eq 0 ]; then
rm -rf $tmp
@@ -53,7 +53,7 @@ get_holes()
# in-core state that will perturb the free space map on umount. Stick
# to established convention which requires the filesystem to be
# unmounted while we probe the underlying file.
- $UMOUNT_PROG $loop_mnt
+ _umount $loop_mnt
# FIEMAP only works on regular files, so call it on the backing file
# and not the loop device like everything else
@@ -66,7 +66,7 @@ get_free_sectors()
{
case $FSTYP in
ext4)
- $UMOUNT_PROG $loop_mnt
+ _umount $loop_mnt
$DUMPE2FS_PROG $loop_dev 2>&1 | grep " Free blocks" | cut -d ":" -f2- | \
tr ',' '\n' | $SED_PROG 's/^ //' | \
$AWK_PROG -v spb=$sectors_per_block 'BEGIN{FS="-"};
@@ -80,7 +80,7 @@ get_free_sectors()
xfs)
agsize=`$XFS_INFO_PROG $loop_mnt | $SED_PROG -n 's/.*agsize=\(.*\) blks.*/\1/p'`
# Convert free space (agno, block, length) to (start sector, end sector)
- $UMOUNT_PROG $loop_mnt
+ _umount $loop_mnt
$XFS_DB_PROG -r -c "freesp -d" $loop_dev | $SED_PROG '/^.*from/,$d'| \
$AWK_PROG -v spb=$sectors_per_block -v agsize=$agsize \
'{ print spb * ($1 * agsize + $2), spb * ($1 * agsize + $2 + $3) - 1 }'
diff --git a/tests/overlay/003 b/tests/overlay/003
index 41ad99e794d8ee..0a2cb928ea5c58 100755
--- a/tests/overlay/003
+++ b/tests/overlay/003
@@ -56,7 +56,7 @@ rm -rf ${SCRATCH_MNT}/*
ls ${SCRATCH_MNT}/
# unmount overlayfs but not base fs
-$UMOUNT_PROG $SCRATCH_MNT
+_umount $SCRATCH_MNT
echo "Silence is golden"
# success, all done
diff --git a/tests/overlay/004 b/tests/overlay/004
index bea4bb543f3611..4591d4e8487ce2 100755
--- a/tests/overlay/004
+++ b/tests/overlay/004
@@ -53,7 +53,7 @@ _user_do "chmod u-X ${SCRATCH_MNT}/attr_file2 > /dev/null 2>&1"
stat -c %a ${SCRATCH_MNT}/attr_file2
# unmount overlayfs but not base fs
-$UMOUNT_PROG $SCRATCH_MNT
+_umount $SCRATCH_MNT
# check mode bits of the file that has been copied up, and
# the file that should not have been copied up.
diff --git a/tests/overlay/005 b/tests/overlay/005
index 01914ee17b9a30..6b382ddb50d873 100755
--- a/tests/overlay/005
+++ b/tests/overlay/005
@@ -75,14 +75,14 @@ $XFS_IO_PROG -f -c "o" ${SCRATCH_MNT}/test_file \
>>$seqres.full 2>&1
# unmount overlayfs
-$UMOUNT_PROG $SCRATCH_MNT
+_umount $SCRATCH_MNT
# check overlayfs
_overlay_check_scratch_dirs $lowerd $upperd $workd
# unmount undelying xfs, this tiggers panic if memleak happens
-$UMOUNT_PROG ${OVL_BASE_SCRATCH_MNT}/uppermnt
-$UMOUNT_PROG ${OVL_BASE_SCRATCH_MNT}/lowermnt
+_umount ${OVL_BASE_SCRATCH_MNT}/uppermnt
+_umount ${OVL_BASE_SCRATCH_MNT}/lowermnt
# success, all done
echo "Silence is golden"
diff --git a/tests/overlay/014 b/tests/overlay/014
index f07fc685572b92..08850d489e4b49 100755
--- a/tests/overlay/014
+++ b/tests/overlay/014
@@ -46,7 +46,7 @@ _overlay_scratch_mount_dirs $lowerdir1 $lowerdir2 $workdir2
rm -rf $SCRATCH_MNT/testdir
mkdir -p $SCRATCH_MNT/testdir/visibledir
# unmount overlayfs but not base fs
-$UMOUNT_PROG $SCRATCH_MNT
+_umount $SCRATCH_MNT
# check overlayfs
_overlay_check_scratch_dirs $lowerdir1 $lowerdir2 $workdir2
@@ -59,7 +59,7 @@ touch $SCRATCH_MNT/testdir/visiblefile
# umount and mount overlay again, buggy kernel treats the copied-up dir as
# opaque, visibledir is not seen in merged dir.
-$UMOUNT_PROG $SCRATCH_MNT
+_umount $SCRATCH_MNT
_overlay_scratch_mount_dirs "$lowerdir2:$lowerdir1" $upperdir $workdir
ls $SCRATCH_MNT/testdir
diff --git a/tests/overlay/022 b/tests/overlay/022
index d33bd29781a356..40b0dd64f6fc6c 100755
--- a/tests/overlay/022
+++ b/tests/overlay/022
@@ -17,7 +17,7 @@ _begin_fstest auto quick mount nested
_cleanup()
{
cd /
- $UMOUNT_PROG $tmp/mnt > /dev/null 2>&1
+ _umount $tmp/mnt > /dev/null 2>&1
rm -rf $tmp
rm -f $tmp.*
}
diff --git a/tests/overlay/025 b/tests/overlay/025
index 6ba46191b557be..0abc8bf80b1716 100755
--- a/tests/overlay/025
+++ b/tests/overlay/025
@@ -19,8 +19,8 @@ _begin_fstest auto quick attr
_cleanup()
{
cd /
- $UMOUNT_PROG $tmpfsdir/mnt
- $UMOUNT_PROG $tmpfsdir
+ _umount $tmpfsdir/mnt
+ _umount $tmpfsdir
rm -rf $tmpfsdir
rm -f $tmp.*
}
diff --git a/tests/overlay/029 b/tests/overlay/029
index 4bade9a0e129a4..007973dc075923 100755
--- a/tests/overlay/029
+++ b/tests/overlay/029
@@ -22,7 +22,7 @@ _begin_fstest auto quick nested
_cleanup()
{
cd /
- $UMOUNT_PROG $tmp/mnt
+ _umount $tmp/mnt
rm -rf $tmp
rm -f $tmp.*
}
@@ -56,7 +56,7 @@ _overlay_mount_dirs $SCRATCH_MNT/up $tmp/{upper,work} \
overlay $tmp/mnt
# accessing file in the second mount
cat $tmp/mnt/foo
-$UMOUNT_PROG $tmp/mnt
+_umount $tmp/mnt
# re-create upper/work to avoid ovl_verify_origin() mount failure
# when index is enabled
@@ -66,7 +66,7 @@ mkdir -p $tmp/{upper,work}
_overlay_mount_dirs $SCRATCH_MNT/low $tmp/{upper,work} \
overlay $tmp/mnt
cat $tmp/mnt/bar
-$UMOUNT_PROG $tmp/mnt
+_umount $tmp/mnt
rm -rf $tmp/{upper,work}
mkdir -p $tmp/{upper,work}
diff --git a/tests/overlay/031 b/tests/overlay/031
index dd9dfcdb970ac7..31d22d1cadae41 100755
--- a/tests/overlay/031
+++ b/tests/overlay/031
@@ -28,7 +28,7 @@ create_whiteout()
rm -f $SCRATCH_MNT/testdir/$file
- $UMOUNT_PROG $SCRATCH_MNT
+ _umount $SCRATCH_MNT
}
# Import common functions.
@@ -68,7 +68,7 @@ rm -rf $SCRATCH_MNT/testdir 2>&1 | _filter_scratch
# umount overlay again, create a new file with the same name and
# mount overlay again.
-$UMOUNT_PROG $SCRATCH_MNT
+_umount $SCRATCH_MNT
touch $lowerdir1/testdir
_overlay_scratch_mount_dirs $lowerdir1 $upperdir $workdir
@@ -77,7 +77,7 @@ _overlay_scratch_mount_dirs $lowerdir1 $upperdir $workdir
# it will not clean up the dir and lead to residue.
rm -rf $SCRATCH_MNT/testdir 2>&1 | _filter_scratch
-$UMOUNT_PROG $SCRATCH_MNT
+_umount $SCRATCH_MNT
# let lower dir have invalid whiteouts, repeat ls and rmdir test again.
rm -rf $lowerdir1/testdir
@@ -92,7 +92,7 @@ _overlay_scratch_mount_dirs "$lowerdir1:$lowerdir2" $upperdir $workdir
ls $SCRATCH_MNT/testdir
rm -rf $SCRATCH_MNT/testdir 2>&1 | _filter_scratch
-$UMOUNT_PROG $SCRATCH_MNT
+_umount $SCRATCH_MNT
# let lower dir and upper dir both have invalid whiteouts, repeat ls and rmdir again.
rm -rf $lowerdir1/testdir
diff --git a/tests/overlay/035 b/tests/overlay/035
index cede58790e1b9d..c6ce1318fbbb37 100755
--- a/tests/overlay/035
+++ b/tests/overlay/035
@@ -43,7 +43,7 @@ mkdir -p $lowerdir1 $lowerdir2 $upperdir $workdir
_overlay_scratch_mount_opts -o"lowerdir=$lowerdir2:$lowerdir1"
touch $SCRATCH_MNT/foo 2>&1 | _filter_scratch
_mount -o remount,rw $SCRATCH_MNT 2>&1 | _filter_ro_mount
-$UMOUNT_PROG $SCRATCH_MNT
+_umount $SCRATCH_MNT
# Make workdir immutable to prevent workdir re-create on mount
$CHATTR_PROG +i $workdir
diff --git a/tests/overlay/036 b/tests/overlay/036
index 19a181bbdd9361..f902617d4ab0a2 100755
--- a/tests/overlay/036
+++ b/tests/overlay/036
@@ -34,8 +34,8 @@ _cleanup()
cd /
rm -f $tmp.*
# unmount the two extra mounts in case they did not fail
- $UMOUNT_PROG $SCRATCH_MNT 2>/dev/null
- $UMOUNT_PROG $SCRATCH_MNT 2>/dev/null
+ _umount $SCRATCH_MNT 2>/dev/null
+ _umount $SCRATCH_MNT 2>/dev/null
}
# Import common functions.
@@ -66,13 +66,13 @@ _overlay_mount_dirs $lowerdir $upperdir $workdir \
# with index=off - expect success
_overlay_mount_dirs $lowerdir $upperdir $workdir2 \
overlay0 $SCRATCH_MNT -oindex=off && \
- $UMOUNT_PROG $SCRATCH_MNT
+ _umount $SCRATCH_MNT
# Try to mount another overlay with the same workdir
# with index=off - expect success
_overlay_mount_dirs $lowerdir2 $upperdir2 $workdir \
overlay1 $SCRATCH_MNT -oindex=off && \
- $UMOUNT_PROG $SCRATCH_MNT
+ _umount $SCRATCH_MNT
# Try to mount another overlay with the same upperdir
# with index=on - expect EBUSY
diff --git a/tests/overlay/037 b/tests/overlay/037
index 834e176380ebea..c278e7cab1fe05 100755
--- a/tests/overlay/037
+++ b/tests/overlay/037
@@ -39,17 +39,17 @@ mkdir -p $lowerdir $lowerdir2 $upperdir $upperdir2 $workdir
# Mount overlay with lowerdir, upperdir, workdir and index=on
# to store the file handles of lowerdir and upperdir in overlay.origin xattr
_overlay_scratch_mount_dirs $lowerdir $upperdir $workdir -oindex=on
-$UMOUNT_PROG $SCRATCH_MNT
+_umount $SCRATCH_MNT
# Try to mount an overlay with the same upperdir and different lowerdir - expect ESTALE
_overlay_scratch_mount_dirs $lowerdir2 $upperdir $workdir -oindex=on \
2>&1 | _filter_error_mount
-$UMOUNT_PROG $SCRATCH_MNT 2>/dev/null
+_umount $SCRATCH_MNT 2>/dev/null
# Try to mount an overlay with the same workdir and different upperdir - expect ESTALE
_overlay_scratch_mount_dirs $lowerdir $upperdir2 $workdir -oindex=on \
2>&1 | _filter_error_mount
-$UMOUNT_PROG $SCRATCH_MNT 2>/dev/null
+_umount $SCRATCH_MNT 2>/dev/null
# Mount overlay with original lowerdir, upperdir, workdir and index=on - expect success
_overlay_scratch_mount_dirs $lowerdir $upperdir $workdir -oindex=on
diff --git a/tests/overlay/040 b/tests/overlay/040
index 11c7bf129a3626..47f50eb0638da0 100755
--- a/tests/overlay/040
+++ b/tests/overlay/040
@@ -48,7 +48,7 @@ _scratch_mount
# modify lower origin file.
$CHATTR_PROG +i $SCRATCH_MNT/foo > /dev/null 2>&1
-$UMOUNT_PROG $SCRATCH_MNT
+_umount $SCRATCH_MNT
# touching origin file in lower, should succeed
touch $lowerdir/foo
diff --git a/tests/overlay/041 b/tests/overlay/041
index 36491b8fa0edf6..52ca351b66d86c 100755
--- a/tests/overlay/041
+++ b/tests/overlay/041
@@ -142,7 +142,7 @@ subdir_d=$($here/src/t_dir_type $pure_lower_dir $pure_lower_subdir_st_ino)
[[ $subdir_d == "subdir d" ]] || \
echo "Merged dir: Invalid d_ino reported for subdir"
-$UMOUNT_PROG $SCRATCH_MNT
+_umount $SCRATCH_MNT
# check overlayfs
_overlay_check_scratch_dirs $lowerdir $upperdir $workdir -o xino=on
diff --git a/tests/overlay/042 b/tests/overlay/042
index aaa10da33e0249..ddd4173abee8ce 100755
--- a/tests/overlay/042
+++ b/tests/overlay/042
@@ -45,7 +45,7 @@ _scratch_mount -o index=off
# Copy up lower and create upper hardlink with no index
ln $SCRATCH_MNT/0 $SCRATCH_MNT/1
-$UMOUNT_PROG $SCRATCH_MNT
+_umount $SCRATCH_MNT
# Add lower hardlinks while overlay is offline
ln $lowerdir/0 $lowerdir/2
diff --git a/tests/overlay/043 b/tests/overlay/043
index 7325c653ab5cab..15cb9bf4bafaca 100755
--- a/tests/overlay/043
+++ b/tests/overlay/043
@@ -126,7 +126,7 @@ echo 3 > /proc/sys/vm/drop_caches
check_inode_numbers $testdir $tmp.after_copyup $tmp.after_move
# Verify that the inode numbers survive a mount cycle
-$UMOUNT_PROG $SCRATCH_MNT
+_umount $SCRATCH_MNT
_overlay_scratch_mount_dirs $lowerdir $upperdir $workdir -o redirect_dir=on,xino=on
# Compare inode numbers before/after mount cycle
diff --git a/tests/overlay/044 b/tests/overlay/044
index 4d04d883efd695..5f09cc31c32a1e 100755
--- a/tests/overlay/044
+++ b/tests/overlay/044
@@ -99,7 +99,7 @@ cat $FILES
check_ino_nlink $SCRATCH_MNT $tmp.before $tmp.after_one
# Verify that the hardlinks survive a mount cycle
-$UMOUNT_PROG $SCRATCH_MNT
+_umount $SCRATCH_MNT
_overlay_check_scratch_dirs $lowerdir $upperdir $workdir -o index=on,xino=on
_overlay_scratch_mount_dirs $lowerdir $upperdir $workdir -o index=on,xino=on
diff --git a/tests/overlay/048 b/tests/overlay/048
index 897e797e2ff549..4bd9753666bf6c 100755
--- a/tests/overlay/048
+++ b/tests/overlay/048
@@ -32,7 +32,7 @@ report_nlink()
_ls_l $SCRATCH_MNT/$f | awk '{ print $2, $9 }' | _filter_scratch
done
- $UMOUNT_PROG $SCRATCH_MNT
+ _umount $SCRATCH_MNT
}
# Create lower hardlinks
@@ -101,7 +101,7 @@ touch $SCRATCH_MNT/1
touch $SCRATCH_MNT/2
# Perform the rest of the changes offline
-$UMOUNT_PROG $SCRATCH_MNT
+_umount $SCRATCH_MNT
test_hardlinks_offline
diff --git a/tests/overlay/049 b/tests/overlay/049
index 3ee500c5dd13b8..b091330ea26e2c 100755
--- a/tests/overlay/049
+++ b/tests/overlay/049
@@ -32,7 +32,7 @@ create_redirect()
touch $SCRATCH_MNT/origin/file
mv $SCRATCH_MNT/origin $SCRATCH_MNT/$redirect
- $UMOUNT_PROG $SCRATCH_MNT
+ _umount $SCRATCH_MNT
}
# Import common functions.
diff --git a/tests/overlay/050 b/tests/overlay/050
index ec936e2a758f81..7c8ed1a4e96e8c 100755
--- a/tests/overlay/050
+++ b/tests/overlay/050
@@ -76,7 +76,7 @@ mount_dirs()
# Unmount the overlay without unmounting base fs
unmount_dirs()
{
- $UMOUNT_PROG $SCRATCH_MNT
+ _umount $SCRATCH_MNT
}
# Check non-stale file handles of lower/upper files and verify
diff --git a/tests/overlay/051 b/tests/overlay/051
index 9404dbbab90f15..2dadb5a3027180 100755
--- a/tests/overlay/051
+++ b/tests/overlay/051
@@ -28,7 +28,7 @@ _cleanup()
# Cleanup overlay scratch mount that is holding base test mount
# to prevent _check_test_fs and _test_umount from failing before
# _check_scratch_fs _scratch_umount
- $UMOUNT_PROG $SCRATCH_MNT 2>/dev/null
+ _umount $SCRATCH_MNT 2>/dev/null
}
# Import common functions.
@@ -103,7 +103,7 @@ mount_dirs()
# underlying dirs
unmount_dirs()
{
- $UMOUNT_PROG $SCRATCH_MNT
+ _umount $SCRATCH_MNT
_overlay_check_scratch_dirs $middle:$lower $upper $work \
-o "index=on,nfs_export=on"
diff --git a/tests/overlay/052 b/tests/overlay/052
index 37402067dbe65e..e3366ea44147cb 100755
--- a/tests/overlay/052
+++ b/tests/overlay/052
@@ -73,7 +73,7 @@ mount_dirs()
# Unmount the overlay without unmounting base fs
unmount_dirs()
{
- $UMOUNT_PROG $SCRATCH_MNT
+ _umount $SCRATCH_MNT
}
# Check non-stale file handles of lower/upper moved files
diff --git a/tests/overlay/053 b/tests/overlay/053
index f7891aceda7246..87f748cefd3338 100755
--- a/tests/overlay/053
+++ b/tests/overlay/053
@@ -30,7 +30,7 @@ _cleanup()
# Cleanup overlay scratch mount that is holding base test mount
# to prevent _check_test_fs and _test_umount from failing before
# _check_scratch_fs _scratch_umount
- $UMOUNT_PROG $SCRATCH_MNT 2>/dev/null
+ _umount $SCRATCH_MNT 2>/dev/null
}
# Import common functions.
@@ -99,7 +99,7 @@ mount_dirs()
# underlying dirs
unmount_dirs()
{
- $UMOUNT_PROG $SCRATCH_MNT
+ _umount $SCRATCH_MNT
_overlay_check_scratch_dirs $middle:$lower $upper $work \
-o "index=on,nfs_export=on,redirect_dir=on"
diff --git a/tests/overlay/054 b/tests/overlay/054
index 8d7f026a2d9b00..566d266a1ad788 100755
--- a/tests/overlay/054
+++ b/tests/overlay/054
@@ -87,7 +87,7 @@ mount_dirs()
# Unmount the overlay without unmounting base fs
unmount_dirs()
{
- $UMOUNT_PROG $SCRATCH_MNT
+ _umount $SCRATCH_MNT
}
# Check encode/decode/read file handles of dir with non-indexed ancestor
diff --git a/tests/overlay/055 b/tests/overlay/055
index 87a348c94489b8..a5b169956f4c09 100755
--- a/tests/overlay/055
+++ b/tests/overlay/055
@@ -37,7 +37,7 @@ _cleanup()
# Cleanup overlay scratch mount that is holding base test mount
# to prevent _check_test_fs and _test_umount from failing before
# _check_scratch_fs _scratch_umount
- $UMOUNT_PROG $SCRATCH_MNT 2>/dev/null
+ _umount $SCRATCH_MNT 2>/dev/null
}
# Import common functions.
@@ -109,7 +109,7 @@ mount_dirs()
# underlying dirs
unmount_dirs()
{
- $UMOUNT_PROG $SCRATCH_MNT
+ _umount $SCRATCH_MNT
_overlay_check_scratch_dirs $middle:$lower $upper $work \
-o "index=on,nfs_export=on,redirect_dir=on"
diff --git a/tests/overlay/056 b/tests/overlay/056
index 158f34d05c22e9..01c319d7263f3c 100755
--- a/tests/overlay/056
+++ b/tests/overlay/056
@@ -73,7 +73,7 @@ mkdir $lowerdir/testdir2/subdir
_overlay_scratch_mount_dirs $lowerdir $upperdir $workdir
touch $SCRATCH_MNT/testdir1/foo
touch $SCRATCH_MNT/testdir2/subdir
-$UMOUNT_PROG $SCRATCH_MNT
+_umount $SCRATCH_MNT
remove_impure $upperdir/testdir1
remove_impure $upperdir/testdir2
diff --git a/tests/overlay/057 b/tests/overlay/057
index da7ffda30277d9..b631d431a37b47 100755
--- a/tests/overlay/057
+++ b/tests/overlay/057
@@ -48,7 +48,7 @@ _overlay_scratch_mount_dirs $lowerdir $lowerdir2 $workdir2 -o redirect_dir=on
# Create opaque parent with absolute redirect child in middle layer
mkdir $SCRATCH_MNT/pure
mv $SCRATCH_MNT/origin $SCRATCH_MNT/pure/redirect
-$UMOUNT_PROG $SCRATCH_MNT
+_umount $SCRATCH_MNT
_overlay_scratch_mount_dirs $lowerdir2:$lowerdir $upperdir $workdir -o redirect_dir=on
mv $SCRATCH_MNT/pure/redirect $SCRATCH_MNT/redirect
# List content of renamed merge dir before mount cycle
@@ -56,7 +56,7 @@ ls $SCRATCH_MNT/redirect/
# Verify that redirects are followed by listing content of renamed merge dir
# after mount cycle
-$UMOUNT_PROG $SCRATCH_MNT
+_umount $SCRATCH_MNT
_overlay_scratch_mount_dirs $lowerdir2:$lowerdir $upperdir $workdir -o redirect_dir=on
ls $SCRATCH_MNT/redirect/
diff --git a/tests/overlay/059 b/tests/overlay/059
index c48d2a82c76ec4..84b5c80eb984de 100755
--- a/tests/overlay/059
+++ b/tests/overlay/059
@@ -33,7 +33,7 @@ create_origin_ref()
_scratch_mount -o redirect_dir=on
mv $SCRATCH_MNT/origin $SCRATCH_MNT/$ref
- $UMOUNT_PROG $SCRATCH_MNT
+ _umount $SCRATCH_MNT
}
# Import common functions.
diff --git a/tests/overlay/060 b/tests/overlay/060
index bb61fcfa644342..3d0ea353feaa9a 100755
--- a/tests/overlay/060
+++ b/tests/overlay/060
@@ -130,7 +130,7 @@ mount_ro_overlay()
umount_overlay()
{
- $UMOUNT_PROG $SCRATCH_MNT
+ _umount $SCRATCH_MNT
}
# Assumes it is called with overlay mounted.
diff --git a/tests/overlay/062 b/tests/overlay/062
index 9a1db7419c4ca2..97a1bd8c12f20e 100755
--- a/tests/overlay/062
+++ b/tests/overlay/062
@@ -18,7 +18,7 @@ _cleanup()
{
cd /
rm -f $tmp.*
- $UMOUNT_PROG $lowertestdir
+ _umount $lowertestdir
}
# Import common functions.
diff --git a/tests/overlay/063 b/tests/overlay/063
index d9f30606a92d44..a50e63665202f0 100755
--- a/tests/overlay/063
+++ b/tests/overlay/063
@@ -40,7 +40,7 @@ rm ${upperdir}/file
mkdir ${SCRATCH_MNT}/file > /dev/null 2>&1
# unmount overlayfs
-$UMOUNT_PROG $SCRATCH_MNT
+_umount $SCRATCH_MNT
echo "Silence is golden"
# success, all done
diff --git a/tests/overlay/065 b/tests/overlay/065
index fb6d6dd1bfcc0e..26f1c4bde4da90 100755
--- a/tests/overlay/065
+++ b/tests/overlay/065
@@ -30,7 +30,7 @@ _cleanup()
{
cd /
rm -f $tmp.*
- $UMOUNT_PROG $mnt2 2>/dev/null
+ _umount $mnt2 2>/dev/null
}
# Import common functions.
@@ -63,7 +63,7 @@ mkdir -p $lowerdir/lower $upperdir $workdir
echo Conflicting upperdir/lowerdir
_overlay_scratch_mount_dirs $upperdir $upperdir $workdir \
2>&1 | _filter_error_mount
-$UMOUNT_PROG $SCRATCH_MNT 2>/dev/null
+_umount $SCRATCH_MNT 2>/dev/null
# Use new upper/work dirs for each test to avoid ESTALE errors
# on mismatch lowerdir/upperdir (see test overlay/037)
@@ -75,7 +75,7 @@ mkdir $upperdir $workdir
echo Conflicting workdir/lowerdir
_overlay_scratch_mount_dirs $workdir $upperdir $workdir \
-oindex=off 2>&1 | _filter_error_mount
-$UMOUNT_PROG $SCRATCH_MNT 2>/dev/null
+_umount $SCRATCH_MNT 2>/dev/null
rm -rf $upperdir $workdir
mkdir -p $upperdir/lower $workdir
@@ -85,7 +85,7 @@ mkdir -p $upperdir/lower $workdir
echo Overlapping upperdir/lowerdir
_overlay_scratch_mount_dirs $upperdir/lower $upperdir $workdir \
2>&1 | _filter_error_mount
-$UMOUNT_PROG $SCRATCH_MNT 2>/dev/null
+_umount $SCRATCH_MNT 2>/dev/null
rm -rf $upperdir $workdir
mkdir $upperdir $workdir
@@ -94,7 +94,7 @@ mkdir $upperdir $workdir
echo Conflicting lower layers
_overlay_scratch_mount_dirs $lowerdir:$lowerdir $upperdir $workdir \
2>&1 | _filter_error_mount
-$UMOUNT_PROG $SCRATCH_MNT 2>/dev/null
+_umount $SCRATCH_MNT 2>/dev/null
rm -rf $upperdir $workdir
mkdir $upperdir $workdir
@@ -103,7 +103,7 @@ mkdir $upperdir $workdir
echo Overlapping lower layers below
_overlay_scratch_mount_dirs $lowerdir:$lowerdir/lower $upperdir $workdir \
2>&1 | _filter_error_mount
-$UMOUNT_PROG $SCRATCH_MNT 2>/dev/null
+_umount $SCRATCH_MNT 2>/dev/null
rm -rf $upperdir $workdir
mkdir $upperdir $workdir
@@ -112,7 +112,7 @@ mkdir $upperdir $workdir
echo Overlapping lower layers above
_overlay_scratch_mount_dirs $lowerdir/lower:$lowerdir $upperdir $workdir \
2>&1 | _filter_error_mount
-$UMOUNT_PROG $SCRATCH_MNT 2>/dev/null
+_umount $SCRATCH_MNT 2>/dev/null
rm -rf $upperdir $workdir
mkdir -p $upperdir/upper $workdir $mnt2
@@ -129,14 +129,14 @@ mkdir -p $upperdir2 $workdir2 $mnt2
echo "Overlapping with upperdir of another instance (index=on)"
_overlay_scratch_mount_dirs $upperdir/upper $upperdir2 $workdir2 \
-oindex=on 2>&1 | _filter_busy_mount
-$UMOUNT_PROG $SCRATCH_MNT 2>/dev/null
+_umount $SCRATCH_MNT 2>/dev/null
rm -rf $upperdir2 $workdir2
mkdir -p $upperdir2 $workdir2
echo "Overlapping with upperdir of another instance (index=off)"
_overlay_scratch_mount_dirs $upperdir/upper $upperdir2 $workdir2 \
- -oindex=off && $UMOUNT_PROG $SCRATCH_MNT
+ -oindex=off && _umount $SCRATCH_MNT
rm -rf $upperdir2 $workdir2
mkdir -p $upperdir2 $workdir2
@@ -146,14 +146,14 @@ mkdir -p $upperdir2 $workdir2
echo "Overlapping with workdir of another instance (index=on)"
_overlay_scratch_mount_dirs $workdir/work $upperdir2 $workdir2 \
-oindex=on 2>&1 | _filter_busy_mount
-$UMOUNT_PROG $SCRATCH_MNT 2>/dev/null
+_umount $SCRATCH_MNT 2>/dev/null
rm -rf $upperdir2 $workdir2
mkdir -p $upperdir2 $workdir2
echo "Overlapping with workdir of another instance (index=off)"
_overlay_scratch_mount_dirs $workdir/work $upperdir2 $workdir2 \
- -oindex=off && $UMOUNT_PROG $SCRATCH_MNT
+ -oindex=off && _umount $SCRATCH_MNT
# Move upper layer root into lower layer after mount
echo Overlapping upperdir/lowerdir after mount
diff --git a/tests/overlay/067 b/tests/overlay/067
index bb09a6042b275d..12a1781c149644 100755
--- a/tests/overlay/067
+++ b/tests/overlay/067
@@ -70,7 +70,7 @@ stat $testfile >>$seqres.full
diff -q $realfile $testfile >>$seqres.full &&
echo "diff with middle layer file doesn't know right from wrong! (cold cache)"
-$UMOUNT_PROG $SCRATCH_MNT
+_umount $SCRATCH_MNT
# check overlayfs
_overlay_check_scratch_dirs $middle:$lower $upper $work -o xino=off
diff --git a/tests/overlay/068 b/tests/overlay/068
index 0d33cf12de8550..480ba67e33ea74 100755
--- a/tests/overlay/068
+++ b/tests/overlay/068
@@ -28,7 +28,7 @@ _cleanup()
cd /
rm -f $tmp.*
# Unmount the nested overlay mount
- $UMOUNT_PROG $mnt2 2>/dev/null
+ _umount $mnt2 2>/dev/null
}
# Import common functions.
@@ -100,7 +100,7 @@ mount_dirs()
unmount_dirs()
{
# unmount & check nested overlay
- $UMOUNT_PROG $mnt2
+ _umount $mnt2
_overlay_check_dirs $SCRATCH_MNT $upper2 $work2 \
-o "index=on,nfs_export=on,redirect_dir=on"
diff --git a/tests/overlay/069 b/tests/overlay/069
index 373ab1ee3dc115..67969eebbfcaa3 100755
--- a/tests/overlay/069
+++ b/tests/overlay/069
@@ -28,7 +28,7 @@ _cleanup()
cd /
rm -f $tmp.*
# Unmount the nested overlay mount
- $UMOUNT_PROG $mnt2 2>/dev/null
+ _umount $mnt2 2>/dev/null
}
# Import common functions.
@@ -108,12 +108,12 @@ mount_dirs()
unmount_dirs()
{
# unmount & check nested overlay
- $UMOUNT_PROG $mnt2
+ _umount $mnt2
_overlay_check_dirs $SCRATCH_MNT $upper2 $work2 \
-o "index=on,nfs_export=on,redirect_dir=on"
# unmount & check underlying overlay
- $UMOUNT_PROG $SCRATCH_MNT
+ _umount $SCRATCH_MNT
_overlay_check_dirs $lower $upper $work \
-o "index=on,nfs_export=on,redirect_dir=on"
}
diff --git a/tests/overlay/070 b/tests/overlay/070
index 36991229f28fe7..104b5f492088d6 100755
--- a/tests/overlay/070
+++ b/tests/overlay/070
@@ -26,7 +26,7 @@ _cleanup()
cd /
rm -f $tmp.*
# Unmount the nested overlay mount
- $UMOUNT_PROG $mnt2 2>/dev/null
+ _umount $mnt2 2>/dev/null
[ -z "$loopdev" ] || _destroy_loop_device $loopdev
}
@@ -93,12 +93,12 @@ mount_dirs()
unmount_dirs()
{
# unmount & check nested overlay
- $UMOUNT_PROG $mnt2
+ _umount $mnt2
_overlay_check_dirs $SCRATCH_MNT $upper2 $work2 \
-o "redirect_dir=on,index=on,xino=on"
# unmount & check underlying overlay
- $UMOUNT_PROG $SCRATCH_MNT
+ _umount $SCRATCH_MNT
_overlay_check_scratch_dirs $lower $upper $work \
-o "index=on,nfs_export=on"
}
diff --git a/tests/overlay/071 b/tests/overlay/071
index 2a6313142d09d2..c58347f6cdb1c6 100755
--- a/tests/overlay/071
+++ b/tests/overlay/071
@@ -29,7 +29,7 @@ _cleanup()
cd /
rm -f $tmp.*
# Unmount the nested overlay mount
- $UMOUNT_PROG $mnt2 2>/dev/null
+ _umount $mnt2 2>/dev/null
[ -z "$loopdev" ] || _destroy_loop_device $loopdev
}
@@ -103,12 +103,12 @@ mount_dirs()
unmount_dirs()
{
# unmount & check nested overlay
- $UMOUNT_PROG $mnt2
+ _umount $mnt2
_overlay_check_dirs $SCRATCH_MNT $upper2 $work2 \
-o "redirect_dir=on,index=on,xino=on"
# unmount & check underlying overlay
- $UMOUNT_PROG $SCRATCH_MNT
+ _umount $SCRATCH_MNT
_overlay_check_dirs $lower $upper $work \
-o "index=on,nfs_export=on"
}
diff --git a/tests/overlay/076 b/tests/overlay/076
index fb94dff685b6cc..28bf2d305b94d7 100755
--- a/tests/overlay/076
+++ b/tests/overlay/076
@@ -47,7 +47,7 @@ _scratch_mount
# on kernel v5.10..v5.10.14. Anything but hang is considered a test success.
$CHATTR_PROG +i $SCRATCH_MNT/foo > /dev/null 2>&1
-$UMOUNT_PROG $SCRATCH_MNT
+_umount $SCRATCH_MNT
# success, all done
echo "Silence is golden"
diff --git a/tests/overlay/077 b/tests/overlay/077
index 00de0825aea6dc..cff24800469362 100755
--- a/tests/overlay/077
+++ b/tests/overlay/077
@@ -65,7 +65,7 @@ mv $SCRATCH_MNT/f100 $SCRATCH_MNT/former/
# Remove the lower directory and mount overlay again to create
# a "former merge dir"
-$UMOUNT_PROG $SCRATCH_MNT
+_umount $SCRATCH_MNT
rm -rf $lowerdir/former
_scratch_mount
diff --git a/tests/overlay/078 b/tests/overlay/078
index d6df11f6852f45..bcc5aff1b7dc89 100755
--- a/tests/overlay/078
+++ b/tests/overlay/078
@@ -61,7 +61,7 @@ do_check()
echo "Test chattr +$1 $2" >> $seqres.full
- $UMOUNT_PROG $SCRATCH_MNT
+ _umount $SCRATCH_MNT
# Add attribute to lower file
$CHATTR_PROG +$attr $lowertestfile
diff --git a/tests/overlay/079 b/tests/overlay/079
index cfcafceea56e66..f8926e091ca137 100755
--- a/tests/overlay/079
+++ b/tests/overlay/079
@@ -156,7 +156,7 @@ mount_ro_overlay()
umount_overlay()
{
- $UMOUNT_PROG $SCRATCH_MNT
+ _umount $SCRATCH_MNT
}
test_no_access()
diff --git a/tests/overlay/080 b/tests/overlay/080
index ce5c2375fb3154..94fe33ae7db4d2 100755
--- a/tests/overlay/080
+++ b/tests/overlay/080
@@ -264,7 +264,7 @@ mount_overlay()
umount_overlay()
{
- $UMOUNT_PROG $SCRATCH_MNT
+ _umount $SCRATCH_MNT
}
diff --git a/tests/overlay/081 b/tests/overlay/081
index 2270a04750da1f..454eea2cd96576 100755
--- a/tests/overlay/081
+++ b/tests/overlay/081
@@ -46,7 +46,7 @@ ovl_fsid=$(stat -f -c '%i' $test_dir)
echo "Overlayfs (uuid=null) and upper fs fsid differ"
# Keep base fs mounted in case it has a volatile fsid (e.g. tmpfs)
-$UMOUNT_PROG $SCRATCH_MNT
+_umount $SCRATCH_MNT
# Test legacy behavior is preserved by default for existing "impure" overlayfs
_scratch_mount
@@ -55,7 +55,7 @@ ovl_fsid=$(stat -f -c '%i' $test_dir)
[[ "$ovl_fsid" == "$upper_fsid" ]] || \
echo "Overlayfs (after uuid=null) and upper fs fsid differ"
-$UMOUNT_PROG $SCRATCH_MNT
+_umount $SCRATCH_MNT
# Test unique fsid on explicit opt-in for existing "impure" overlayfs
_scratch_mount -o uuid=on
@@ -65,7 +65,7 @@ ovl_unique_fsid=$ovl_fsid
[[ "$ovl_fsid" != "$upper_fsid" ]] || \
echo "Overlayfs (uuid=on) and upper fs fsid are the same"
-$UMOUNT_PROG $SCRATCH_MNT
+_umount $SCRATCH_MNT
# Test unique fsid is persistent by default after it was created
_scratch_mount
@@ -74,7 +74,7 @@ ovl_fsid=$(stat -f -c '%i' $test_dir)
[[ "$ovl_fsid" == "$ovl_unique_fsid" ]] || \
echo "Overlayfs (after uuid=on) unique fsid is not persistent"
-$UMOUNT_PROG $SCRATCH_MNT
+_umount $SCRATCH_MNT
# Test ignore existing persistent fsid on explicit opt-out
_scratch_mount -o uuid=null
@@ -83,7 +83,7 @@ ovl_fsid=$(stat -f -c '%i' $test_dir)
[[ "$ovl_fsid" == "$upper_fsid" ]] || \
echo "Overlayfs (uuid=null) and upper fs fsid differ"
-$UMOUNT_PROG $SCRATCH_MNT
+_umount $SCRATCH_MNT
# Test fallback to uuid=null with non-upper ovelray
_overlay_scratch_mount_dirs "$upperdir:$lowerdir" "-" "-" -o ro,uuid=on
@@ -110,7 +110,7 @@ ovl_unique_fsid=$ovl_fsid
[[ "$ovl_fsid" != "$upper_fsid" ]] || \
echo "Overlayfs (new) and upper fs fsid are the same"
-$UMOUNT_PROG $SCRATCH_MNT
+_umount $SCRATCH_MNT
# Test unique fsid is persistent by default after it was created
_scratch_mount -o uuid=on
@@ -119,7 +119,7 @@ ovl_fsid=$(stat -f -c '%i' $test_dir)
[[ "$ovl_fsid" == "$ovl_unique_fsid" ]] || \
echo "Overlayfs (uuid=on) unique fsid is not persistent"
-$UMOUNT_PROG $SCRATCH_MNT
+_umount $SCRATCH_MNT
echo "Silence is golden"
status=0
diff --git a/tests/overlay/083 b/tests/overlay/083
index 56e02f8cc77d73..aaa3fdb9ad139a 100755
--- a/tests/overlay/083
+++ b/tests/overlay/083
@@ -52,7 +52,7 @@ _mount -t overlay | grep ovl_esc_test | tee -a $seqres.full | grep -v spaces &&
# Re-create the upper/work dirs to mount them with a different lower
# This is required in case index feature is enabled
-$UMOUNT_PROG $SCRATCH_MNT
+_umount $SCRATCH_MNT
rm -rf "$upperdir" "$workdir"
mkdir -p "$upperdir" "$workdir"
diff --git a/tests/overlay/084 b/tests/overlay/084
index 28e9a76dc734c0..67321bc7618389 100755
--- a/tests/overlay/084
+++ b/tests/overlay/084
@@ -15,7 +15,7 @@ _cleanup()
{
cd /
# Unmount nested mounts if things fail
- $UMOUNT_PROG $OVL_BASE_SCRATCH_MNT/nested 2>/dev/null
+ _umount $OVL_BASE_SCRATCH_MNT/nested 2>/dev/null
rm -rf $tmp
}
@@ -44,7 +44,7 @@ nesteddir=$OVL_BASE_SCRATCH_MNT/nested
umount_overlay()
{
- $UMOUNT_PROG $SCRATCH_MNT
+ _umount $SCRATCH_MNT
}
test_escape()
@@ -88,12 +88,12 @@ test_escape()
echo "nested xattr mount with trusted.overlay"
_overlay_mount_dirs $SCRATCH_MNT/layer2:$SCRATCH_MNT/layer1 - - overlayfs $nesteddir
stat $nesteddir/dir/file 2>&1 | _filter_scratch
- $UMOUNT_PROG $nesteddir
+ _umount $nesteddir
echo "nested xattr mount with user.overlay"
_overlay_mount_dirs $SCRATCH_MNT/layer2:$SCRATCH_MNT/layer1 - - -o userxattr overlayfs $nesteddir
stat $nesteddir/dir/file 2>&1 | _filter_scratch
- $UMOUNT_PROG $nesteddir
+ _umount $nesteddir
# Also ensure propagate the escaped xattr when we copy-up layer2/dir
echo "copy-up of escaped xattrs"
@@ -164,7 +164,7 @@ test_escaped_xwhiteout()
do_test_xwhiteout $prefix $nesteddir
- $UMOUNT_PROG $nesteddir
+ _umount $nesteddir
}
test_escaped_xwhiteout trusted
diff --git a/tests/overlay/085 b/tests/overlay/085
index 046d01d161d829..8396ceb7c72b90 100755
--- a/tests/overlay/085
+++ b/tests/overlay/085
@@ -157,7 +157,7 @@ mount_ro_overlay()
umount_overlay()
{
- $UMOUNT_PROG $SCRATCH_MNT
+ _umount $SCRATCH_MNT
}
test_no_access()
diff --git a/tests/overlay/086 b/tests/overlay/086
index 23c56d074ff34a..45e5b45a279853 100755
--- a/tests/overlay/086
+++ b/tests/overlay/086
@@ -38,21 +38,21 @@ _mount -t overlay none $SCRATCH_MNT \
2>> $seqres.full && \
echo "ERROR: invalid combination of lowerdir and lowerdir+ mount options"
-$UMOUNT_PROG $SCRATCH_MNT 2>/dev/null
+_umount $SCRATCH_MNT 2>/dev/null
_mount -t overlay none $SCRATCH_MNT \
-o"lowerdir=$lowerdir,datadir+=$lowerdir_colons" \
-o redirect_dir=follow,metacopy=on 2>> $seqres.full && \
echo "ERROR: invalid combination of lowerdir and datadir+ mount options"
-$UMOUNT_PROG $SCRATCH_MNT 2>/dev/null
+_umount $SCRATCH_MNT 2>/dev/null
_mount -t overlay none $SCRATCH_MNT \
-o"datadir+=$lowerdir,lowerdir+=$lowerdir_colons" \
-o redirect_dir=follow,metacopy=on 2>> $seqres.full && \
echo "ERROR: invalid order of lowerdir+ and datadir+ mount options"
-$UMOUNT_PROG $SCRATCH_MNT 2>/dev/null
+_umount $SCRATCH_MNT 2>/dev/null
# mount is expected to fail with escaped colons.
_mount -t overlay none $SCRATCH_MNT \
@@ -60,7 +60,7 @@ _mount -t overlay none $SCRATCH_MNT \
2>> $seqres.full && \
echo "ERROR: incorrect parsing of escaped colons in lowerdir+ mount option"
-$UMOUNT_PROG $SCRATCH_MNT 2>/dev/null
+_umount $SCRATCH_MNT 2>/dev/null
# mount is expected to succeed without escaped colons.
_mount -t overlay ovl_esc_test $SCRATCH_MNT \
diff --git a/tests/xfs/078 b/tests/xfs/078
index 4224fd40bc9fea..799d8881220582 100755
--- a/tests/xfs/078
+++ b/tests/xfs/078
@@ -16,7 +16,7 @@ _cleanup()
{
cd /
rm -f $tmp.*
- $UMOUNT_PROG $LOOP_MNT 2>/dev/null
+ _umount $LOOP_MNT 2>/dev/null
[ -n "$LOOP_DEV" ] && _destroy_loop_device $LOOP_DEV 2>/dev/null
# try to keep the image file if test fails
[ $status -eq 0 ] && rm -f $LOOP_IMG
@@ -81,7 +81,7 @@ _grow_loop()
$XFS_GROWFS_PROG $LOOP_MNT 2>&1 | _filter_growfs 2>&1
echo "*** unmount"
- $UMOUNT_PROG -d $LOOP_MNT && LOOP_DEV=
+ _umount -d $LOOP_MNT && LOOP_DEV=
# Large grows takes forever to check..
if [ "$check" -gt "0" ]
diff --git a/tests/xfs/148 b/tests/xfs/148
index 9e6798f999b356..7c9badd3c1b3a0 100755
--- a/tests/xfs/148
+++ b/tests/xfs/148
@@ -14,7 +14,7 @@ _begin_fstest auto quick fuzzers
_cleanup()
{
cd /
- $UMOUNT_PROG $mntpt > /dev/null 2>&1
+ _umount $mntpt > /dev/null 2>&1
_destroy_loop_device $loopdev > /dev/null 2>&1
rm -r -f $tmp.*
}
@@ -90,7 +90,7 @@ cat $tmp.log >> $seqres.full
cat $tmp.log | _filter_test_dir
# Corrupt the entries
-$UMOUNT_PROG $mntpt
+_umount $mntpt
_destroy_loop_device $loopdev
cp $imgfile $imgfile.old
sed -b \
@@ -121,7 +121,7 @@ fi
echo "does repair complain?" >> $seqres.full
# Does repair complain about this?
-$UMOUNT_PROG $mntpt
+_umount $mntpt
$XFS_REPAIR_PROG -n $loopdev >> $seqres.full 2>&1
res=$?
test $res -eq 1 || \
diff --git a/tests/xfs/149 b/tests/xfs/149
index bbaf86132dff37..ceb80b646f5784 100755
--- a/tests/xfs/149
+++ b/tests/xfs/149
@@ -22,7 +22,7 @@ loop_symlink=$TEST_DIR/loop_symlink.$$
# Override the default cleanup function.
_cleanup()
{
- $UMOUNT_PROG $mntdir
+ _umount $mntdir
[ -n "$loop_dev" ] && _destroy_loop_device $loop_dev
rmdir $mntdir
rm -f $loop_symlink
@@ -73,7 +73,7 @@ echo "=== xfs_growfs - check device symlink ==="
$XFS_GROWFS_PROG -D 12288 $loop_symlink > /dev/null
echo "=== unmount ==="
-$UMOUNT_PROG $mntdir || _fail "!!! failed to unmount"
+_umount $mntdir || _fail "!!! failed to unmount"
echo "=== mount device symlink ==="
_mount $loop_symlink $mntdir || _fail "!!! failed to loopback mount"
diff --git a/tests/xfs/186 b/tests/xfs/186
index 88f02585e7f667..2bd4fe10ab8930 100755
--- a/tests/xfs/186
+++ b/tests/xfs/186
@@ -87,7 +87,7 @@ _do_eas()
_create_eas $2 $3
fi
echo ""
- cd /; $UMOUNT_PROG $SCRATCH_MNT
+ cd /; _umount $SCRATCH_MNT
_print_inode
}
@@ -99,7 +99,7 @@ _do_dirents()
echo ""
_scratch_mount
_create_dirents $1 $2
- cd /; $UMOUNT_PROG $SCRATCH_MNT
+ cd /; _umount $SCRATCH_MNT
_print_inode
}
diff --git a/tests/xfs/289 b/tests/xfs/289
index 089a3f8cc14a68..aab5f96293b3a5 100755
--- a/tests/xfs/289
+++ b/tests/xfs/289
@@ -13,8 +13,8 @@ _begin_fstest growfs auto quick
# Override the default cleanup function.
_cleanup()
{
- $UMOUNT_PROG $tmpdir
- $UMOUNT_PROG $tmpbind
+ _umount $tmpdir
+ _umount $tmpbind
rmdir $tmpdir
rm -f $tmpsymlink
rmdir $tmpbind
diff --git a/tests/xfs/507 b/tests/xfs/507
index 75c183c07a9fce..60542112fbd5a1 100755
--- a/tests/xfs/507
+++ b/tests/xfs/507
@@ -22,7 +22,7 @@ _register_cleanup "_cleanup" BUS
_cleanup()
{
cd /
- test -n "$loop_mount" && $UMOUNT_PROG $loop_mount > /dev/null 2>&1
+ test -n "$loop_mount" && _umount $loop_mount > /dev/null 2>&1
test -n "$loop_dev" && _destroy_loop_device $loop_dev
rm -rf $tmp.*
}
diff --git a/tests/xfs/513 b/tests/xfs/513
index 5585a9c8e76703..cb8d0aca841530 100755
--- a/tests/xfs/513
+++ b/tests/xfs/513
@@ -14,7 +14,7 @@ _cleanup()
{
cd /
rm -f $tmp.*
- $UMOUNT_PROG $LOOP_MNT 2>/dev/null
+ _umount $LOOP_MNT 2>/dev/null
if [ -n "$LOOP_DEV" ];then
_destroy_loop_device $LOOP_DEV 2>/dev/null
fi
@@ -89,7 +89,7 @@ get_mount_info()
force_unmount()
{
- $UMOUNT_PROG $LOOP_MNT >/dev/null 2>&1
+ _umount $LOOP_MNT >/dev/null 2>&1
}
# _do_test <mount options> <should be mounted?> [<key string> <key should be found?>]
diff --git a/tests/xfs/544 b/tests/xfs/544
index a3a23c1726ca1c..f1b5cc74983a62 100755
--- a/tests/xfs/544
+++ b/tests/xfs/544
@@ -15,7 +15,7 @@ _cleanup()
_cleanup_dump
cd /
rm -r -f $tmp.*
- $UMOUNT_PROG $TEST_DIR/dest.$seq 2> /dev/null
+ _umount $TEST_DIR/dest.$seq 2> /dev/null
rmdir $TEST_DIR/src.$seq 2> /dev/null
rmdir $TEST_DIR/dest.$seq 2> /dev/null
}
diff --git a/tests/xfs/806 b/tests/xfs/806
index 09c55332cc8800..9334d1780c6855 100755
--- a/tests/xfs/806
+++ b/tests/xfs/806
@@ -23,7 +23,7 @@ _cleanup()
{
cd /
rm -r -f $tmp.*
- umount $dummymnt &>/dev/null
+ _umount $dummymnt &>/dev/null
rmdir $dummymnt &>/dev/null
rm -f $dummyfile
}
@@ -46,7 +46,7 @@ testme() {
XFS_SCRUB_PHASE=7 $XFS_SCRUB_PROG -d -o autofsck $dummymnt 2>&1 | \
grep autofsck | _filter_test_dir | \
sed -e 's/\(directive.\).*$/\1/g'
- umount $dummymnt
+ _umount $dummymnt
}
# We don't test the absence of an autofsck directive because xfs_scrub behaves
^ permalink raw reply related [flat|nested] 24+ messages in thread* [PATCH 2/6] misc: convert all umount(1) invocations to _umount
2024-12-31 23:35 ` [PATCHSET 4/5] fstests: live health monitoring of filesystems Darrick J. Wong
2024-12-31 23:57 ` [PATCH 1/6] misc: convert all $UMOUNT_PROG to a _umount helper Darrick J. Wong
@ 2024-12-31 23:57 ` Darrick J. Wong
2024-12-31 23:57 ` [PATCH 3/6] xfs: test health monitoring code Darrick J. Wong
` (3 subsequent siblings)
5 siblings, 0 replies; 24+ messages in thread
From: Darrick J. Wong @ 2024-12-31 23:57 UTC (permalink / raw)
To: zlang, djwong; +Cc: fstests, linux-xfs
From: Darrick J. Wong <djwong@kernel.org>
Find all the places where we call umount(1) directly and convert all of
those to _umount calls as well.
sed \
-e 's/\([[:space:]]\)umount\([[:space:]]*"\$\)/\1_umount\2/g' \
-e 's/\([[:space:]]\)umount\([[:space:]]*\$\)/\1_umount\2/g' \
-e 's/^umount\([[:space:]]*"\$\)/_umount\1/g' \
-e 's/^umount\([[:space:]]*\$\)/_umount\1/g' \
-i $(git ls-files tests common check)
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
common/dmerror | 2 +-
common/populate | 8 ++++----
common/quota | 2 +-
common/rc | 4 ++--
common/xfs | 2 +-
tests/btrfs/012 | 2 +-
tests/btrfs/199 | 2 +-
tests/btrfs/291 | 2 +-
tests/btrfs/298 | 4 ++--
tests/ext4/006 | 4 ++--
tests/ext4/007 | 4 ++--
tests/ext4/008 | 4 ++--
tests/ext4/009 | 8 ++++----
tests/ext4/010 | 6 +++---
tests/ext4/011 | 2 +-
tests/ext4/012 | 2 +-
tests/ext4/013 | 6 +++---
tests/ext4/014 | 6 +++---
tests/ext4/015 | 6 +++---
tests/ext4/016 | 6 +++---
tests/ext4/017 | 6 +++---
tests/ext4/018 | 6 +++---
tests/ext4/019 | 6 +++---
tests/ext4/033 | 2 +-
tests/generic/171 | 2 +-
tests/generic/172 | 2 +-
tests/generic/173 | 2 +-
tests/generic/174 | 2 +-
tests/generic/306 | 2 +-
tests/generic/330 | 2 +-
tests/generic/332 | 2 +-
tests/generic/395 | 2 +-
tests/generic/563 | 4 ++--
tests/generic/631 | 2 +-
tests/generic/717 | 2 +-
tests/xfs/014 | 4 ++--
tests/xfs/049 | 8 ++++----
tests/xfs/073 | 8 ++++----
tests/xfs/074 | 4 ++--
tests/xfs/083 | 6 +++---
tests/xfs/085 | 4 ++--
tests/xfs/086 | 8 ++++----
tests/xfs/087 | 6 +++---
tests/xfs/088 | 8 ++++----
tests/xfs/089 | 8 ++++----
tests/xfs/091 | 8 ++++----
tests/xfs/093 | 6 +++---
tests/xfs/097 | 6 +++---
tests/xfs/098 | 4 ++--
tests/xfs/099 | 6 +++---
tests/xfs/100 | 6 +++---
tests/xfs/101 | 6 +++---
tests/xfs/102 | 6 +++---
tests/xfs/105 | 6 +++---
tests/xfs/112 | 8 ++++----
tests/xfs/113 | 6 +++---
tests/xfs/117 | 6 +++---
tests/xfs/120 | 6 +++---
tests/xfs/123 | 6 +++---
tests/xfs/124 | 6 +++---
tests/xfs/125 | 6 +++---
tests/xfs/126 | 6 +++---
tests/xfs/130 | 2 +-
tests/xfs/152 | 2 +-
tests/xfs/169 | 6 +++---
tests/xfs/206 | 2 +-
tests/xfs/216 | 2 +-
tests/xfs/217 | 2 +-
tests/xfs/235 | 6 +++---
tests/xfs/236 | 6 +++---
tests/xfs/239 | 2 +-
tests/xfs/241 | 2 +-
tests/xfs/250 | 4 ++--
tests/xfs/265 | 6 +++---
tests/xfs/310 | 4 ++--
tests/xfs/716 | 4 ++--
76 files changed, 172 insertions(+), 172 deletions(-)
diff --git a/common/dmerror b/common/dmerror
index 1e6a35230f3ccb..2b6f001b8427f6 100644
--- a/common/dmerror
+++ b/common/dmerror
@@ -97,7 +97,7 @@ _dmerror_mount()
_dmerror_unmount()
{
- umount $SCRATCH_MNT
+ _umount $SCRATCH_MNT
}
_dmerror_cleanup()
diff --git a/common/populate b/common/populate
index 96e6a0f0572f12..e6bcdf346ac4ff 100644
--- a/common/populate
+++ b/common/populate
@@ -540,7 +540,7 @@ _scratch_xfs_populate() {
__populate_fragment_file "${SCRATCH_MNT}/REFCOUNTBT"
__populate_fragment_file "${SCRATCH_MNT}/RTREFCOUNTBT"
- umount "${SCRATCH_MNT}"
+ _umount "${SCRATCH_MNT}"
}
# Populate an ext4 on the scratch device with (we hope) all known
@@ -642,7 +642,7 @@ _scratch_ext4_populate() {
# Make sure we get all the fragmentation we asked for
__populate_fragment_file "${SCRATCH_MNT}/S_IFREG.FMT_ETREE"
- umount "${SCRATCH_MNT}"
+ _umount "${SCRATCH_MNT}"
}
# Find the inode number of a file
@@ -831,7 +831,7 @@ _scratch_xfs_populate_check() {
dblksz="$(_xfs_get_dir_blocksize "$SCRATCH_MNT")"
leaf_lblk="$((32 * 1073741824 / blksz))"
node_lblk="$((64 * 1073741824 / blksz))"
- umount "${SCRATCH_MNT}"
+ _umount "${SCRATCH_MNT}"
__populate_check_xfs_dformat "${extents_file}" "extents"
__populate_check_xfs_dformat "${btree_file}" "btree"
@@ -948,7 +948,7 @@ _scratch_ext4_populate_check() {
extents_slink="$(__populate_find_inode "${SCRATCH_MNT}/S_IFLNK.FMT_EXTENTS")"
local_attr="$(__populate_find_inode "${SCRATCH_MNT}/ATTR.FMT_LOCAL")"
block_attr="$(__populate_find_inode "${SCRATCH_MNT}/ATTR.FMT_BLOCK")"
- umount "${SCRATCH_MNT}"
+ _umount "${SCRATCH_MNT}"
__populate_check_ext4_dformat "${extents_file}" "extents"
__populate_check_ext4_dformat "${etree_file}" "etree"
diff --git a/common/quota b/common/quota
index 344c942045e5f2..7399819bb2579b 100644
--- a/common/quota
+++ b/common/quota
@@ -92,7 +92,7 @@ _require_xfs_quota_acct_enabled()
if [ -z "$umount" ] && [ "$dev" = "$SCRATCH_DEV" ]; then
umount="-u"
fi
- test "$umount" = "-u" && umount "$dev" &>/dev/null
+ test "$umount" = "-u" && _umount "$dev" &>/dev/null
case "$dev" in
"$TEST_DEV") fsname="test";;
diff --git a/common/rc b/common/rc
index d3ee76e01db892..0d5c785cecc017 100644
--- a/common/rc
+++ b/common/rc
@@ -1348,7 +1348,7 @@ _repair_scratch_fs()
_scratch_xfs_repair -L 2>&1
echo "log zap returns $?"
else
- umount "$SCRATCH_MNT"
+ _umount "$SCRATCH_MNT"
fi
_scratch_xfs_repair "$@" 2>&1
res=$?
@@ -1413,7 +1413,7 @@ _repair_test_fs()
_test_xfs_repair -L >>$tmp.repair 2>&1
echo "log zap returns $?" >> $tmp.repair
else
- umount "$TEST_DEV"
+ _umount "$TEST_DEV"
fi
_test_xfs_repair "$@" >>$tmp.repair 2>&1
res=$?
diff --git a/common/xfs b/common/xfs
index 86654a9379cf89..b9e897e0e8839a 100644
--- a/common/xfs
+++ b/common/xfs
@@ -466,7 +466,7 @@ _require_xfs_has_feature()
_xfs_has_feature "$1" "$2" && return 0
- test "$umount" = "-u" && umount "$fs" &>/dev/null
+ test "$umount" = "-u" && _umount "$fs" &>/dev/null
test -n "$message" && _notrun "$message"
diff --git a/tests/btrfs/012 b/tests/btrfs/012
index 5811b3b339cb3e..7bb075dc2d0e93 100755
--- a/tests/btrfs/012
+++ b/tests/btrfs/012
@@ -70,7 +70,7 @@ mount -o loop $SCRATCH_MNT/ext2_saved/image $SCRATCH_MNT/mnt || \
echo "Checking saved ext2 image against the original one:"
$FSSUM_PROG -r $tmp.original $SCRATCH_MNT/mnt/$BASENAME
-umount $SCRATCH_MNT/mnt
+_umount $SCRATCH_MNT/mnt
echo "Generating new data on the converted btrfs" >> $seqres.full
mkdir -p $SCRATCH_MNT/new
diff --git a/tests/btrfs/199 b/tests/btrfs/199
index f161e55057ff27..bdad1cb934c91f 100755
--- a/tests/btrfs/199
+++ b/tests/btrfs/199
@@ -19,7 +19,7 @@ _begin_fstest auto quick trim fiemap
_cleanup()
{
cd /
- umount $loop_mnt &> /dev/null
+ _umount $loop_mnt &> /dev/null
_destroy_loop_device $loop_dev &> /dev/null
rm -rf $tmp.*
}
diff --git a/tests/btrfs/291 b/tests/btrfs/291
index c31de3a96ef1f5..f69b65114ed696 100755
--- a/tests/btrfs/291
+++ b/tests/btrfs/291
@@ -134,7 +134,7 @@ do
_mount $snap_dev $SCRATCH_MNT || _fail "mount failed at entry $cur"
fsverity measure $SCRATCH_MNT/fsv >>$seqres.full 2>&1
measured=$?
- umount $SCRATCH_MNT
+ _umount $SCRATCH_MNT
[ $state -eq 1 ] && [ $measured -eq 0 ] && state=2
[ $state -eq 2 ] && ([ $measured -eq 0 ] || _fail "verity done, but measurement failed at entry $cur")
post_mount=$(count_merkle_items $snap_dev)
diff --git a/tests/btrfs/298 b/tests/btrfs/298
index d4aee55e785a94..c5b65772d428b1 100755
--- a/tests/btrfs/298
+++ b/tests/btrfs/298
@@ -31,11 +31,11 @@ $BTRFS_UTIL_PROG device scan --forget
echo "#Scan seed device and check using mount" >> $seqres.full
$BTRFS_UTIL_PROG device scan $SCRATCH_DEV >> $seqres.full
_mount $SPARE_DEV $SCRATCH_MNT
-umount $SCRATCH_MNT
+_umount $SCRATCH_MNT
echo "#check again, ensures seed device still in kernel" >> $seqres.full
_mount $SPARE_DEV $SCRATCH_MNT
-umount $SCRATCH_MNT
+_umount $SCRATCH_MNT
echo "#Now scan of non-seed device makes kernel forget" >> $seqres.full
$BTRFS_TUNE_PROG -f -S 0 $SCRATCH_DEV >> $seqres.full 2>&1
diff --git a/tests/ext4/006 b/tests/ext4/006
index d7862073114872..579eab55b32d26 100755
--- a/tests/ext4/006
+++ b/tests/ext4/006
@@ -97,7 +97,7 @@ echo "++ modify scratch" >> $seqres.full
_scratch_fuzz_modify >> $seqres.full 2>&1
echo "++ unmount" >> $seqres.full
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
# repair in a loop...
for p in $(seq 1 "${FSCK_PASSES}"); do
@@ -122,7 +122,7 @@ echo "++ modify scratch" >> $ROUND2_LOG
_scratch_fuzz_modify >> $ROUND2_LOG 2>&1
echo "++ unmount" >> $ROUND2_LOG
-umount "${SCRATCH_MNT}" >> $ROUND2_LOG 2>&1
+_umount "${SCRATCH_MNT}" >> $ROUND2_LOG 2>&1
cat "$ROUND2_LOG" >> $seqres.full
diff --git a/tests/ext4/007 b/tests/ext4/007
index deedbd9e8fb3d8..24cc2290f79a29 100755
--- a/tests/ext4/007
+++ b/tests/ext4/007
@@ -54,7 +54,7 @@ done
for x in `seq 2 64`; do
touch "${TESTFILE}.${x}"
done
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ check fs"
e2fsck -fn "${SCRATCH_DEV}" >> $seqres.full 2>&1 || _fail "fsck should not fail"
@@ -89,7 +89,7 @@ for x in `seq 1 64`; do
test $? -ne 0 && broken=1
done
echo "broken: ${broken}"
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ check fs (2)"
e2fsck -fn "${SCRATCH_DEV}" >> $seqres.full 2>&1 || _fail "fsck should not fail"
diff --git a/tests/ext4/008 b/tests/ext4/008
index b4b20ac10d6d2a..a586bf681dfd34 100755
--- a/tests/ext4/008
+++ b/tests/ext4/008
@@ -50,7 +50,7 @@ done
for x in `seq 2 64`; do
echo moo >> "${TESTFILE}.${x}"
done
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ check fs"
e2fsck -fn "${SCRATCH_DEV}" >> $seqres.full 2>&1 || _fail "fsck should not fail"
@@ -70,7 +70,7 @@ e2fsck -fy "${SCRATCH_DEV}" >> $seqres.full 2>&1
echo "+ mount image (2)"
_scratch_mount
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ check fs (2)"
e2fsck -fn "${SCRATCH_DEV}" >> $seqres.full 2>&1 || _fail "fsck should not fail"
diff --git a/tests/ext4/009 b/tests/ext4/009
index 06a42fd77ffa0c..f6fe1e5f0d8d2a 100755
--- a/tests/ext4/009
+++ b/tests/ext4/009
@@ -45,13 +45,13 @@ done
blksz="$(stat -f -c '%s' "${SCRATCH_MNT}")"
freeblks="$(stat -f -c '%a' "${SCRATCH_MNT}")"
$XFS_IO_PROG -f -c "falloc 0 $((blksz * freeblks))" "${SCRATCH_MNT}/bigfile2" >> $seqres.full
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ make some files"
_scratch_mount
rm -rf "${SCRATCH_MNT}/bigfile2"
touch "${SCRATCH_MNT}/bigfile"
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ check fs"
e2fsck -fn "${SCRATCH_DEV}" >> $seqres.full 2>&1 || _fail "fsck should not fail"
@@ -70,7 +70,7 @@ $XFS_IO_PROG -f -c "falloc 0 $((blksz * freeblks))" "${SCRATCH_MNT}/bigfile" >>
after="$(stat -c '%b' "${SCRATCH_MNT}/bigfile")"
echo "$((after * b_bytes))" lt "$((blksz * freeblks / 4))" >> $seqres.full
test "$((after * b_bytes))" -lt "$((blksz * freeblks / 4))" || _fail "falloc should fail"
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ repair fs"
e2fsck -fy "${SCRATCH_DEV}" >> $seqres.full 2>&1
@@ -80,7 +80,7 @@ _scratch_mount
echo "+ modify files (2)"
$XFS_IO_PROG -f -c "falloc 0 $((blksz * freeblks))" "${SCRATCH_MNT}/bigfile" >> $seqres.full
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ check fs (2)"
e2fsck -fn "${SCRATCH_DEV}" >> $seqres.full 2>&1 || _fail "fsck should not fail"
diff --git a/tests/ext4/010 b/tests/ext4/010
index 1139c79e80d538..27ce20f822256f 100755
--- a/tests/ext4/010
+++ b/tests/ext4/010
@@ -46,7 +46,7 @@ echo "+ make some files"
for i in `seq 1 $((nr_groups * 8))`; do
mkdir -p "${SCRATCH_MNT}/d_${i}"
done
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ check fs"
e2fsck -fn "${SCRATCH_DEV}" >> $seqres.full 2>&1 || _fail "fsck should not fail"
@@ -61,7 +61,7 @@ _scratch_mount
echo "+ modify files"
touch "${SCRATCH_MNT}/file0" > /dev/null 2>&1 && _fail "touch should fail"
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ repair fs"
e2fsck -fy "${SCRATCH_DEV}" >> $seqres.full 2>&1
@@ -71,7 +71,7 @@ _scratch_mount
echo "+ modify files (2)"
touch "${SCRATCH_MNT}/file1"
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ check fs (2)"
e2fsck -fn "${SCRATCH_DEV}" >> $seqres.full 2>&1 || _fail "fsck should not fail"
diff --git a/tests/ext4/011 b/tests/ext4/011
index cae4fb6b84768b..cb085c95596de1 100755
--- a/tests/ext4/011
+++ b/tests/ext4/011
@@ -39,7 +39,7 @@ blksz="$(stat -f -c '%s' "${SCRATCH_MNT}")"
echo "+ make some files"
echo moo > "${SCRATCH_MNT}/file0"
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ check fs"
e2fsck -fn "${SCRATCH_DEV}" >> $seqres.full 2>&1 || _fail "fsck should not fail"
diff --git a/tests/ext4/012 b/tests/ext4/012
index f7f2b0fb455762..e7adc617c4db17 100755
--- a/tests/ext4/012
+++ b/tests/ext4/012
@@ -39,7 +39,7 @@ blksz="$(stat -f -c '%s' "${SCRATCH_MNT}")"
echo "+ make some files"
echo moo > "${SCRATCH_MNT}/file0"
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ check fs"
e2fsck -fn "${SCRATCH_DEV}" >> $seqres.full 2>&1 || _fail "fsck should not fail"
diff --git a/tests/ext4/013 b/tests/ext4/013
index 7d2a9154a66936..4363e3d104b716 100755
--- a/tests/ext4/013
+++ b/tests/ext4/013
@@ -50,7 +50,7 @@ for x in `seq 2 64`; do
touch "${TESTFILE}.${x}"
done
inode="$(stat -c '%i' "${TESTFILE}.1")"
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ check fs"
e2fsck -fn "${SCRATCH_DEV}" >> $seqres.full 2>&1 || _fail "fsck should not fail"
@@ -72,7 +72,7 @@ for x in `seq 1 64`; do
test $? -ne 0 && broken=1
done
echo "broken: ${broken}"
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ repair fs"
e2fsck -fy "${SCRATCH_DEV}" >> $seqres.full 2>&1
@@ -93,7 +93,7 @@ for x in `seq 1 64`; do
test $? -ne 0 && broken=1
done
echo "broken: ${broken}"
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ check fs (2)"
e2fsck -fn "${SCRATCH_DEV}" >> $seqres.full 2>&1 || _fail "fsck should not fail"
diff --git a/tests/ext4/014 b/tests/ext4/014
index ffed795ad4e93c..c874a62335d1f3 100755
--- a/tests/ext4/014
+++ b/tests/ext4/014
@@ -49,7 +49,7 @@ done
for x in `seq 2 64`; do
touch "${TESTFILE}.${x}"
done
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ check fs"
e2fsck -fn "${SCRATCH_DEV}" >> $seqres.full 2>&1 || _fail "fsck should not fail"
@@ -70,7 +70,7 @@ for x in `seq 1 64`; do
test $? -ne 0 && broken=1
done
echo "broken: ${broken}"
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ repair fs"
e2fsck -fy "${SCRATCH_DEV}" >> $seqres.full 2>&1 && _fail "e2fsck should not succeed"
@@ -91,7 +91,7 @@ for x in `seq 1 64`; do
test $? -ne 0 && broken=1
done
echo "broken: ${broken}"
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ check fs (2)"
e2fsck -fn "${SCRATCH_DEV}" >> $seqres.full 2>&1 || _fail "fsck should not fail"
diff --git a/tests/ext4/015 b/tests/ext4/015
index 81feda5c9423fb..32b3884de32035 100755
--- a/tests/ext4/015
+++ b/tests/ext4/015
@@ -45,7 +45,7 @@ $XFS_IO_PROG -f -c "falloc 0 $((blksz * freeblks))" "${SCRATCH_MNT}/bigfile" >>
seq 1 2 ${freeblks} | while read lblk; do
$XFS_IO_PROG -f -c "fpunch $((lblk * blksz)) ${blksz}" "${SCRATCH_MNT}/bigfile" >> $seqres.full
done
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ check fs"
e2fsck -fn "${SCRATCH_DEV}" >> $seqres.full 2>&1 || _fail "fsck should not fail"
@@ -60,7 +60,7 @@ _scratch_mount
echo "+ modify files"
echo moo >> "${SCRATCH_MNT}/bigfile" 2> /dev/null && _fail "extent tree should be corrupt"
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ repair fs"
e2fsck -fy "${SCRATCH_DEV}" >> $seqres.full 2>&1
@@ -70,7 +70,7 @@ _scratch_mount
echo "+ modify files (2)"
$XFS_IO_PROG -f -c "pwrite ${blksz} ${blksz}" "${SCRATCH_MNT}/bigfile" >> $seqres.full
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ check fs (2)"
e2fsck -fn "${SCRATCH_DEV}" >> $seqres.full 2>&1 || _fail "fsck should not fail"
diff --git a/tests/ext4/016 b/tests/ext4/016
index b7db4cfda649ef..f0f1709b6c208a 100755
--- a/tests/ext4/016
+++ b/tests/ext4/016
@@ -40,7 +40,7 @@ echo "+ make some files"
for x in `seq 1 15`; do
mkdir -p "${SCRATCH_MNT}/test/d_${x}"
done
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ check fs"
e2fsck -fn "${SCRATCH_DEV}" >> $seqres.full 2>&1 || _fail "fsck should not fail"
@@ -53,7 +53,7 @@ _scratch_mount
echo "+ modify dirs"
mkdir -p "${SCRATCH_MNT}/test/newdir" 2> /dev/null && _fail "directory should be corrupt"
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ repair fs"
e2fsck -fy "${SCRATCH_DEV}" >> $seqres.full 2>&1
@@ -63,7 +63,7 @@ _scratch_mount
echo "+ modify dirs (2)"
mkdir -p "${SCRATCH_MNT}/test/newdir" || _fail "directory should be corrupt"
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ check fs (2)"
e2fsck -fn "${SCRATCH_DEV}" >> $seqres.full 2>&1 || _fail "fsck should not fail"
diff --git a/tests/ext4/017 b/tests/ext4/017
index fc867442c3da3a..7fa563106d676c 100755
--- a/tests/ext4/017
+++ b/tests/ext4/017
@@ -43,7 +43,7 @@ for x in `seq 1 $((blksz * 4 / 256))`; do
fname="$(printf "%.255s\n" "$(perl -e "print \"${x}_\" x 500;")")"
touch "${SCRATCH_MNT}/test/${fname}"
done
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ check fs"
e2fsck -fn "${SCRATCH_DEV}" >> $seqres.full 2>&1 || _fail "fsck should not fail"
@@ -56,7 +56,7 @@ _scratch_mount
echo "+ modify dirs"
mkdir -p "${SCRATCH_MNT}/test/newdir" 2> /dev/null && _fail "htree should be corrupt"
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ repair fs"
e2fsck -fy "${SCRATCH_DEV}" >> $seqres.full 2>&1
@@ -66,7 +66,7 @@ _scratch_mount
echo "+ modify dirs (2)"
mkdir -p "${SCRATCH_MNT}/test/newdir" || _fail "htree should not be corrupt"
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ check fs (2)"
e2fsck -fn "${SCRATCH_DEV}" >> $seqres.full 2>&1 || _fail "fsck should not fail"
diff --git a/tests/ext4/018 b/tests/ext4/018
index f7377f059fb826..2e24fe2e82918d 100755
--- a/tests/ext4/018
+++ b/tests/ext4/018
@@ -40,7 +40,7 @@ blksz="$(stat -f -c '%s' "${SCRATCH_MNT}")"
echo "+ make some files"
$XFS_IO_PROG -f -c "pwrite -S 0x62 0 ${blksz}" "${SCRATCH_MNT}/attrfile" >> $seqres.full
setfattr -n user.key -v "$(perl -e 'print "v" x 300;')" "${SCRATCH_MNT}/attrfile"
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ check fs"
e2fsck -fn "${SCRATCH_DEV}" >> $seqres.full 2>&1 || _fail "fsck should not fail"
@@ -54,7 +54,7 @@ _scratch_mount
echo "+ modify attrs"
setfattr -n user.newkey -v "$(perl -e 'print "v" x 300;')" "${SCRATCH_MNT}/attrfile" 2> /dev/null && _fail "xattr should be corrupt"
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ repair fs"
e2fsck -fy "${SCRATCH_DEV}" >> $seqres.full 2>&1
@@ -64,7 +64,7 @@ _scratch_mount
echo "+ modify attrs (2)"
setfattr -n user.newkey -v "$(perl -e 'print "v" x 300;')" "${SCRATCH_MNT}/attrfile" || _fail "xattr should not be corrupt"
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ check fs (2)"
e2fsck -fn "${SCRATCH_DEV}" >> $seqres.full 2>&1 || _fail "fsck should not fail"
diff --git a/tests/ext4/019 b/tests/ext4/019
index 987972a80a3704..7df7ccbed5e50d 100755
--- a/tests/ext4/019
+++ b/tests/ext4/019
@@ -43,7 +43,7 @@ echo "file contents: moo" > "${SCRATCH_MNT}/x"
str="$(perl -e "print './' x $(( (blksz / 2) - 16));")x"
(cd $SCRATCH_MNT; ln -s "${str}" "long_symlink")
cat "${SCRATCH_MNT}/long_symlink"
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ check fs"
e2fsck -fn "${SCRATCH_DEV}" >> $seqres.full 2>&1 || _fail "fsck should not fail"
@@ -54,7 +54,7 @@ debugfs -w -R 'zap -f /long_symlink -p 0x62 0' "${SCRATCH_DEV}" 2> /dev/null
echo "+ mount image"
_scratch_mount 2> /dev/null
cat "${SCRATCH_MNT}/long_symlink" 2>/dev/null && _fail "symlink should be broken"
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ repair fs"
e2fsck -fy "${SCRATCH_DEV}" >> $seqres.full 2>&1
@@ -62,7 +62,7 @@ e2fsck -fy "${SCRATCH_DEV}" >> $seqres.full 2>&1
echo "+ mount image (2)"
_scratch_mount
cat "${SCRATCH_MNT}/long_symlink" 2>/dev/null && _fail "symlink should be broken"
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ check fs (2)"
e2fsck -fn "${SCRATCH_DEV}" >> $seqres.full 2>&1 || _fail "fsck should not fail"
diff --git a/tests/ext4/033 b/tests/ext4/033
index 53f7106e2c6ba4..19cd1fb6f20d4c 100755
--- a/tests/ext4/033
+++ b/tests/ext4/033
@@ -14,7 +14,7 @@ _begin_fstest auto ioctl resize
# Override the default cleanup function.
_cleanup()
{
- umount $SCRATCH_MNT >/dev/null 2>&1
+ _umount $SCRATCH_MNT >/dev/null 2>&1
_dmhugedisk_cleanup
cd /
rm -f $tmp.*
diff --git a/tests/generic/171 b/tests/generic/171
index dd56aa792afbd5..f51f58e9495f8e 100755
--- a/tests/generic/171
+++ b/tests/generic/171
@@ -36,7 +36,7 @@ mkdir $testdir
echo "Reformat with appropriate size"
blksz="$(_get_block_size $testdir)"
nr_blks=10240
-umount $SCRATCH_MNT
+_umount $SCRATCH_MNT
sz_bytes=$((nr_blks * 8 * blksz))
if [ $sz_bytes -lt $((32 * 1048576)) ]; then
sz_bytes=$((32 * 1048576))
diff --git a/tests/generic/172 b/tests/generic/172
index c23a1228455464..8d32f0288b1556 100755
--- a/tests/generic/172
+++ b/tests/generic/172
@@ -35,7 +35,7 @@ mkdir $testdir
echo "Reformat with appropriate size"
blksz="$(_get_block_size $testdir)"
-umount $SCRATCH_MNT
+_umount $SCRATCH_MNT
file_size=$((768 * 1024 * 1024))
fs_size=$((1024 * 1024 * 1024))
diff --git a/tests/generic/173 b/tests/generic/173
index 8df3c6df21b29c..2f1ea96ef6238e 100755
--- a/tests/generic/173
+++ b/tests/generic/173
@@ -36,7 +36,7 @@ mkdir $testdir
echo "Reformat with appropriate size"
blksz="$(_get_block_size $testdir)"
nr_blks=10240
-umount $SCRATCH_MNT
+_umount $SCRATCH_MNT
sz_bytes=$((nr_blks * 8 * blksz))
if [ $sz_bytes -lt $((32 * 1048576)) ]; then
sz_bytes=$((32 * 1048576))
diff --git a/tests/generic/174 b/tests/generic/174
index b9c292071445fe..d93546eeb35581 100755
--- a/tests/generic/174
+++ b/tests/generic/174
@@ -37,7 +37,7 @@ mkdir $testdir
echo "Reformat with appropriate size"
blksz="$(_get_block_size $testdir)"
nr_blks=10240
-umount $SCRATCH_MNT
+_umount $SCRATCH_MNT
sz_bytes=$((nr_blks * 8 * blksz))
if [ $sz_bytes -lt $((32 * 1048576)) ]; then
sz_bytes=$((32 * 1048576))
diff --git a/tests/generic/306 b/tests/generic/306
index a6ea654b67d179..e6502cb881e21e 100755
--- a/tests/generic/306
+++ b/tests/generic/306
@@ -12,7 +12,7 @@ _begin_fstest auto quick rw
# Override the default cleanup function.
_cleanup()
{
- umount $BINDFILE
+ _umount $BINDFILE
cd /
rm -f $tmp.*
}
diff --git a/tests/generic/330 b/tests/generic/330
index 4fa81f9913ee7e..ab9af84611d725 100755
--- a/tests/generic/330
+++ b/tests/generic/330
@@ -61,7 +61,7 @@ md5sum $testdir/file1 | _filter_scratch
md5sum $testdir/file2 | _filter_scratch
echo "Check for damage"
-umount $SCRATCH_MNT
+_umount $SCRATCH_MNT
_repair_scratch_fs >> $seqres.full
# success, all done
diff --git a/tests/generic/332 b/tests/generic/332
index 4a61e4a02a7cdc..b15546d66a41e0 100755
--- a/tests/generic/332
+++ b/tests/generic/332
@@ -61,7 +61,7 @@ md5sum $testdir/file1 | _filter_scratch
md5sum $testdir/file2 | _filter_scratch
echo "Check for damage"
-umount $SCRATCH_MNT
+_umount $SCRATCH_MNT
_repair_scratch_fs >> $seqres.full
# success, all done
diff --git a/tests/generic/395 b/tests/generic/395
index 45787fff06be1d..d0600d0282c6a4 100755
--- a/tests/generic/395
+++ b/tests/generic/395
@@ -75,7 +75,7 @@ mount --bind $SCRATCH_MNT $SCRATCH_MNT/ro_bind_mnt
mount -o remount,ro,bind $SCRATCH_MNT/ro_bind_mnt
_set_encpolicy $SCRATCH_MNT/ro_bind_mnt/ro_dir |& _filter_scratch
_get_encpolicy $SCRATCH_MNT/ro_bind_mnt/ro_dir |& _filter_scratch
-umount $SCRATCH_MNT/ro_bind_mnt
+_umount $SCRATCH_MNT/ro_bind_mnt
# success, all done
status=0
diff --git a/tests/generic/563 b/tests/generic/563
index ade66f93fbf30b..166774653a66d6 100755
--- a/tests/generic/563
+++ b/tests/generic/563
@@ -21,7 +21,7 @@ _cleanup()
echo $$ > $cgdir/cgroup.procs
rmdir $cgdir/$seq-cg* > /dev/null 2>&1
- umount $SCRATCH_MNT > /dev/null 2>&1
+ _umount $SCRATCH_MNT > /dev/null 2>&1
_destroy_loop_device $LOOP_DEV > /dev/null 2>&1
}
@@ -80,7 +80,7 @@ reset()
rmdir $cgdir/$seq-cg* > /dev/null 2>&1
$XFS_IO_PROG -fc "pwrite 0 $iosize" $SCRATCH_MNT/file \
>> $seqres.full 2>&1
- umount $SCRATCH_MNT || _fail "umount failed"
+ _umount $SCRATCH_MNT || _fail "umount failed"
_mount $LOOP_DEV $SCRATCH_MNT || _fail "mount failed"
stat $SCRATCH_MNT/file > /dev/null
}
diff --git a/tests/generic/631 b/tests/generic/631
index c7c95e5608b760..c9f8299c948f83 100755
--- a/tests/generic/631
+++ b/tests/generic/631
@@ -84,7 +84,7 @@ worker() {
touch $mergedir/etc/access.conf
mv $mergedir/etc/access.conf $mergedir/etc/access.conf.bak
touch $mergedir/etc/access.conf
- umount $mergedir
+ _umount $mergedir
done
rm -f $SCRATCH_MNT/workers/$tag
}
diff --git a/tests/generic/717 b/tests/generic/717
index 4378e964ab8597..7ff356e255b3d1 100755
--- a/tests/generic/717
+++ b/tests/generic/717
@@ -85,7 +85,7 @@ mkdir -p $SCRATCH_MNT/xyz
mount --bind $dir $SCRATCH_MNT/xyz --bind
_pwrite_byte 0x60 0 $((blksz * (nrblks + 2))) $dir/c >> $seqres.full
$XFS_IO_PROG -c "exchangerange $SCRATCH_MNT/xyz/c" $dir/a
-umount $SCRATCH_MNT/xyz
+_umount $SCRATCH_MNT/xyz
echo Swapping a file with itself
$XFS_IO_PROG -c "exchangerange $dir/a" $dir/a
diff --git a/tests/xfs/014 b/tests/xfs/014
index 098f64186e1134..efae4efa5138f5 100755
--- a/tests/xfs/014
+++ b/tests/xfs/014
@@ -22,7 +22,7 @@ _begin_fstest auto enospc quick quota prealloc
_cleanup()
{
cd /
- umount $LOOP_MNT 2>/dev/null
+ _umount $LOOP_MNT 2>/dev/null
_scratch_unmount 2>/dev/null
rm -f $tmp.*
}
@@ -174,7 +174,7 @@ mount -t xfs -o loop,uquota,gquota $LOOP_FILE $LOOP_MNT || \
_test_enospc $LOOP_MNT
_test_edquot $LOOP_MNT
-umount $LOOP_MNT
+_umount $LOOP_MNT
echo $orig_sp_time > /proc/sys/fs/xfs/speculative_prealloc_lifetime
diff --git a/tests/xfs/049 b/tests/xfs/049
index 668ac374576a69..89ee1dbdff4f10 100755
--- a/tests/xfs/049
+++ b/tests/xfs/049
@@ -13,8 +13,8 @@ _begin_fstest rw auto quick
_cleanup()
{
cd /
- umount $SCRATCH_MNT/test2 > /dev/null 2>&1
- umount $SCRATCH_MNT/test > /dev/null 2>&1
+ _umount $SCRATCH_MNT/test2 > /dev/null 2>&1
+ _umount $SCRATCH_MNT/test > /dev/null 2>&1
rm -f $tmp.*
if [ -w $seqres.full ]
@@ -96,11 +96,11 @@ rm -rf $SCRATCH_MNT/test/* >> $seqres.full 2>&1 \
|| _fail "!!! clean failed"
_log "umount ext2 on xfs"
-umount $SCRATCH_MNT/test2 >> $seqres.full 2>&1 \
+_umount $SCRATCH_MNT/test2 >> $seqres.full 2>&1 \
|| _fail "!!! umount ext2 failed"
_log "umount xfs"
-umount $SCRATCH_MNT/test >> $seqres.full 2>&1 \
+_umount $SCRATCH_MNT/test >> $seqres.full 2>&1 \
|| _fail "!!! umount xfs failed"
echo "--- mounts at end (before cleanup)" >> $seqres.full
diff --git a/tests/xfs/073 b/tests/xfs/073
index 28f1fad08b8c96..7d99179b7bc974 100755
--- a/tests/xfs/073
+++ b/tests/xfs/073
@@ -21,9 +21,9 @@ _cleanup()
{
cd /
_scratch_unmount 2>/dev/null
- umount $imgs.loop 2>/dev/null
+ _umount $imgs.loop 2>/dev/null
[ -d $imgs.loop ] && rmdir $imgs.loop
- umount $imgs.source_dir 2>/dev/null
+ _umount $imgs.source_dir 2>/dev/null
[ -d $imgs.source_dir ] && rm -rf $imgs.source_dir
rm -f $imgs.* $tmp.* /var/tmp/xfs_copy.log.*
}
@@ -98,8 +98,8 @@ _verify_copy()
diff -u $tmp.geometry1 $tmp.geometry2
echo unmounting and removing new image
- umount $source_dir
- umount $target_dir > /dev/null 2>&1
+ _umount $source_dir
+ _umount $target_dir > /dev/null 2>&1
rm -f $target
}
diff --git a/tests/xfs/074 b/tests/xfs/074
index 278f0ade694d22..282642a8674557 100755
--- a/tests/xfs/074
+++ b/tests/xfs/074
@@ -59,7 +59,7 @@ $XFS_IO_PROG -ft \
-c "falloc 0 $(($BLOCK_SIZE * 2097152))" \
$LOOP_MNT/foo >> $seqres.full
-umount $LOOP_MNT
+_umount $LOOP_MNT
_check_xfs_filesystem $LOOP_DEV none none
_mkfs_dev -f $LOOP_DEV
@@ -72,7 +72,7 @@ $XFS_IO_PROG -ft \
-c "falloc 1023m 2g" \
$LOOP_MNT/foo >> $seqres.full
-umount $LOOP_MNT
+_umount $LOOP_MNT
_check_xfs_filesystem $LOOP_DEV none none
# success, all done
diff --git a/tests/xfs/083 b/tests/xfs/083
index 9291c8c0382489..875937e6ffe3b3 100755
--- a/tests/xfs/083
+++ b/tests/xfs/083
@@ -57,7 +57,7 @@ scratch_repair() {
_scratch_xfs_repair -L >> "${FSCK_LOG}" 2>&1
echo "+++ returns $?" >> "${FSCK_LOG}"
else
- umount "${SCRATCH_MNT}" >> "${FSCK_LOG}" 2>&1
+ _umount "${SCRATCH_MNT}" >> "${FSCK_LOG}" 2>&1
fi
elif [ "${fsck_pass}" -eq "${FSCK_PASSES}" ]; then
echo "++ fsck did not fix in ${FSCK_PASSES} passes." >> "${FSCK_LOG}"
@@ -109,7 +109,7 @@ echo "+++ modify scratch" >> $seqres.full
_scratch_fuzz_modify >> $seqres.full 2>&1
echo "++ umount" >> $seqres.full
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
# repair in a loop...
for p in $(seq 1 "${FSCK_PASSES}"); do
@@ -134,7 +134,7 @@ echo "+++ modify scratch" >> $ROUND2_LOG
_scratch_fuzz_modify >> $ROUND2_LOG 2>&1
echo "++ umount" >> $ROUND2_LOG
-umount "${SCRATCH_MNT}" >> $ROUND2_LOG 2>&1
+_umount "${SCRATCH_MNT}" >> $ROUND2_LOG 2>&1
cat "$ROUND2_LOG" >> $seqres.full
diff --git a/tests/xfs/085 b/tests/xfs/085
index d33dd199e6f9c1..9faf16fde5cdab 100755
--- a/tests/xfs/085
+++ b/tests/xfs/085
@@ -54,7 +54,7 @@ for x in `seq 2 64`; do
done
inode="$(stat -c '%i' "${TESTFILE}.1")"
agcount="$(_xfs_mount_agcount $SCRATCH_MNT)"
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ check fs"
_scratch_xfs_repair -n >> $seqres.full 2>&1 || _fail "xfs_repair should not fail"
@@ -82,7 +82,7 @@ for x in `seq 1 64`; do
test $? -ne 0 && broken=1
done
echo "broken: ${broken}"
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ check fs (2)"
_scratch_xfs_repair -n >> $seqres.full 2>&1 || _fail "xfs_repair should not fail"
diff --git a/tests/xfs/086 b/tests/xfs/086
index 44985f3913254d..03327cdeaf3f08 100755
--- a/tests/xfs/086
+++ b/tests/xfs/086
@@ -56,7 +56,7 @@ done
inode="$(stat -c '%i' "${TESTFILE}.1")"
agcount="$(_xfs_mount_agcount $SCRATCH_MNT)"
test "${agcount}" -gt 1 || _notrun "Single-AG XFS not supported"
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ check fs"
_scratch_xfs_repair -n >> $seqres.full 2>&1 || _fail "xfs_repair should not fail"
@@ -73,7 +73,7 @@ if _try_scratch_mount >> $seqres.full 2>&1; then
for x in `seq 1 64`; do
$XFS_IO_PROG -f -c "pwrite -S 0x62 0 ${blksz}" "${TESTFILE}.${x}" >> $seqres.full
done
- umount "${SCRATCH_MNT}"
+ _umount "${SCRATCH_MNT}"
fi
echo "+ repair fs"
@@ -97,7 +97,7 @@ echo "+ modify files (2)"
for x in `seq 1 64`; do
$XFS_IO_PROG -f -c "pwrite -S 0x62 ${blksz} ${blksz}" "${TESTFILE}.${x}" >> $seqres.full
done
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ repair fs"
_repair_scratch_fs >> $seqres.full 2>&1
@@ -114,7 +114,7 @@ for x in `seq 1 64`; do
test -s "${TESTFILE}.${x}" || broken=1
done
echo "broken: ${broken}"
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ check fs (2)"
_scratch_xfs_repair -n >> $seqres.full 2>&1 || _fail "xfs_repair should not fail"
diff --git a/tests/xfs/087 b/tests/xfs/087
index 3cca105685fc6a..aeef30657b9491 100755
--- a/tests/xfs/087
+++ b/tests/xfs/087
@@ -55,7 +55,7 @@ for x in `seq 2 64`; do
done
inode="$(stat -c '%i' "${TESTFILE}.1")"
agcount="$(_xfs_mount_agcount $SCRATCH_MNT)"
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ check fs"
_scratch_xfs_repair -n >> $seqres.full 2>&1 || _fail "xfs_repair should not fail"
@@ -72,7 +72,7 @@ if _try_scratch_mount >> $seqres.full 2>&1; then
for x in `seq 65 70`; do
touch "${TESTFILE}.${x}" 2> /dev/null && broken=0
done
- umount "${SCRATCH_MNT}"
+ _umount "${SCRATCH_MNT}"
fi
echo "broken: ${broken}"
@@ -91,7 +91,7 @@ for x in `seq 65 70`; do
touch "${TESTFILE}.${x}" || broken=1
done
echo "broken: ${broken}"
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ check fs (2)"
_scratch_xfs_repair -n >> $seqres.full 2>&1 || _fail "xfs_repair should not fail"
diff --git a/tests/xfs/088 b/tests/xfs/088
index b54a1ab7d00342..de100136014ba7 100755
--- a/tests/xfs/088
+++ b/tests/xfs/088
@@ -56,7 +56,7 @@ for x in `seq 2 64`; do
done
inode="$(stat -c '%i' "${TESTFILE}.1")"
agcount="$(_xfs_mount_agcount $SCRATCH_MNT)"
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ check fs"
_scratch_xfs_repair -n >> $seqres.full 2>&1 || _fail "xfs_repair should not fail"
@@ -73,7 +73,7 @@ if _try_scratch_mount >> $seqres.full 2>&1; then
for x in `seq 1 64`; do
$XFS_IO_PROG -f -c "pwrite -S 0x62 0 ${blksz}" "${TESTFILE}.${x}" >> $seqres.full 2>> $seqres.full
done
- umount "${SCRATCH_MNT}"
+ _umount "${SCRATCH_MNT}"
fi
echo "+ repair fs"
@@ -97,7 +97,7 @@ echo "+ modify files (2)"
for x in `seq 1 64`; do
$XFS_IO_PROG -f -c "pwrite -S 0x62 ${blksz} ${blksz}" "${TESTFILE}.${x}" >> $seqres.full
done
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ repair fs"
_repair_scratch_fs >> $seqres.full 2>&1
@@ -114,7 +114,7 @@ for x in `seq 1 64`; do
test -s "${TESTFILE}.${x}" || broken=1
done
echo "broken: ${broken}"
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ check fs (2)"
_scratch_xfs_repair -n >> $seqres.full 2>&1 || _fail "xfs_repair should not fail"
diff --git a/tests/xfs/089 b/tests/xfs/089
index ff3ae719326eca..f5640a46177578 100755
--- a/tests/xfs/089
+++ b/tests/xfs/089
@@ -56,7 +56,7 @@ for x in `seq 2 64`; do
done
inode="$(stat -c '%i' "${TESTFILE}.1")"
agcount="$(_xfs_mount_agcount $SCRATCH_MNT)"
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ check fs"
_scratch_xfs_repair -n >> $seqres.full 2>&1 || _fail "xfs_repair should not fail"
@@ -73,7 +73,7 @@ if _try_scratch_mount >> $seqres.full 2>&1; then
for x in `seq 1 64`; do
$XFS_IO_PROG -f -c "pwrite -S 0x62 0 ${blksz}" "${TESTFILE}.${x}" >> $seqres.full 2>> $seqres.full
done
- umount "${SCRATCH_MNT}"
+ _umount "${SCRATCH_MNT}"
fi
echo "+ repair fs"
@@ -98,7 +98,7 @@ echo "+ modify files (2)"
for x in `seq 1 64`; do
$XFS_IO_PROG -f -c "pwrite -S 0x62 ${blksz} ${blksz}" "${TESTFILE}.${x}" >> $seqres.full
done
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ repair fs"
_repair_scratch_fs >> $seqres.full 2>&1
@@ -115,7 +115,7 @@ for x in `seq 1 64`; do
test -s "${TESTFILE}.${x}" || broken=1
done
echo "broken: ${broken}"
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ check fs (2)"
_scratch_xfs_repair -n >> $seqres.full 2>&1 || _fail "xfs_repair should not fail"
diff --git a/tests/xfs/091 b/tests/xfs/091
index 3f606f8845797d..c7857cdf1b690b 100755
--- a/tests/xfs/091
+++ b/tests/xfs/091
@@ -56,7 +56,7 @@ for x in `seq 2 64`; do
done
inode="$(stat -c '%i' "${TESTFILE}.1")"
agcount="$(_xfs_mount_agcount $SCRATCH_MNT)"
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ check fs"
_scratch_xfs_repair -n >> $seqres.full 2>&1 || _fail "xfs_repair should not fail"
@@ -73,7 +73,7 @@ if _try_scratch_mount >> $seqres.full 2>&1; then
for x in `seq 1 64`; do
$XFS_IO_PROG -f -c "pwrite -S 0x62 0 ${blksz}" "${TESTFILE}.${x}" >> $seqres.full 2>> $seqres.full
done
- umount "${SCRATCH_MNT}"
+ _umount "${SCRATCH_MNT}"
fi
echo "+ repair fs"
@@ -98,7 +98,7 @@ echo "+ modify files (2)"
for x in `seq 1 64`; do
$XFS_IO_PROG -f -c "pwrite -S 0x62 ${blksz} ${blksz}" "${TESTFILE}.${x}" >> $seqres.full
done
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ repair fs"
_repair_scratch_fs >> $seqres.full 2>&1
@@ -115,7 +115,7 @@ for x in `seq 1 64`; do
test -s "${TESTFILE}.${x}" || broken=1
done
echo "broken: ${broken}"
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ check fs (2)"
_scratch_xfs_repair -n >> $seqres.full 2>&1 || _fail "xfs_repair should not fail"
diff --git a/tests/xfs/093 b/tests/xfs/093
index c4e8006063e121..cfb2a8c80c1770 100755
--- a/tests/xfs/093
+++ b/tests/xfs/093
@@ -55,7 +55,7 @@ for x in `seq 2 64`; do
done
inode="$(stat -c '%i' "${TESTFILE}.1")"
agcount="$(_xfs_mount_agcount $SCRATCH_MNT)"
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ check fs"
_scratch_xfs_repair -n >> $seqres.full 2>&1 || _fail "xfs_repair should not fail"
@@ -72,7 +72,7 @@ if _try_scratch_mount >> $seqres.full 2>&1; then
for x in `seq 65 70`; do
touch "${TESTFILE}.${x}" 2> /dev/null && broken=0
done
- umount "${SCRATCH_MNT}"
+ _umount "${SCRATCH_MNT}"
fi
echo "broken: ${broken}"
@@ -94,7 +94,7 @@ for x in `seq 65 70`; do
touch "${TESTFILE}.${x}" || broken=1
done
echo "broken: ${broken}"
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ check fs (2)"
_scratch_xfs_repair -n >> $seqres.full 2>&1 || _fail "xfs_repair should not fail"
diff --git a/tests/xfs/097 b/tests/xfs/097
index 384c76080ddcf4..0fcf65a2a8f65a 100755
--- a/tests/xfs/097
+++ b/tests/xfs/097
@@ -58,7 +58,7 @@ for x in `seq 2 64`; do
done
inode="$(stat -c '%i' "${TESTFILE}.1")"
agcount="$(_xfs_mount_agcount $SCRATCH_MNT)"
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ check fs"
_scratch_xfs_repair -n >> $seqres.full 2>&1 || _fail "xfs_repair should not fail"
@@ -74,7 +74,7 @@ if _try_scratch_mount >> $seqres.full 2>&1; then
for x in `seq 65 70`; do
touch "${TESTFILE}.${x}" 2> /dev/null && broken=0
done
- umount "${SCRATCH_MNT}"
+ _umount "${SCRATCH_MNT}"
fi
echo "broken: ${broken}"
@@ -93,7 +93,7 @@ for x in `seq 65 70`; do
touch "${TESTFILE}.${x}" || broken=1
done
echo "broken: ${broken}"
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ check fs (2)"
_scratch_xfs_repair -n >> $seqres.full 2>&1 || _fail "xfs_repair should not fail"
diff --git a/tests/xfs/098 b/tests/xfs/098
index a47cda67e14e29..48eb3fa2b3a753 100755
--- a/tests/xfs/098
+++ b/tests/xfs/098
@@ -56,7 +56,7 @@ for x in `seq 2 64`; do
touch "${TESTFILE}.${x}"
done
inode="$(stat -c '%i' "${TESTFILE}.1")"
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ check fs"
_scratch_xfs_repair -n >> $seqres.full 2>&1 || _fail "xfs_repair should not fail"
@@ -98,7 +98,7 @@ for x in `seq 1 64`; do
test $? -ne 0 && broken=1
done
echo "broken: ${broken}"
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ check fs (2)"
_scratch_xfs_repair -n >> $seqres.full 2>&1 || _fail "xfs_repair should not fail"
diff --git a/tests/xfs/099 b/tests/xfs/099
index f5321fe3d20b1c..17e1e8df7bf751 100755
--- a/tests/xfs/099
+++ b/tests/xfs/099
@@ -44,7 +44,7 @@ node_lblk="$((64 * 1073741824 / blksz))"
echo "+ make some files"
__populate_create_dir "${SCRATCH_MNT}/blockdir" "${nr}"
inode="$(stat -c '%i' "${SCRATCH_MNT}/blockdir")"
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ check fs"
_scratch_xfs_repair -n >> $seqres.full 2>&1 || _fail "xfs_repair should not fail"
@@ -60,7 +60,7 @@ if _try_scratch_mount >> $seqres.full 2>&1; then
rm -rf "${SCRATCH_MNT}/blockdir/00000000" 2> /dev/null && _fail "modified corrupt directory"
mkdir "${SCRATCH_MNT}/blockdir/xxxxxxxx" 2> /dev/null && _fail "add to corrupt directory"
- umount "${SCRATCH_MNT}"
+ _umount "${SCRATCH_MNT}"
fi
echo "+ repair fs"
@@ -77,7 +77,7 @@ echo "+ modify dir (2)"
mkdir -p "${SCRATCH_MNT}/blockdir"
rm -rf "${SCRATCH_MNT}/blockdir/00000000" || _fail "couldn't modify repaired directory"
mkdir "${SCRATCH_MNT}/blockdir/xxxxxxxx" || _fail "add to repaired directory"
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ check fs (2)"
_scratch_xfs_repair -n >> $seqres.full 2>&1 || _fail "xfs_repair should not fail"
diff --git a/tests/xfs/100 b/tests/xfs/100
index 6f465a79c926d2..dd50d984800335 100755
--- a/tests/xfs/100
+++ b/tests/xfs/100
@@ -44,7 +44,7 @@ node_lblk="$((64 * 1073741824 / blksz))"
echo "+ make some files"
__populate_create_dir "${SCRATCH_MNT}/blockdir" "${nr}"
inode="$(stat -c '%i' "${SCRATCH_MNT}/blockdir")"
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ check fs"
_scratch_xfs_repair -n >> $seqres.full 2>&1 || _fail "xfs_repair should not fail"
@@ -65,7 +65,7 @@ if _try_scratch_mount >> $seqres.full 2>&1; then
rm -rf "${SCRATCH_MNT}/blockdir/00000000" 2> /dev/null && _fail "modified corrupt directory"
mkdir "${SCRATCH_MNT}/blockdir/xxxxxxxx" 2> /dev/null && _fail "add to corrupt directory"
- umount "${SCRATCH_MNT}"
+ _umount "${SCRATCH_MNT}"
fi
echo "+ repair fs"
@@ -82,7 +82,7 @@ echo "+ modify dir (2)"
mkdir -p "${SCRATCH_MNT}/blockdir"
rm -rf "${SCRATCH_MNT}/blockdir/00000000" || _fail "couldn't modify repaired directory"
mkdir "${SCRATCH_MNT}/blockdir/xxxxxxxx" || _fail "add to repaired directory"
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ check fs (2)"
_scratch_xfs_repair -n >> $seqres.full 2>&1 || _fail "xfs_repair should not fail"
diff --git a/tests/xfs/101 b/tests/xfs/101
index a926acb0bc6735..2abcd711b18703 100755
--- a/tests/xfs/101
+++ b/tests/xfs/101
@@ -44,7 +44,7 @@ node_lblk="$((64 * 1073741824 / blksz))"
echo "+ make some files"
__populate_create_dir "${SCRATCH_MNT}/blockdir" "${nr}"
inode="$(stat -c '%i' "${SCRATCH_MNT}/blockdir")"
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ check fs"
_scratch_xfs_repair -n >> $seqres.full 2>&1 || _fail "xfs_repair should not fail"
@@ -60,7 +60,7 @@ if _try_scratch_mount >> $seqres.full 2>&1; then
rm -rf "${SCRATCH_MNT}/blockdir/00000000" 2> /dev/null && _fail "modified corrupt directory"
mkdir "${SCRATCH_MNT}/blockdir/xxxxxxxx" 2> /dev/null && _fail "add to corrupt directory"
- umount "${SCRATCH_MNT}"
+ _umount "${SCRATCH_MNT}"
fi
echo "+ repair fs"
@@ -77,7 +77,7 @@ echo "+ modify dir (2)"
mkdir -p "${SCRATCH_MNT}/blockdir"
rm -rf "${SCRATCH_MNT}/blockdir/00000000" || _fail "couldn't modify repaired directory"
mkdir "${SCRATCH_MNT}/blockdir/xxxxxxxx" || _fail "add to repaired directory"
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ check fs (2)"
_scratch_xfs_repair -n >> $seqres.full 2>&1 || _fail "xfs_repair should not fail"
diff --git a/tests/xfs/102 b/tests/xfs/102
index c3ddec5e432dc5..5a7c036ce55751 100755
--- a/tests/xfs/102
+++ b/tests/xfs/102
@@ -44,7 +44,7 @@ node_lblk="$((64 * 1073741824 / blksz))"
echo "+ make some files"
__populate_create_dir "${SCRATCH_MNT}/blockdir" "${nr}" true
inode="$(stat -c '%i' "${SCRATCH_MNT}/blockdir")"
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ check fs"
_scratch_xfs_repair -n >> $seqres.full 2>&1 || _fail "xfs_repair should not fail"
@@ -65,7 +65,7 @@ if _try_scratch_mount >> $seqres.full 2>&1; then
rm -rf "${SCRATCH_MNT}/blockdir/00000000" 2> /dev/null && _fail "modified corrupt directory"
mkdir "${SCRATCH_MNT}/blockdir/xxxxxxxx" 2> /dev/null && _fail "add to corrupt directory"
- umount "${SCRATCH_MNT}"
+ _umount "${SCRATCH_MNT}"
fi
echo "+ repair fs"
@@ -82,7 +82,7 @@ echo "+ modify dir (2)"
mkdir -p "${SCRATCH_MNT}/blockdir"
rm -rf "${SCRATCH_MNT}/blockdir/00000000" || _fail "couldn't modify repaired directory"
mkdir "${SCRATCH_MNT}/blockdir/xxxxxxxx" || _fail "add to repaired directory"
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ check fs (2)"
_scratch_xfs_repair -n >> $seqres.full 2>&1 || _fail "xfs_repair should not fail"
diff --git a/tests/xfs/105 b/tests/xfs/105
index 132aa07f8300ef..30d4dc47ec1fed 100755
--- a/tests/xfs/105
+++ b/tests/xfs/105
@@ -44,7 +44,7 @@ node_lblk="$((64 * 1073741824 / blksz))"
echo "+ make some files"
__populate_create_dir "${SCRATCH_MNT}/blockdir" "${nr}" true
inode="$(stat -c '%i' "${SCRATCH_MNT}/blockdir")"
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ check fs"
_scratch_xfs_repair -n >> $seqres.full 2>&1 || _fail "xfs_repair should not fail"
@@ -65,7 +65,7 @@ if _try_scratch_mount >> $seqres.full 2>&1; then
rm -rf "${SCRATCH_MNT}/blockdir/00000000" 2> /dev/null && _fail "modified corrupt directory"
mkdir "${SCRATCH_MNT}/blockdir/xxxxxxxx" 2> /dev/null && _fail "add to corrupt directory"
- umount "${SCRATCH_MNT}"
+ _umount "${SCRATCH_MNT}"
fi
echo "+ repair fs"
@@ -82,7 +82,7 @@ echo "+ modify dir (2)"
mkdir -p "${SCRATCH_MNT}/blockdir"
rm -rf "${SCRATCH_MNT}/blockdir/00000000" || _fail "couldn't modify repaired directory"
mkdir "${SCRATCH_MNT}/blockdir/xxxxxxxx" || _fail "add to repaired directory"
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ check fs (2)"
_scratch_xfs_repair -n >> $seqres.full 2>&1 || _fail "xfs_repair should not fail"
diff --git a/tests/xfs/112 b/tests/xfs/112
index f0e717cf26d8c9..267432a863a92d 100755
--- a/tests/xfs/112
+++ b/tests/xfs/112
@@ -44,7 +44,7 @@ node_lblk="$((64 * 1073741824 / blksz))"
echo "+ make some files"
__populate_create_dir "${SCRATCH_MNT}/blockdir" "${nr}" true
inode="$(stat -c '%i' "${SCRATCH_MNT}/blockdir")"
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ check fs"
_scratch_xfs_repair -n >> $seqres.full 2>&1 || _fail "xfs_repair should not fail"
@@ -65,14 +65,14 @@ if _try_scratch_mount >> $seqres.full 2>&1; then
rm -rf "${SCRATCH_MNT}/blockdir/00000000" 2> /dev/null && _fail "modified corrupt directory"
mkdir "${SCRATCH_MNT}/blockdir/xxxxxxxx" 2> /dev/null && _fail "add to corrupt directory"
- umount "${SCRATCH_MNT}"
+ _umount "${SCRATCH_MNT}"
fi
echo "+ repair fs"
_repair_scratch_fs >> $seqres.full 2>&1
if [ $? -eq 2 ]; then
_scratch_mount
- umount "${SCRATCH_MNT}"
+ _umount "${SCRATCH_MNT}"
_repair_scratch_fs >> $seqres.full 2>&1
fi
@@ -86,7 +86,7 @@ echo "+ modify dir (2)"
mkdir -p "${SCRATCH_MNT}/blockdir"
rm -rf "${SCRATCH_MNT}/blockdir/00000000" || _fail "couldn't modify repaired directory"
mkdir "${SCRATCH_MNT}/blockdir/xxxxxxxx" || _fail "add to repaired directory"
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ check fs (2)"
_scratch_xfs_repair -n >> $seqres.full 2>&1 || _fail "xfs_repair should not fail"
diff --git a/tests/xfs/113 b/tests/xfs/113
index 22ac8c3fd51b80..2f19346aa74b3d 100755
--- a/tests/xfs/113
+++ b/tests/xfs/113
@@ -44,7 +44,7 @@ node_lblk="$((64 * 1073741824 / blksz))"
echo "+ make some files"
__populate_create_dir "${SCRATCH_MNT}/blockdir" "${nr}" true
inode="$(stat -c '%i' "${SCRATCH_MNT}/blockdir")"
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ check fs"
_scratch_xfs_repair -n >> $seqres.full 2>&1 || _fail "xfs_repair should not fail"
@@ -86,7 +86,7 @@ if _try_scratch_mount >> $seqres.full 2>&1; then
rm -rf "${SCRATCH_MNT}/blockdir/00000000" 2> /dev/null && _fail "modified corrupt directory"
mkdir "${SCRATCH_MNT}/blockdir/xxxxxxxx" 2> /dev/null && _fail "add to corrupt directory"
- umount "${SCRATCH_MNT}"
+ _umount "${SCRATCH_MNT}"
fi
echo "+ repair fs"
@@ -103,7 +103,7 @@ echo "+ modify dir (2)"
mkdir -p "${SCRATCH_MNT}/blockdir"
rm -rf "${SCRATCH_MNT}/blockdir/00000000" || _fail "couldn't modify repaired directory"
mkdir "${SCRATCH_MNT}/blockdir/xxxxxxxx" || _fail "add to repaired directory"
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ check fs (2)"
_scratch_xfs_repair -n >> $seqres.full 2>&1 || _fail "xfs_repair should not fail"
diff --git a/tests/xfs/117 b/tests/xfs/117
index 0ca8f1b96ddfd9..ae73ddbebfd53b 100755
--- a/tests/xfs/117
+++ b/tests/xfs/117
@@ -65,7 +65,7 @@ for ((i = 0; i < 64; i++)); do
done
echo "First victim inode is: " >> $seqres.full
stat -c '%i' "$fname" >> $seqres.full
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ check fs"
_scratch_xfs_repair -n >> $seqres.full 2>&1 || _fail "xfs_repair should not fail"
@@ -85,7 +85,7 @@ if _try_scratch_mount >> $seqres.full 2>&1; then
touch "$fname" &>> $seqres.full
test $? -eq 0 && broken=0
done
- umount "${SCRATCH_MNT}"
+ _umount "${SCRATCH_MNT}"
fi
echo "broken: ${broken}"
@@ -110,7 +110,7 @@ for x in `seq 1 64`; do
echo "${x}: broken=${broken}" >> $seqres.full
done
echo "broken: ${broken}"
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ check fs (2)"
_scratch_xfs_repair -n >> $seqres.full 2>&1 || _fail "xfs_repair should not fail"
diff --git a/tests/xfs/120 b/tests/xfs/120
index f1f047f53a351b..9d0cc12a3e8b8d 100755
--- a/tests/xfs/120
+++ b/tests/xfs/120
@@ -45,7 +45,7 @@ for i in $(seq 1 2 ${nr}); do
$XFS_IO_PROG -f -c "fpunch $((i * blksz)) ${blksz}" "${SCRATCH_MNT}/bigfile" >> $seqres.full
done
inode="$(stat -c '%i' "${SCRATCH_MNT}/bigfile")"
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ check fs"
_scratch_xfs_repair -n >> $seqres.full 2>&1 || _fail "xfs_repair should not fail"
@@ -60,7 +60,7 @@ if _try_scratch_mount >> $seqres.full 2>&1; then
$XFS_IO_PROG -f -c "pwrite -S 0x62 ${blksz} ${blksz}" -c 'fsync' "${SCRATCH_MNT}/bigfile" >> $seqres.full 2> /dev/null
after="$(stat -c '%b' "${SCRATCH_MNT}/bigfile")"
test "${before}" -eq "${after}" || _fail "pwrite should fail on corrupt bmbt"
- umount "${SCRATCH_MNT}"
+ _umount "${SCRATCH_MNT}"
fi
echo "+ repair fs"
@@ -78,7 +78,7 @@ before="$(stat -c '%b' "${SCRATCH_MNT}/bigfile")"
$XFS_IO_PROG -f -c "pwrite -S 0x62 ${blksz} ${blksz}" -c 'fsync' "${SCRATCH_MNT}/bigfile" >> $seqres.full 2> /dev/null
after="$(stat -c '%b' "${SCRATCH_MNT}/bigfile")"
test "${before}" -ne "${after}" || _fail "pwrite failed after fixing corrupt bmbt"
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ check fs (2)"
_scratch_xfs_repair -n >> $seqres.full 2>&1 || _fail "xfs_repair should not fail"
diff --git a/tests/xfs/123 b/tests/xfs/123
index 6b56551374cd8f..5bd3c86372058e 100755
--- a/tests/xfs/123
+++ b/tests/xfs/123
@@ -44,7 +44,7 @@ str="$(perl -e "print './' x $reps;")x"
(cd $SCRATCH_MNT; ln -s "${str}" "long_symlink")
cat "${SCRATCH_MNT}/long_symlink"
inode="$(stat -c '%i' "${SCRATCH_MNT}/long_symlink")"
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ check fs"
_scratch_xfs_repair -n >> $seqres.full 2>&1 || _fail "xfs_repair should not fail"
@@ -55,7 +55,7 @@ _scratch_xfs_db -x -c "inode ${inode}" -c "dblock 0" -c "stack" -c "blocktrash -
echo "+ mount image"
if _try_scratch_mount >> $seqres.full 2>&1; then
cat "${SCRATCH_MNT}/long_symlink" 2>/dev/null && _fail "symlink should be broken"
- umount "${SCRATCH_MNT}"
+ _umount "${SCRATCH_MNT}"
fi
echo "+ repair fs"
@@ -64,7 +64,7 @@ _repair_scratch_fs >> $seqres.full 2>&1
echo "+ mount image (2)"
_scratch_mount
cat "${SCRATCH_MNT}/long_symlink" 2>/dev/null && _fail "symlink should be broken"
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ check fs (2)"
_scratch_xfs_repair -n >> $seqres.full 2>&1 || _fail "xfs_repair should not fail"
diff --git a/tests/xfs/124 b/tests/xfs/124
index fe870dc96cc783..7890434b397262 100755
--- a/tests/xfs/124
+++ b/tests/xfs/124
@@ -46,7 +46,7 @@ seq 0 "${nr}" | while read d; do
setfattr -n "user.x$(printf "%.08d" "$d")" -v "0000000000000000" "${SCRATCH_MNT}/attrfile"
done
inode="$(stat -c '%i' "${SCRATCH_MNT}/attrfile")"
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ check fs"
_scratch_xfs_repair -n >> $seqres.full 2>&1 || _fail "xfs_repair should not fail"
@@ -64,7 +64,7 @@ echo "+ mount image && modify xattr"
if _try_scratch_mount >> $seqres.full 2>&1; then
setfattr -x "user.x00000000" "${SCRATCH_MNT}/attrfile" 2> /dev/null && _fail "modified corrupt xattr"
- umount "${SCRATCH_MNT}"
+ _umount "${SCRATCH_MNT}"
fi
echo "+ repair fs"
@@ -80,7 +80,7 @@ $CHATTR_PROG -R -f -i "${SCRATCH_MNT}/"
echo "+ modify xattr (2)"
getfattr "${SCRATCH_MNT}/attrfile" -n "user.x00000000" > /dev/null 2>&1 && (setfattr -x "user.x00000000" "${SCRATCH_MNT}/attrfile" || _fail "remove corrupt xattr")
setfattr -n "user.x00000000" -v 'x0x0x0x0' "${SCRATCH_MNT}/attrfile" || _fail "add corrupt xattr"
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ check fs (2)"
_scratch_xfs_repair -n >> $seqres.full 2>&1 || _fail "xfs_repair should not fail"
diff --git a/tests/xfs/125 b/tests/xfs/125
index 89e93650556e40..c3770c185b4063 100755
--- a/tests/xfs/125
+++ b/tests/xfs/125
@@ -47,7 +47,7 @@ seq 1 2 "${nr}" | while read d; do
setfattr -x "user.x$(printf "%.08d" "$d")" "${SCRATCH_MNT}/attrfile"
done
inode="$(stat -c '%i' "${SCRATCH_MNT}/attrfile")"
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ check fs"
_scratch_xfs_repair -n >> $seqres.full 2>&1 || _fail "xfs_repair should not fail"
@@ -64,7 +64,7 @@ echo "+ mount image && modify xattr"
if _try_scratch_mount >> $seqres.full 2>&1; then
setfattr -x "user.x00000000" "${SCRATCH_MNT}/attrfile" 2> /dev/null && _fail "modified corrupt xattr"
- umount "${SCRATCH_MNT}"
+ _umount "${SCRATCH_MNT}"
fi
echo "+ repair fs"
@@ -80,7 +80,7 @@ $CHATTR_PROG -R -f -i "${SCRATCH_MNT}/"
echo "+ modify xattr (2)"
setfattr -n "user.x00000000" -v "1111111111111111" "${SCRATCH_MNT}/attrfile" || _fail "modified corrupt xattr"
setfattr -x "user.x00000000" "${SCRATCH_MNT}/attrfile" || _fail "delete corrupt xattr"
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ check fs (2)"
_scratch_xfs_repair -n >> $seqres.full 2>&1 || _fail "xfs_repair should not fail"
diff --git a/tests/xfs/126 b/tests/xfs/126
index 5614ea398c0142..14eb2a6157e141 100755
--- a/tests/xfs/126
+++ b/tests/xfs/126
@@ -47,7 +47,7 @@ seq 1 2 "${nr}" | while read d; do
setfattr -x "user.x$(printf "%.08d" "$d")" "${SCRATCH_MNT}/attrfile"
done
inode="$(stat -c '%i' "${SCRATCH_MNT}/attrfile")"
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ check fs"
_scratch_xfs_repair -n >> $seqres.full 2>&1 || _fail "xfs_repair should not fail"
@@ -69,7 +69,7 @@ echo "+ mount image && modify xattr"
if _try_scratch_mount >> $seqres.full 2>&1; then
setfattr -x "user.x00000000" "${SCRATCH_MNT}/attrfile" 2> /dev/null && _fail "modified corrupt xattr"
- umount "${SCRATCH_MNT}"
+ _umount "${SCRATCH_MNT}"
fi
echo "+ repair fs"
@@ -84,7 +84,7 @@ $CHATTR_PROG -R -f -i "${SCRATCH_MNT}/"
echo "+ modify xattr (2)"
getfattr "${SCRATCH_MNT}/attrfile" -n "user.x00000000" 2> /dev/null && (setfattr -x "user.x00000000" "${SCRATCH_MNT}/attrfile" || _fail "modified corrupt xattr")
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ check fs (2)"
_scratch_xfs_repair -n >> $seqres.full 2>&1 || _fail "xfs_repair should not fail"
diff --git a/tests/xfs/130 b/tests/xfs/130
index 3e6dd861c47851..b1792a98e57db6 100755
--- a/tests/xfs/130
+++ b/tests/xfs/130
@@ -78,7 +78,7 @@ $CHATTR_PROG -R -f -i "${SCRATCH_MNT}/"
echo "+ reflink more (2)"
_cp_reflink "${SCRATCH_MNT}/file1" "${SCRATCH_MNT}/file5" || \
_fail "modified refcount tree"
-umount "${SCRATCH_MNT}"
+_umount "${SCRATCH_MNT}"
echo "+ check fs (2)"
_scratch_xfs_repair -n >> "$seqres.full" 2>&1 || \
diff --git a/tests/xfs/152 b/tests/xfs/152
index 7ba00c4bfac9ff..66577cfb4617fc 100755
--- a/tests/xfs/152
+++ b/tests/xfs/152
@@ -15,7 +15,7 @@ _begin_fstest auto quick quota idmapped
wipe_mounts()
{
- umount "${SCRATCH_MNT}/idmapped" >/dev/null 2>&1
+ _umount "${SCRATCH_MNT}/idmapped" >/dev/null 2>&1
_scratch_unmount >/dev/null 2>&1
}
diff --git a/tests/xfs/169 b/tests/xfs/169
index 6400fd9e6bdc8b..16c5385cf4815a 100755
--- a/tests/xfs/169
+++ b/tests/xfs/169
@@ -15,7 +15,7 @@ _begin_fstest auto clone
_cleanup()
{
cd /
- umount $SCRATCH_MNT > /dev/null 2>&1
+ _umount $SCRATCH_MNT > /dev/null 2>&1
rm -rf $tmp.*
}
@@ -43,7 +43,7 @@ for i in 1 2 x; do
_reflink_range $testdir/file1 $((nr * blksz)) \
$testdir/file2 $((nr * blksz)) $blksz >> $seqres.full
done
- umount $SCRATCH_MNT
+ _umount $SCRATCH_MNT
_check_scratch_fs
_scratch_mount
@@ -51,7 +51,7 @@ for i in 1 2 x; do
echo "$i: Delete both files"
rm -rf $testdir/file1 $testdir/file2
- umount $SCRATCH_MNT
+ _umount $SCRATCH_MNT
_check_scratch_fs
_scratch_mount
done
diff --git a/tests/xfs/206 b/tests/xfs/206
index bfd2dee939ddd7..16a734c3751194 100755
--- a/tests/xfs/206
+++ b/tests/xfs/206
@@ -18,7 +18,7 @@ _begin_fstest growfs auto quick
# Override the default cleanup function.
_cleanup()
{
- umount $tmpdir
+ _umount $tmpdir
rmdir $tmpdir
rm -f $tmp
rm -f $tmpfile
diff --git a/tests/xfs/216 b/tests/xfs/216
index 680239b4ef788d..149c8fdfec887d 100755
--- a/tests/xfs/216
+++ b/tests/xfs/216
@@ -52,7 +52,7 @@ _do_mkfs()
-d name=$LOOP_DEV,size=${i}g $loop_mkfs_opts |grep log
mount -o loop -t xfs $LOOP_DEV $LOOP_MNT
echo "test write" > $LOOP_MNT/test
- umount $LOOP_MNT > /dev/null 2>&1
+ _umount $LOOP_MNT > /dev/null 2>&1
done
}
# make large holey file
diff --git a/tests/xfs/217 b/tests/xfs/217
index 41caaf738267d4..30a186d7294940 100755
--- a/tests/xfs/217
+++ b/tests/xfs/217
@@ -31,7 +31,7 @@ _do_mkfs()
-d name=$LOOP_DEV,size=${i}g |grep log
mount -o loop -t xfs $LOOP_DEV $LOOP_MNT
echo "test write" > $LOOP_MNT/test
- umount $LOOP_MNT > /dev/null 2>&1
+ _umount $LOOP_MNT > /dev/null 2>&1
# punch out the previous blocks so that we keep the amount of
# disk space the test requires down to a minimum.
diff --git a/tests/xfs/235 b/tests/xfs/235
index 5b201d93076952..0184ff71f2878c 100755
--- a/tests/xfs/235
+++ b/tests/xfs/235
@@ -31,7 +31,7 @@ _pwrite_byte 0x62 0 $((blksz * 64)) ${SCRATCH_MNT}/file0 >> $seqres.full
_pwrite_byte 0x61 0 $((blksz * 64)) ${SCRATCH_MNT}/file1 >> $seqres.full
cp -p ${SCRATCH_MNT}/file0 ${SCRATCH_MNT}/file2
cp -p ${SCRATCH_MNT}/file1 ${SCRATCH_MNT}/file3
-umount ${SCRATCH_MNT}
+_umount ${SCRATCH_MNT}
echo "+ check fs"
_scratch_xfs_repair -n >> $seqres.full 2>&1 || \
@@ -49,7 +49,7 @@ if _try_scratch_mount >> $seqres.full 2>&1; then
$XFS_IO_PROG -f -c "pwrite -S 0x63 0 $((blksz * 64))" -c "fsync" ${SCRATCH_MNT}/file4 >> $seqres.full 2>&1
test -s ${SCRATCH_MNT}/file4 && _fail "should not be able to copy with busted rmap btree"
- umount ${SCRATCH_MNT}
+ _umount ${SCRATCH_MNT}
fi
echo "+ repair fs"
@@ -66,7 +66,7 @@ $CHATTR_PROG -R -f -i ${SCRATCH_MNT}/
echo "+ copy more (2)"
cp -p ${SCRATCH_MNT}/file1 ${SCRATCH_MNT}/file5 || \
_fail "modified rmap tree"
-umount ${SCRATCH_MNT}
+_umount ${SCRATCH_MNT}
echo "+ check fs (2)"
_scratch_xfs_repair -n >> $seqres.full 2>&1 || \
diff --git a/tests/xfs/236 b/tests/xfs/236
index a374a300d1905a..277a9a402e2e05 100755
--- a/tests/xfs/236
+++ b/tests/xfs/236
@@ -15,7 +15,7 @@ _begin_fstest auto rmap punch
_cleanup()
{
cd /
- umount $SCRATCH_MNT > /dev/null 2>&1
+ _umount $SCRATCH_MNT > /dev/null 2>&1
rm -rf $tmp.*
}
@@ -44,7 +44,7 @@ for i in 1 2 x; do
seq 1 2 $((nr_blks - 1)) | while read nr; do
$XFS_IO_PROG -c "fpunch $((nr * blksz)) $blksz" $testdir/file2 >> $seqres.full
done
- umount $SCRATCH_MNT
+ _umount $SCRATCH_MNT
_check_scratch_fs
_scratch_mount
@@ -52,7 +52,7 @@ for i in 1 2 x; do
echo "$i: Delete both files"
rm -rf $testdir/file1 $testdir/file2
- umount $SCRATCH_MNT
+ _umount $SCRATCH_MNT
_check_scratch_fs
_scratch_mount
done
diff --git a/tests/xfs/239 b/tests/xfs/239
index bfe722c0add020..7dc9be7d2edfe0 100755
--- a/tests/xfs/239
+++ b/tests/xfs/239
@@ -66,7 +66,7 @@ md5sum $testdir/file1 | _filter_scratch
md5sum $testdir/file2 | _filter_scratch
echo "Check for damage"
-umount $SCRATCH_MNT
+_umount $SCRATCH_MNT
_repair_scratch_fs >> $seqres.full
# success, all done
diff --git a/tests/xfs/241 b/tests/xfs/241
index 1532493979ffa7..a779e321417520 100755
--- a/tests/xfs/241
+++ b/tests/xfs/241
@@ -66,7 +66,7 @@ md5sum $testdir/file1 | _filter_scratch
md5sum $testdir/file2 | _filter_scratch
echo "Check for damage"
-umount $SCRATCH_MNT
+_umount $SCRATCH_MNT
_repair_scratch_fs >> $seqres.full
# success, all done
diff --git a/tests/xfs/250 b/tests/xfs/250
index f8846be6e197aa..82ab08d65192e7 100755
--- a/tests/xfs/250
+++ b/tests/xfs/250
@@ -13,7 +13,7 @@ _begin_fstest auto quick rw prealloc metadata
_cleanup()
{
cd /
- umount $LOOP_MNT 2>/dev/null
+ _umount $LOOP_MNT 2>/dev/null
rm -f $LOOP_DEV
rmdir $LOOP_MNT
}
@@ -60,7 +60,7 @@ _test_loop()
$XFS_IO_PROG -f -c "resvsp 0 $fsize" $LOOP_MNT/foo | _filter_io
echo "*** unmount loop filesystem"
- umount $LOOP_MNT > /dev/null 2>&1
+ _umount $LOOP_MNT > /dev/null 2>&1
echo "*** check loop filesystem"
_check_xfs_filesystem $LOOP_DEV none none
diff --git a/tests/xfs/265 b/tests/xfs/265
index 21de4c054a573f..2ba7342d066bb6 100755
--- a/tests/xfs/265
+++ b/tests/xfs/265
@@ -16,7 +16,7 @@ _begin_fstest auto clone
_cleanup()
{
cd /
- umount $SCRATCH_MNT > /dev/null 2>&1
+ _umount $SCRATCH_MNT > /dev/null 2>&1
rm -rf $tmp.*
}
@@ -51,7 +51,7 @@ for i in 1 2 x; do
truncate -s $((blksz * (nr_blks - nr))) $testdir/file1.$nr >> $seqres.full
done
- umount $SCRATCH_MNT
+ _umount $SCRATCH_MNT
_check_scratch_fs
_scratch_mount
@@ -60,7 +60,7 @@ for i in 1 2 x; do
echo "$i: Delete both files"
rm -rf $testdir
mkdir -p $testdir
- umount $SCRATCH_MNT
+ _umount $SCRATCH_MNT
_check_scratch_fs
_scratch_mount
done
diff --git a/tests/xfs/310 b/tests/xfs/310
index 34d17be97f36dd..f2a7ca50f67199 100755
--- a/tests/xfs/310
+++ b/tests/xfs/310
@@ -13,7 +13,7 @@ _begin_fstest auto clone rmap prealloc
_cleanup()
{
cd /
- umount $SCRATCH_MNT > /dev/null 2>&1
+ _umount $SCRATCH_MNT > /dev/null 2>&1
_dmhugedisk_cleanup
rm -rf $tmp.*
}
@@ -53,7 +53,7 @@ $XFS_IO_PROG -f -c "falloc 0 $((nr_blks * blksz))" $testdir/file1 >> $seqres.ful
echo "Check extent count"
xfs_bmap -l -p -v $testdir/file1 | grep '^[[:space:]]*2:' -q && xfs_bmap -l -p -v $testdir/file1
inum=$(stat -c '%i' $testdir/file1)
-umount $SCRATCH_MNT
+_umount $SCRATCH_MNT
echo "Check bmap count"
nr_bmaps=$(xfs_db -c "inode $inum" -c "bmap" $DMHUGEDISK_DEV | grep 'data offset' | wc -l)
diff --git a/tests/xfs/716 b/tests/xfs/716
index cd4fffef298d31..55c66d1cf8bb19 100755
--- a/tests/xfs/716
+++ b/tests/xfs/716
@@ -49,7 +49,7 @@ ino=$(stat -c '%i' $file)
# Figure out how many extents we need to have to create a data fork that's in
# btree format.
-umount $SCRATCH_MNT
+_umount $SCRATCH_MNT
di_forkoff=$(_scratch_xfs_db -c "inode $ino" -c "p core.forkoff" | \
awk '{print $3}')
_scratch_xfs_db -c "inode $ino" -c "p" >> $seqres.full
@@ -61,7 +61,7 @@ $XFS_IO_PROG -c "falloc 0 $(( (min_ext_for_btree + 1) * 2 * blksz))" $file
$here/src/punch-alternating $file
# Make sure the data fork is in btree format.
-umount $SCRATCH_MNT
+_umount $SCRATCH_MNT
_scratch_xfs_db -c "inode $ino" -c "p core.format" | grep -q "btree" || \
echo "data fork not in btree format?"
echo "about to start test" >> $seqres.full
^ permalink raw reply related [flat|nested] 24+ messages in thread