diff options
author | sterlingjensen <[email protected]> | 2020-12-09 23:24:26 -0600 |
---|---|---|
committer | GitHub <[email protected]> | 2020-12-09 21:24:26 -0800 |
commit | 1e4667af320df1a99cb3995d18054fb207dd5d02 (patch) | |
tree | e010bdfcfa5a520f3b4c1380c7216cd56179ef3a /tests | |
parent | ab4fb9b74e9d089fc9a261c4f41e19697ad6a4ca (diff) |
Drop path prefix workaround
Canonicalization, the source of the trouble, was disabled in 9000a9f.
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Sterling Jensen <[email protected]>
Closes #11295
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/zfs-tests/tests/functional/cli_root/zfs_mount/zfs_mount_013_pos.ksh | 42 |
1 files changed, 22 insertions, 20 deletions
diff --git a/tests/zfs-tests/tests/functional/cli_root/zfs_mount/zfs_mount_013_pos.ksh b/tests/zfs-tests/tests/functional/cli_root/zfs_mount/zfs_mount_013_pos.ksh index 9a62ffb02..810a69470 100755 --- a/tests/zfs-tests/tests/functional/cli_root/zfs_mount/zfs_mount_013_pos.ksh +++ b/tests/zfs-tests/tests/functional/cli_root/zfs_mount/zfs_mount_013_pos.ksh @@ -25,15 +25,15 @@ verify_runnable "both" set -A vdevs $(get_disklist_fullpath $TESTPOOL) -vdev=${vdevs[0]} -mntpoint=$TESTDIR/$TESTPOOL -helper="mount.zfs -o zfsutil" -fs=$TESTPOOL/$TESTFS +typeset -r mntpoint=$(get_prop mountpoint $TESTPOOL) +typeset -r helper="mount.zfs -o zfsutil" +typeset -r fs=$TESTPOOL/$TESTFS function cleanup { - log_must force_unmount $vdev - [[ -d $mntpoint ]] && log_must rm -rf $mntpoint + cd $STF_SUITE + [[ -d $TESTDIR/$$ ]] && (rm -rf $TESTDIR/$$ || log_fail) + mounted && zfs $mountcmd $TESTPOOL return 0 } log_onexit cleanup @@ -41,18 +41,21 @@ log_onexit cleanup log_note "Verify zfs mount helper functions for both devices and pools" # Ensure that the ZFS filesystem is unmounted -force_unmount $fs -log_must mkdir -p $mntpoint +force_unmount $TESTPOOL log_note "Verify '<dataset> <path>'" log_must $helper $fs $mntpoint log_must ismounted $fs force_unmount $fs -log_note "Verify '\$PWD/<pool> <path>' prefix workaround" -log_must $helper $PWD/$fs $mntpoint -log_must ismounted $fs -force_unmount $fs +log_note "Verify mount(8) does not canonicalize before calling helper" +# Canonicalization is confused by files in PWD matching [device|mountpoint] +mkdir -p $TESTDIR/$$/$TESTPOOL && cd $TESTDIR/$$ || log_fail +# The env flag directs zfs to exec /bin/mount, which then calls helper +log_must eval ZFS_MOUNT_HELPER=1 zfs $mountcmd -v $TESTPOOL +# mount (2.35.2) still suffers from a cosmetic PWD prefix bug +log_must mounted $TESTPOOL +force_unmount $TESTPOOL log_note "Verify '-f <dataset> <path>' fakemount" log_must $helper -f $fs $mntpoint @@ -63,14 +66,13 @@ log_must ${helper},ro -v $fs $mntpoint log_must ismounted $fs force_unmount $fs -log_note "Verify '<device> <path>'" -log_must $helper $vdev $mntpoint -log_must ismounted $mntpoint -log_must umount $TESTPOOL - log_note "Verify '-o abc -s <device> <path>' sloppy option" -log_must ${helper},abc -s $vdev $mntpoint -log_must ismounted $mntpoint -log_must umount $TESTPOOL +log_must ${helper},abc -s ${vdevs[0]} $mntpoint +log_must mounted $mntpoint +force_unmount $TESTPOOL + +log_note "Verify '<device> <path>'" +log_must $helper ${vdevs[0]} $mntpoint +log_must mounted $mntpoint log_pass "zfs mount helper correctly handles both device and pool strings"
\ No newline at end of file |