]> git.proxmox.com Git - mirror_zfs.git/commitdiff
zfs_mount_all_mountpoints: cleanup_all should leave pool root mounted
authorToomas Soome <tsoome@me.com>
Sun, 3 Jan 2021 00:54:53 +0000 (02:54 +0200)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 5 Jan 2021 18:33:48 +0000 (10:33 -0800)
if pool root is not mounted, then zpool umount in next test will leave
dataset mountpoint directory around and next zfs mount -a will fail
with error: cannot mount '/testpool': directory is not empty

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Toomas Soome <tsoome@me.com>
Closes #11417

tests/zfs-tests/tests/functional/cli_root/zfs_mount/zfs_mount_all_mountpoints.ksh

index 3e6a24bbcda31b78f1a309b1be46dca2edbc3cbd..faeae4227acd4d4cba710e114f745c5dd3aa605b 100755 (executable)
@@ -109,6 +109,8 @@ function cleanup_all
        export __ZFS_POOL_RESTRICT="$TESTPOOL"
        log_must zfs $unmountall
        unset __ZFS_POOL_RESTRICT
+       # make sure we leave $TESTPOOL mounted
+       log_must zfs mount $TESTPOOL
 
        for fs in ${filesystems[@]}; do
                cleanup_filesystem "$TESTPOOL" "$fs"