diff --git a/tests/zfs-tests/tests/functional/mmp/mmp_hostid.ksh b/tests/zfs-tests/tests/functional/mmp/mmp_hostid.ksh index b492b1070..e3c6e34f4 100755 --- a/tests/zfs-tests/tests/functional/mmp/mmp_hostid.ksh +++ b/tests/zfs-tests/tests/functional/mmp/mmp_hostid.ksh @@ -43,6 +43,9 @@ function cleanup log_must rm $MMP_DIR/file.{0,1,2,3,4,5} log_must rmdir $MMP_DIR log_must mmp_clear_hostid + if [[ -L $HOSTID_FILE ]]; then + rm -f $HOSTID_FILE + fi } log_assert "Verify hostid file can reside on a ZFS dataset" @@ -64,10 +67,11 @@ log_must mv $HOSTID_FILE $mntpnt_etc/hostid # 3. Create a file so the pool will have some contents log_must zfs create $MMP_POOL/fs mntpnt_fs=$(get_prop mountpoint $MMP_POOL/fs) -log_must mkfile 1M $fs_mntpnt/file +log_must mkfile 1M $mntpnt_fs/file # 4. Verify multihost cannot be enabled until the /etc/hostid is linked log_mustnot zpool set multihost=on $MMP_POOL +log_mustnot ls -l $HOSTID_FILE log_must ln -s $mntpnt_etc/hostid $HOSTID_FILE log_must zpool set multihost=on $MMP_POOL