]> git-server-git.apps.pok.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
treewide: convert all $MOUNT_PROG to _mount
authorDarrick J. Wong <djwong@kernel.org>
Mon, 13 Apr 2026 17:51:09 +0000 (10:51 -0700)
committerZorro Lang <zlang@kernel.org>
Fri, 1 May 2026 15:40:16 +0000 (23:40 +0800)
Going to add some new log scraping functionality when mount failures
occur, so we need everyone to use _mount instead of $MOUNT_PROG.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Zorro Lang <zlang@kernel.org>
42 files changed:
common/btrfs
common/dmdelay
common/dmerror
common/dmlogwrites
common/overlay
tests/btrfs/012
tests/btrfs/075
tests/btrfs/089
tests/btrfs/136
tests/btrfs/208
tests/btrfs/330
tests/btrfs/335
tests/ext4/032
tests/generic/067
tests/generic/089
tests/generic/120
tests/generic/306
tests/generic/361
tests/generic/373
tests/generic/374
tests/generic/395
tests/generic/409
tests/generic/410
tests/generic/411
tests/generic/504
tests/generic/589
tests/generic/631
tests/generic/717
tests/overlay/005
tests/overlay/025
tests/overlay/062
tests/overlay/083
tests/overlay/086
tests/xfs/044
tests/xfs/049
tests/xfs/149
tests/xfs/206
tests/xfs/250
tests/xfs/289
tests/xfs/300
tests/xfs/507
tests/xfs/544

index c2d616aa26e4beccd3ea1479a91d7f2719da0ba6..30288f07b61a3e977bfd18725211b20ad0e8382e 100644 (file)
@@ -358,7 +358,7 @@ _btrfs_stress_subvolume()
        mkdir -p $subvol_mnt
        while [ ! -e $stop_file ]; do
                $BTRFS_UTIL_PROG subvolume create $btrfs_mnt/$subvol_name
-               $MOUNT_PROG -o subvol=$subvol_name $btrfs_dev $subvol_mnt
+               _mount -o subvol=$subvol_name $btrfs_dev $subvol_mnt
                _unmount $subvol_mnt
                $BTRFS_UTIL_PROG subvolume delete $btrfs_mnt/$subvol_name
        done
@@ -444,7 +444,7 @@ _btrfs_stress_remount_compress()
        local btrfs_mnt=$1
        while true; do
                for algo in no zlib lzo; do
-                       $MOUNT_PROG -o remount,compress=$algo $btrfs_mnt
+                       _mount -o remount,compress=$algo $btrfs_mnt
                done
        done
 }
index 848afb993faa19d5e68abae67c1eaea36756f84f..ff0b8adf8bfc722b3f06029dfc7f0b02f702f419 100644 (file)
@@ -22,7 +22,7 @@ _init_delay()
 _mount_delay()
 {
        _scratch_options mount
-       $MOUNT_PROG -t $FSTYP `_common_dev_mount_options` $SCRATCH_OPTIONS \
+       _mount -t $FSTYP `_common_dev_mount_options` $SCRATCH_OPTIONS \
                $DELAY_DEV $SCRATCH_MNT
 }
 
index 309129c03c8d87e8dd274657f2cf607f2d3668a2..5c99fc1629b4aefd14907798c8911661ebf7bc2e 100644 (file)
@@ -95,7 +95,7 @@ _dmerror_init()
 _dmerror_mount()
 {
        _scratch_options mount
-       $MOUNT_PROG -t $FSTYP `_common_dev_mount_options $*` $SCRATCH_OPTIONS \
+       _mount -t $FSTYP `_common_dev_mount_options $*` $SCRATCH_OPTIONS \
                $DMERROR_DEV $SCRATCH_MNT
 }
 
index a27e1966a933a625cf15eb93a4ecbb2cff9fef6b..278656269584b333f5db67d28e329ac11cfac48b 100644 (file)
@@ -104,7 +104,7 @@ _log_writes_mkfs()
 _log_writes_mount()
 {
        _scratch_options mount
-       $MOUNT_PROG -t $FSTYP `_common_dev_mount_options $*` $SCRATCH_OPTIONS \
+       _mount -t $FSTYP `_common_dev_mount_options $*` $SCRATCH_OPTIONS \
                $LOGWRITES_DMDEV $SCRATCH_MNT
 }
 
index 67ae11f883ee6884181969f7f6725cb8bb2e88df..d32f3219a5285a6035212a43649af1e0aa7ea559 100644 (file)
@@ -29,13 +29,13 @@ _overlay_mount_dirs()
        [ -n "$upperdir" ] && [ "$upperdir" != "-" ] && \
                diropts+=",upperdir=$upperdir,workdir=$workdir"
 
-       $MOUNT_PROG -t overlay $diropts `_common_dev_mount_options $*`
+       _mount -t overlay $diropts `_common_dev_mount_options $*`
 }
 
 # Mount with mnt/dev of scratch mount and custom mount options
 _overlay_scratch_mount_opts()
 {
-       $MOUNT_PROG -t overlay $OVL_BASE_SCRATCH_MNT $SCRATCH_MNT $*
+       _mount -t overlay $OVL_BASE_SCRATCH_MNT $SCRATCH_MNT $*
 }
 
 # Mount with same options/mnt/dev of scratch mount, but optionally
@@ -130,7 +130,7 @@ _overlay_scratch_mount()
                # By default, libmount merges remount options with old mount options.
                # overlayfs does not support re-configuring the same mount options.
                # We workaround this problem with --options-mode ignore.
-               $MOUNT_PROG $SCRATCH_MNT --options-mode ignore $*
+               _mount $SCRATCH_MNT --options-mode ignore $*
                return
        fi
 
index 6914fba6ebe2cf766c63e9187d9842822b8a9425..b3ca4190ecd117febb70c2ac5bf46fbcf7ed94ed 100755 (executable)
@@ -41,7 +41,7 @@ export SELINUX_MOUNT_OPTIONS=""
 $MKFS_EXT4_PROG -F -b $BLOCK_SIZE $SCRATCH_DEV > $seqres.full 2>&1 || \
        _notrun "Could not create ext4 filesystem"
 # Manual mount so we don't use -t btrfs or selinux context
-mount -t ext4 $SCRATCH_DEV $SCRATCH_MNT
+_mount -t ext4 $SCRATCH_DEV $SCRATCH_MNT
 if [ $? -ne 0 -a $BLOCK_SIZE -gt $(_get_page_size) ]; then
        _notrun "block size $BLOCK_SIZE is not supported by ext4"
 fi
@@ -68,7 +68,7 @@ $E2FSCK_PROG -fn $SCRATCH_MNT/ext2_saved/image >> $seqres.full 2>&1 || \
 
 # And the files in that image should match
 mkdir -p $SCRATCH_MNT/mnt
-mount -o loop $SCRATCH_MNT/ext2_saved/image $SCRATCH_MNT/mnt || \
+_mount -o loop $SCRATCH_MNT/ext2_saved/image $SCRATCH_MNT/mnt || \
        _fail "could not loop mount saved ext4 image"
 
 echo "Checking saved ext2 image against the original one:"
@@ -90,7 +90,7 @@ $E2FSCK_PROG -fn $SCRATCH_DEV >> $seqres.full 2>&1 || \
         _fail "restored ext4 image is corrupt"
 
 # Mount the un-converted ext4 device & check the contents
-mount -t ext4 $SCRATCH_DEV $SCRATCH_MNT
+_mount -t ext4 $SCRATCH_DEV $SCRATCH_MNT
 echo "Checking rolled back ext2 against the original one:"
 $FSSUM_PROG -r $tmp.original $SCRATCH_MNT/$BASENAME
 
index 917993ca2da3a65b9e08386527ae25aafca19b37..737c4ffdd57865d0e8e6975d35093d0b53149191 100755 (executable)
@@ -37,7 +37,7 @@ _scratch_mount
 subvol_mnt=$TEST_DIR/$seq.mnt
 mkdir -p $subvol_mnt
 $BTRFS_UTIL_PROG subvolume create $SCRATCH_MNT/subvol >>$seqres.full 2>&1
-$MOUNT_PROG -o subvol=subvol $SELINUX_MOUNT_OPTIONS $SCRATCH_DEV $subvol_mnt
+_mount -o subvol=subvol $SELINUX_MOUNT_OPTIONS $SCRATCH_DEV $subvol_mnt
 status=$?
 
 exit
index 8f8e37b6fde87bfede618fc90b98e90068f95767..9e8d8ea3a5e0970ba9e24f2f70b082578cc3a89b 100755 (executable)
@@ -29,7 +29,7 @@ $BTRFS_UTIL_PROG subvolume set-default $testvol_id "$SCRATCH_MNT" >>$seqres.full
 # Bind-mount a directory under the default subvolume.
 mkdir "$SCRATCH_MNT/testvol/testdir"
 mkdir "$SCRATCH_MNT/testvol/mnt"
-mount --bind "$SCRATCH_MNT/testvol/testdir" "$SCRATCH_MNT/testvol/mnt"
+_mount --bind "$SCRATCH_MNT/testvol/testdir" "$SCRATCH_MNT/testvol/mnt"
 
 # Now attempt to delete the default subvolume.
 $BTRFS_UTIL_PROG subvolume delete "$SCRATCH_MNT/testvol" >>$seqres.full 2>&1
index fd24d3f8c1fa45cd040aedff04b22701c4c71781..97c110981adebb0d97f2c835a58ac406dd9bb021 100755 (executable)
@@ -44,7 +44,7 @@ $MKFS_EXT4_PROG -F -t ext3 -b $BLOCK_SIZE $SCRATCH_DEV > $seqres.full 2>&1 || \
        _notrun "Could not create ext3 filesystem"
 
 # mount and populate non-extent file
-mount -t ext3 $SCRATCH_DEV $SCRATCH_MNT
+_mount -t ext3 $SCRATCH_DEV $SCRATCH_MNT
 if [ $? -ne 0 -a $BLOCK_SIZE -gt $(_get_page_size) ]; then
        _notrun "block size $BLOCK_SIZE is not supported by ext3"
 fi
@@ -57,7 +57,7 @@ $TUNE2FS_PROG -O extents,uninit_bg,dir_index $SCRATCH_DEV >> $seqres.full 2>&1
 $E2FSCK_PROG -fyD $SCRATCH_DEV >> $seqres.full 2>&1
 
 # mount and populate extent file
-mount -t ext4 $SCRATCH_DEV $SCRATCH_MNT
+_mount -t ext4 $SCRATCH_DEV $SCRATCH_MNT
 populate_data "$SCRATCH_MNT/ext3_ext4_data/ext4"
 
 # Compute md5 of ext3,ext4 files.
index 5ea732ae8f71a7603ea1e2961759660528359d85..93a999541dab0649e5b2169bd9bf62c11f85e2c3 100755 (executable)
@@ -45,7 +45,7 @@ _scratch_unmount
 
 # Now we mount the subvol2, which makes subvol3 not accessible for this mount
 # point, but we should be able to delete it using it's subvolume id
-$MOUNT_PROG -o subvol=subvol2 $SCRATCH_DEV $SCRATCH_MNT
+_mount -o subvol=subvol2 $SCRATCH_DEV $SCRATCH_MNT
 _delete_and_list subvol3 "Last remaining subvolume:"
 _scratch_unmount
 
index 3a311a5affc0a024aed33f81029b3a47a5510449..10c4466707f3a350c0482753c87e9c303621ef25 100755 (executable)
@@ -17,7 +17,7 @@ _cleanup()
 # Import common functions.
 . ./common/filter.btrfs
 
-$MOUNT_PROG -V | grep -q 'fd-based-mount'
+_mount -V | grep -q 'fd-based-mount'
 if [ "$?" -eq 0 ]; then
        _fixed_by_kernel_commit cda7163d4e3d \
                "btrfs: fix per-subvolume RO/RW flags with new mount API"
index 34764e4aa6c8c11dd90100d065d92a50b2b12670..edc5c0ab3374b872081b6a10cef8408555e711a1 100755 (executable)
@@ -49,7 +49,7 @@ $BTRFS_UTIL_PROG balance start -mconvert=raid1 $SCRATCH_MNT 2>&1 |\
 
 _scratch_unmount
 
-$MOUNT_PROG -t btrfs -odegraded ${devs[0]} $SCRATCH_MNT
+_mount -t btrfs -odegraded ${devs[0]} $SCRATCH_MNT
 
 $BTRFS_UTIL_PROG device remove --force missing $SCRATCH_MNT >> $seqres.full
 $BTRFS_UTIL_PROG balance start --full-balance $SCRATCH_MNT >> $seqres.full
index 043ae4f535053086890ef0336813df292f2a7860..ef050ec0fb421ceae0c528ecceada253f6a159a7 100755 (executable)
@@ -48,7 +48,7 @@ ext4_online_resize()
                $seqres.full 2>&1 || _fail "mkfs failed"
 
        echo "+++ mount image file" | tee -a $seqres.full
-       $MOUNT_PROG -t ${FSTYP} ${LOOP_DEVICE} ${IMG_MNT} > \
+       _mount -t ${FSTYP} ${LOOP_DEVICE} ${IMG_MNT} > \
                /dev/null 2>&1 || _fail "mount failed"
 
        echo "+++ resize fs to $final_size" | tee -a $seqres.full
index b45ae834f918d22e49844a2cae5445c85689ebd7..99d10ee0be0a0fb5862764c8a700f52c47dc0b49 100755 (executable)
@@ -34,7 +34,7 @@ mount_nonexistent_mnt()
 {
        echo "# mount to nonexistent mount point" >>$seqres.full
        rm -rf $TEST_DIR/nosuchdir
-       $MOUNT_PROG $SCRATCH_DEV $TEST_DIR/nosuchdir >>$seqres.full 2>&1
+       _mount $SCRATCH_DEV $TEST_DIR/nosuchdir >>$seqres.full 2>&1
 }
 
 # fs driver should be able to handle mounting a free loop device gracefully xfs
@@ -60,7 +60,7 @@ mount_wrong_fstype()
                fs=xfs
        fi
        echo "# mount with wrong fs type" >>$seqres.full
-       $MOUNT_PROG -t $fs $SCRATCH_DEV $SCRATCH_MNT >>$seqres.full 2>&1
+       _mount -t $fs $SCRATCH_DEV $SCRATCH_MNT >>$seqres.full 2>&1
 }
 
 # umount a symlink to device, which is not mounted.
index 89c19484fd7b8a4c601547c06fd9418b34fa66de..9998457fb5baf1b59594417344fd60f33a4c353e 100755 (executable)
@@ -34,7 +34,7 @@ cd $TEST_DIR
 rm -fr test
 mkdir test || exit 1
 cd $TEST_DIR/test
-mount > t_mtab
+_mount > t_mtab
 
 mtab()
 {
index 7527bd4a0784233c9979ac1e7fc485c2213b9a3a..d11b90b809f2408b0fe09bf7d84b15dcb80e19d8 100755 (executable)
@@ -29,7 +29,7 @@ _compare_access_times()
                cat $tmp.out
                echo "---------------------------------------------------"
                $here/src/lstat64 $1
-               mount | grep $SCRATCH_MNT
+               _mount | grep $SCRATCH_MNT
        fi
 
 }
index 8e118472d8bef08fc1edec7dbd420bc3b7df1c99..14c07e0bda4afafb21afda76e3f0dfa1f4640da2 100755 (executable)
@@ -66,7 +66,7 @@ $XFS_IO_PROG -f -c "pwrite 0 512" $SYMLINK | _filter_xfs_io
 $XFS_IO_PROG -t -c "pwrite 0 512" $SYMLINK | _filter_xfs_io
 
 echo "== write to bind-mounted rw file on ro fs"
-mount --bind $TARGET $BINDFILE
+_mount --bind $TARGET $BINDFILE
 # with and without -f (adds O_CREAT)
 $XFS_IO_PROG -c "pwrite 0 512" $BINDFILE | _filter_xfs_io
 $XFS_IO_PROG -f -c "pwrite 0 512" $BINDFILE | _filter_xfs_io
index b584af475400204a5e78f6ed5a515fd117d518d8..70dba3a0ca8b7527befb400a3c83e346556d63f3 100755 (executable)
@@ -52,7 +52,7 @@ fi
 $XFS_IO_PROG -fc "pwrite 0 520m" $fs_mnt/testfile >>$seqres.full 2>&1
 
 # remount should not hang
-$MOUNT_PROG -o remount,ro $fs_mnt >>$seqres.full 2>&1
+_mount -o remount,ro $fs_mnt >>$seqres.full 2>&1
 
 _unmount $fs_mnt &>/dev/null
 _destroy_loop_device $loop_dev
index 04ec642518ce705e5e3f0f2344e2f535da876703..42bdc1be0757ac9aebff5219d2cb63ec49ff04a8 100755 (executable)
@@ -42,7 +42,7 @@ blksz=65536
 sz=$((blksz * blocks))
 
 echo "Mount otherdir"
-$MOUNT_PROG --bind $SCRATCH_MNT $otherdir
+_mount --bind $SCRATCH_MNT $otherdir
 
 echo "Create file"
 _pwrite_byte 0x61 0 $sz $testdir/file >> $seqres.full
index 9a85091e29886ecded98d7f2a2e323b497909bbb..8f7d17152c84be5a73b53a323d74b9e8c258c190 100755 (executable)
@@ -41,7 +41,7 @@ blksz=65536
 sz=$((blocks * blksz))
 
 echo "Mount otherdir"
-$MOUNT_PROG --bind $SCRATCH_MNT $otherdir
+_mount --bind $SCRATCH_MNT $otherdir
 
 echo "Create file"
 _pwrite_byte 0x61 0 $sz $testdir/file >> $seqres.full
index f9c331adb969ac4e148d5e174cfa25204c7df0d8..261f468f397c8c921d35346999715abcc939c8b9 100755 (executable)
@@ -71,8 +71,8 @@ _scratch_remount ro
 _set_encpolicy $SCRATCH_MNT/ro_dir |& _filter_scratch
 _get_encpolicy $SCRATCH_MNT/ro_dir |& _filter_scratch
 _scratch_remount rw
-mount --bind $SCRATCH_MNT $SCRATCH_MNT/ro_bind_mnt
-mount -o remount,ro,bind $SCRATCH_MNT/ro_bind_mnt
+_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
 _unmount $SCRATCH_MNT/ro_bind_mnt
index ac1b14ad60f7233be4efa781db79d15beb77272d..eff7c3584b413b40305fc789bccacf8b03b27045 100755 (executable)
@@ -88,7 +88,7 @@ start_test()
 
        _scratch_mkfs >$seqres.full 2>&1
        _get_mount -t $FSTYP $SCRATCH_DEV $MNTHEAD
-       $MOUNT_PROG --make-"${type}" $MNTHEAD
+       _mount --make-"${type}" $MNTHEAD
        mkdir $mpA $mpB $mpC $mpD
 }
 
@@ -108,9 +108,9 @@ bind_run()
        echo "bind $source on $dest"
        _get_mount -t $FSTYP $SCRATCH_DEV $mpA
        mkdir -p $mpA/dir 2>/dev/null
-       $MOUNT_PROG --make-shared $mpA
+       _mount --make-shared $mpA
        _get_mount --bind $mpA $mpB
-       $MOUNT_PROG --make-"$source" $mpB
+       _mount --make-"$source" $mpB
        # maybe unbindable at here
        _get_mount --bind $mpB $mpC 2>/dev/null
        if [ $? -ne 0 ]; then
index e0d0c57eba2950f4884bfba22a4bfb5fe518580f..69f9dbe97f182d8db4b0d25516eb50c843865972 100755 (executable)
@@ -94,7 +94,7 @@ start_test()
 
        _scratch_mkfs >>$seqres.full 2>&1
        _get_mount -t $FSTYP $SCRATCH_DEV $MNTHEAD
-       $MOUNT_PROG --make-"${type}" $MNTHEAD
+       _mount --make-"${type}" $MNTHEAD
        mkdir $mpA $mpB $mpC
 }
 
@@ -118,14 +118,14 @@ run()
        echo "make-$cmd a $orgs mount"
        _get_mount -t $FSTYP $SCRATCH_DEV $mpA
        mkdir -p $mpA/dir 2>/dev/null
-       $MOUNT_PROG --make-shared $mpA
+       _mount --make-shared $mpA
 
        # prepare the original status on mpB
        _get_mount --bind $mpA $mpB
        # shared&slave status need to do make-slave then make-shared
        # two operations.
        for t in $orgs; do
-               $MOUNT_PROG --make-"$t" $mpB
+               _mount --make-"$t" $mpB
        done
 
        # "before" for prepare and check original status
@@ -146,7 +146,7 @@ run()
                        _put_mount # umount C
                fi
                if [ "$i" = "before" ];then
-                       $MOUNT_PROG --make-"${cmd}" $mpB
+                       _mount --make-"${cmd}" $mpB
                fi
        done
 
index 0a80554cd4d3b9a8526d2c6ac95679f189ce6bdd..b099940f3fa704f7fa5c664b0e95ee54e762e346 100755 (executable)
@@ -77,7 +77,7 @@ start_test()
 
        _scratch_mkfs >$seqres.full 2>&1
        _get_mount -t $FSTYP $SCRATCH_DEV $MNTHEAD
-       $MOUNT_PROG --make-"${type}" $MNTHEAD
+       _mount --make-"${type}" $MNTHEAD
        mkdir $mpA $mpB $mpC
 }
 
@@ -100,11 +100,11 @@ crash_test()
 
        _get_mount -t $FSTYP $SCRATCH_DEV $mpA
        mkdir $mpA/mnt1
-       $MOUNT_PROG --make-shared $mpA
+       _mount --make-shared $mpA
        _get_mount --bind $mpA $mpB
        _get_mount --bind $mpA $mpC
-       $MOUNT_PROG --make-slave $mpB
-       $MOUNT_PROG --make-slave $mpC
+       _mount --make-slave $mpB
+       _mount --make-slave $mpC
        _get_mount -t $FSTYP $SCRATCH_DEV $mpA/mnt1
        mkdir $mpA/mnt1/mnt2
 
index 611e6c283e215af5aa895ec1450785a3289ec0de..931f231504b70230952eab4d00f59e6d7c7b7a99 100755 (executable)
@@ -41,7 +41,7 @@ exec {test_fd}> $testfile
 if [ "$FSTESTS_ISOL" = "privatens" ]; then
        move_proc="$tmp.procdir"
        mkdir -p "$move_proc"
-       mount --move /proc "$move_proc"
+       _mount --move /proc "$move_proc"
 fi
 flock -x $test_fd
 cat /proc/locks >> $seqres.full
@@ -50,7 +50,7 @@ cat /proc/locks >> $seqres.full
 grep -q ":$tf_inode " /proc/locks || echo "lock info not found"
 
 if [ -n "$move_proc" ]; then
-       mount --move "$move_proc" /proc
+       _mount --move "$move_proc" /proc
 fi
 
 # success, all done
index 0384083bbf42511ee545ba97b5e34fa3ed8550aa..e7627f26c7599647a3d910d9cd5e2e2aacc29c68 100755 (executable)
@@ -81,12 +81,12 @@ start_test()
 
        _get_mount -t $FSTYP $SCRATCH_DEV $SRCHEAD
        # make sure $SRCHEAD is private
-       $MOUNT_PROG --make-private $SRCHEAD
+       _mount --make-private $SRCHEAD
 
        _get_mount -t $FSTYP $SCRATCH_DEV $DSTHEAD
        # test start with a bind, then make-shared $DSTHEAD
        _get_mount --bind $DSTHEAD $DSTHEAD
-       $MOUNT_PROG --make-"${type}" $DSTHEAD
+       _mount --make-"${type}" $DSTHEAD
        mkdir $mpA $mpB $mpC $mpD
 }
 
@@ -106,10 +106,10 @@ move_run()
        echo "move $source to $dest"
        _get_mount -t $FSTYP $SCRATCH_DEV $mpA
        mkdir -p $mpA/dir 2>/dev/null
-       $MOUNT_PROG --make-shared $mpA
+       _mount --make-shared $mpA
        # need a peer for slave later
        _get_mount --bind $mpA $mpB
-       $MOUNT_PROG --make-"$source" $mpB
+       _mount --make-"$source" $mpB
        # maybe unbindable at here
        _get_mount --move $mpB $mpC 2>/dev/null
        if [ $? -ne 0 ]; then
index 8b12b8f247ee818bfeb8b9c0767664c2095cece3..96e917e8c2531426e4c59deb7b3968b4a377e4b7 100755 (executable)
@@ -80,7 +80,7 @@ worker() {
                mkdir $SCRATCH_MNT/workdir$tag
                mkdir $SCRATCH_MNT/upperdir$tag
 
-               mount -t overlay overlay -o "$l,$u,$w,$i" $mergedir
+               _mount -t overlay overlay -o "$l,$u,$w,$i" $mergedir
                mv $mergedir/etc/access.conf $mergedir/etc/access.conf.bak
                touch $mergedir/etc/access.conf
                mv $mergedir/etc/access.conf $mergedir/etc/access.conf.bak
index 2ecd2888d4590e9f30a8dbb55724c8f0b05552da..acbe787c5e42c1052474bcc0f8c9e7d350205909 100755 (executable)
@@ -82,7 +82,7 @@ $XFS_IO_PROG -c "exchangerange $SCRATCH_MNT/c" $dir/a
 
 echo Files on different mounts
 mkdir -p $SCRATCH_MNT/xyz
-mount --bind $dir $SCRATCH_MNT/xyz --bind
+_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
 _unmount $SCRATCH_MNT/xyz
index d396b5cb213048b0bffcf0ba77f77c7269295068..809154d9c66caab2cd44e9568334f11a64f13da7 100755 (executable)
@@ -51,8 +51,8 @@ $MKFS_XFS_PROG -f -n ftype=1 $upper_loop_dev >>$seqres.full 2>&1
 # mount underlying xfs
 mkdir -p ${OVL_BASE_SCRATCH_MNT}/lowermnt
 mkdir -p ${OVL_BASE_SCRATCH_MNT}/uppermnt
-$MOUNT_PROG $fs_loop_dev ${OVL_BASE_SCRATCH_MNT}/lowermnt
-$MOUNT_PROG $upper_loop_dev ${OVL_BASE_SCRATCH_MNT}/uppermnt
+_mount $fs_loop_dev ${OVL_BASE_SCRATCH_MNT}/lowermnt
+_mount $upper_loop_dev ${OVL_BASE_SCRATCH_MNT}/uppermnt
 
 # prepare dirs
 mkdir -p ${OVL_BASE_SCRATCH_MNT}/lowermnt/lower
index dc819a39348b6907db793d1590ef3d64a9247207..6ba46191b557bec9e3b62a1b9f848273d525f3c7 100755 (executable)
@@ -36,7 +36,7 @@ _require_extra_fs tmpfs
 # create a tmpfs in $TEST_DIR
 tmpfsdir=$TEST_DIR/tmpfs
 mkdir -p $tmpfsdir
-$MOUNT_PROG -t tmpfs tmpfs $tmpfsdir
+_mount -t tmpfs tmpfs $tmpfsdir
 
 mkdir -p $tmpfsdir/{lower,upper,work,mnt}
 mkdir -p -m 0 $tmpfsdir/upper/testd
index e44628b7459bfbf9bed46fb7680b60ae6d557f52..9a1db7419c4ca2abe1dd756ea04f8af63ec7178a 100755 (executable)
@@ -60,7 +60,7 @@ lowertestdir=$lower2/testdir
 create_test_files $lowertestdir
 
 # bind mount to pin lower test dir dentry to dcache
-$MOUNT_PROG --bind $lowertestdir $lowertestdir
+_mount --bind $lowertestdir $lowertestdir
 
 # For non-upper overlay mount, nfs_export requires disabling redirect_dir.
 _overlay_scratch_mount_opts \
index d037d4c858e6a6d4cd0f93b7fae718ec0559ad5d..56e02f8cc77d73552cdca26a5706201e0cf00797 100755 (executable)
@@ -40,14 +40,14 @@ mkdir -p "$lowerdir_spaces" "$lowerdir_colons" "$lowerdir_commas"
 
 # _overlay_mount_* helpers do not handle special chars well, so execute mount directly.
 # if escaped colons are not parsed correctly, mount will fail.
-$MOUNT_PROG -t overlay ovl_esc_test $SCRATCH_MNT \
+_mount -t overlay ovl_esc_test $SCRATCH_MNT \
        -o"upperdir=$upperdir,workdir=$workdir" \
        -o"lowerdir=$lowerdir_colons_esc:$lowerdir_spaces" \
        2>&1 | tee -a $seqres.full
 
 # if spaces are not escaped when showing mount options,
 # mount command will not show the word 'spaces' after the spaces
-$MOUNT_PROG -t overlay | grep ovl_esc_test  | tee -a $seqres.full | grep -v spaces && \
+_mount -t overlay | grep ovl_esc_test  | tee -a $seqres.full | grep -v spaces && \
        echo "ERROR: escaped spaces truncated from lowerdir mount option"
 
 # Re-create the upper/work dirs to mount them with a different lower
@@ -65,7 +65,7 @@ mkdir -p "$upperdir" "$workdir"
 # and this test will fail, but the failure would indicate a libmount issue, not
 # a kernel issue.  Therefore, force libmount to use mount(2) syscall, so we only
 # test the kernel fix.
-LIBMOUNT_FORCE_MOUNT2=always $MOUNT_PROG -t overlay $OVL_BASE_SCRATCH_DEV $SCRATCH_MNT \
+LIBMOUNT_FORCE_MOUNT2=always _mount -t overlay $OVL_BASE_SCRATCH_DEV $SCRATCH_MNT \
        -o"upperdir=$upperdir,workdir=$workdir,lowerdir=$lowerdir_commas_esc" 2>> $seqres.full || \
        echo "ERROR: incorrect parsing of escaped comma in lowerdir mount option"
 
index 9c8a00588595f6f6cf7d29cc45c09dd65deb4c33..23c56d074ff34a276d0f694cbcff14dcbfd9486e 100755 (executable)
@@ -33,21 +33,21 @@ mkdir -p "$lowerdir_spaces" "$lowerdir_colons"
 # _overlay_mount_* helpers do not handle lowerdir+,datadir+, so execute mount directly.
 
 # check illegal combinations and order of lowerdir,lowerdir+,datadir+
-$MOUNT_PROG -t overlay none $SCRATCH_MNT \
+_mount -t overlay none $SCRATCH_MNT \
        -o"lowerdir=$lowerdir,lowerdir+=$lowerdir_colons" \
        2>> $seqres.full && \
        echo "ERROR: invalid combination of lowerdir and lowerdir+ mount options"
 
 $UMOUNT_PROG $SCRATCH_MNT 2>/dev/null
 
-$MOUNT_PROG -t overlay none $SCRATCH_MNT \
+_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
 
-$MOUNT_PROG -t overlay none $SCRATCH_MNT \
+_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"
@@ -55,7 +55,7 @@ $MOUNT_PROG -t overlay none $SCRATCH_MNT \
 $UMOUNT_PROG $SCRATCH_MNT 2>/dev/null
 
 # mount is expected to fail with escaped colons.
-$MOUNT_PROG -t overlay none $SCRATCH_MNT \
+_mount -t overlay none $SCRATCH_MNT \
        -o"lowerdir+=$lowerdir_colons_esc" \
        2>> $seqres.full && \
        echo "ERROR: incorrect parsing of escaped colons in lowerdir+ mount option"
@@ -63,14 +63,14 @@ $MOUNT_PROG -t overlay none $SCRATCH_MNT \
 $UMOUNT_PROG $SCRATCH_MNT 2>/dev/null
 
 # mount is expected to succeed without escaped colons.
-$MOUNT_PROG -t overlay ovl_esc_test $SCRATCH_MNT \
+_mount -t overlay ovl_esc_test $SCRATCH_MNT \
        -o"lowerdir+=$lowerdir_colons,datadir+=$lowerdir_spaces" \
        -o redirect_dir=follow,metacopy=on \
        2>&1 | tee -a $seqres.full
 
 # if spaces are not escaped when showing mount options,
 # mount command will not show the word 'spaces' after the spaces
-$MOUNT_PROG -t overlay | grep ovl_esc_test | tee -a $seqres.full | \
+_mount -t overlay | grep ovl_esc_test | tee -a $seqres.full | \
        grep -q 'datadir+'.*spaces || \
        echo "ERROR: escaped spaces truncated from datadir+ mount option"
 
index 3ecb3479302e2288ebc53f5dd92d7d1f148ba400..e8280f382ae3b68c0e096c6a8513f236468d4296 100755 (executable)
@@ -49,7 +49,7 @@ _check_no_mount()
 _check_require_logdev()
 {
     echo "    *** mount without logdev (expect failure)"
-    if mount -t xfs $SCRATCH_DEV $SCRATCH_MNT >$tmp.err 2>&1
+    if _mount -t xfs $SCRATCH_DEV $SCRATCH_MNT >$tmp.err 2>&1
     then
         cat $tmp.err
         echo "        !!! mount succeeded (expecting failure)"
index a3f478fa9351ab7678e84b2cecd6553da1c2a65c..64667a0d8baab24f1f0a4418ae186fd6c6b21b4a 100755 (executable)
@@ -21,7 +21,7 @@ _cleanup()
 
        if [ -w $seqres.full ]; then
                echo "--- mounts at end (after cleanup)" >> $seqres.full
-               mount >> $seqres.full
+               _mount >> $seqres.full
        fi
 }
 
@@ -47,14 +47,14 @@ echo "(dev=$SCRATCH_DEV, mount=$SCRATCH_MNT)" >> $seqres.full
 echo "" >> $seqres.full
 
 echo "--- mounts" >> $seqres.full
-mount >> $seqres.full
+_mount >> $seqres.full
 
 _log "Create ext2 fs on scratch"
 mkfs -t ext2 -F $SCRATCH_DEV >> $seqres.full 2>&1 \
     || _fail "!!! failed to mkfs ext2"
 
 _log "Mount ext2 fs on scratch"
-mount -t ext2 $SCRATCH_DEV $SCRATCH_MNT >> $seqres.full 2>&1 \
+_mount -t ext2 $SCRATCH_DEV $SCRATCH_MNT >> $seqres.full 2>&1 \
     || _fail "!!! failed to mount"
 
 _log "Create xfs fs in file on scratch"
@@ -114,7 +114,7 @@ _destroy_loop_device $loop_dev1
 unset loop_dev1
 
 echo "--- mounts at end (before cleanup)" >> $seqres.full
-mount >> $seqres.full
+_mount >> $seqres.full
 
 # success, all done
 status=0
index 28dfc7f04c17732d73e0c928e9cb4a5fc443a66c..baf6e22b98e28993445d7c0aa687273a46a09de3 100755 (executable)
@@ -64,7 +64,7 @@ $XFS_GROWFS_PROG $loop_symlink 2>&1 | sed -e s:$loop_symlink:LOOPSYMLINK:
 # These mounted operations should pass
 
 echo "=== mount ==="
-$MOUNT_PROG $loop_dev $mntdir || _fail "!!! failed to loopback mount"
+_mount $loop_dev $mntdir || _fail "!!! failed to loopback mount"
 
 echo "=== xfs_growfs - check device node ==="
 $XFS_GROWFS_PROG -D 8192 $loop_dev > /dev/null
@@ -76,7 +76,7 @@ echo "=== unmount ==="
 _unmount $mntdir || _fail "!!! failed to unmount"
 
 echo "=== mount device symlink ==="
-$MOUNT_PROG $loop_symlink $mntdir || _fail "!!! failed to loopback mount"
+_mount $loop_symlink $mntdir || _fail "!!! failed to loopback mount"
 
 echo "=== xfs_growfs - check device symlink ==="
 $XFS_GROWFS_PROG -D 16384 $loop_symlink > /dev/null
index bfd2dee939ddd7406b69ec3ca97f2a3dd530513d..a515c6c8838cffd6d75cc6ab9402055259709990 100755 (executable)
@@ -75,7 +75,7 @@ echo "=== mkfs.xfs ==="
 mkfs.xfs -f -bsize=4096 -l size=32m -dagsize=76288719b,size=3905982455b \
         $tmpfile  | mkfs_filter
 
-mount -o loop $tmpfile $tmpdir || _fail "!!! failed to loopback mount"
+_mount -o loop $tmpfile $tmpdir || _fail "!!! failed to loopback mount"
 
 # see what happens when we growfs it
 echo "=== xfs_growfs ==="
index 2554e1e91c4c6f0366467b0544d9f607e42e08e7..0c3f6f075c1cb2e2468b500e74ec3aa87da3ef12 100755 (executable)
@@ -57,7 +57,7 @@ _test_loop()
 
        echo "*** mount loop filesystem"
        loop_dev=$(_create_loop_device $LOOP_IMG)
-       mount $loop_dev $LOOP_MNT
+       _mount $loop_dev $LOOP_MNT
 
        echo "*** preallocate large file"
        $XFS_IO_PROG -f -c "resvsp 0 $fsize" $LOOP_MNT/foo | _filter_io
index d234f212d49b8344611d9c98ad25feca5964c7aa..c2216f2826a9d1e561a26f27f947c5650df70b60 100755 (executable)
@@ -56,7 +56,7 @@ echo "=== xfs_growfs - plain file - should be rejected ==="
 $XFS_GROWFS_PROG $tmpfile 2>&1 | _filter_test_dir
 
 echo "=== mount ==="
-$MOUNT_PROG -o loop $tmpfile $tmpdir || _fail "!!! failed to loopback mount"
+_mount -o loop $tmpfile $tmpdir || _fail "!!! failed to loopback mount"
 
 echo "=== xfs_growfs - mounted - check absolute path ==="
 $XFS_GROWFS_PROG -D 8192 $tmpdir | _filter_test_dir > /dev/null
@@ -79,7 +79,7 @@ $XFS_GROWFS_PROG -D 28672 tmpsymlink.$$ > /dev/null
 
 echo "=== xfs_growfs - bind mount ==="
 mkdir $tmpbind
-$MOUNT_PROG -o bind $tmpdir $tmpbind
+_mount -o bind $tmpdir $tmpbind
 $XFS_GROWFS_PROG -D 32768 $tmpbind | _filter_test_dir > /dev/null
 
 echo "=== xfs_growfs - bind mount - relative path ==="
index c4c3b1ab86c20057e340442e31e224f03d83b30c..534a0e9d059b91aa9b27d1e7afe2849f28548437 100755 (executable)
@@ -27,7 +27,7 @@ getenforce | grep -q "Enforcing\|Permissive" || _notrun "SELinux not enabled"
 _scratch_mkfs_xfs -m crc=0 -i size=256 >> $seqres.full 2>&1
 
 # Manually mount to avoid fs-wide context set by default in xfstests
-mount $SCRATCH_DEV $SCRATCH_MNT
+_mount $SCRATCH_DEV $SCRATCH_MNT
 
 touch $SCRATCH_MNT/$seq.test
 
index 52d9b94b4dd903a5cb7e4e78740e5ce0a3fa5176..e1450f4f8f94956a3ce3de0b5fff9239824192a5 100755 (executable)
@@ -86,7 +86,7 @@ loop_dev=$(_create_loop_device $loop_file)
 
 _mkfs_dev -d cowextsize=$MAXEXTLEN -l size=256m $loop_dev >> $seqres.full
 mkdir $loop_mount
-mount $loop_dev $loop_mount
+_mount $loop_dev $loop_mount
 
 echo "Create crazy huge file"
 huge_file="$loop_mount/a"
index b7eef51c7fddbebfc8d7c79034b9773b3454bcdb..9e4e0d255bd3c9e4f9127c9a43849223e19ba90d 100755 (executable)
@@ -35,7 +35,7 @@ mkdir $TEST_DIR/dest.$seq
 # Test
 echo "*** dump with bind-mounted test ***" >> $seqres.full
 
-$MOUNT_PROG --bind $TEST_DIR/src.$seq $TEST_DIR/dest.$seq || _fail "Bind mount failed"
+_mount --bind $TEST_DIR/src.$seq $TEST_DIR/dest.$seq || _fail "Bind mount failed"
 
 $XFSDUMP_PROG -L session -M test -f $tmp.dump $TEST_DIR/dest.$seq \
        >> $seqres.full 2>&1 && echo "dump with bind-mounted should be failed, but passed."