log_mustnot eval "zfs unmount $arg $fs >/dev/null 2>&1"
done
-
-#Testing invalid datasets
+# Testing invalid datasets
for ds in $snap $vol "blah"; do
for opt in "" "-f"; do
log_mustnot eval "zfs unmount $opt $ds >/dev/null 2>&1"
done
done
-#Testing invalid mountpoint
+# Testing invalid mountpoint
dir=foodir.$$
file=foo.$$
fs1=$TESTPOOL/fs.$$
done
cd $curpath
-#Testing null argument and too many arguments
+# Testing null argument and too many arguments
for opt in "" "-f"; do
log_mustnot eval "zfs unmount $opt >/dev/null 2>&1"
log_mustnot eval "zfs unmount $opt $fs $fs1 >/dev/null 2>&1"
done
-#Testing already unmounted filesystem
+# Testing already unmounted filesystem
log_must zfs unmount $fs1
for opt in "" "-f"; do
log_mustnot eval "zfs unmount $opt $fs1 >/dev/null 2>&1"
log_mustnot eval "zfs unmount /tmp/$dir >/dev/null 2>&1"
done
-#Testing legacy mounted filesystem
+# Testing legacy mounted filesystem
log_must zfs set mountpoint=legacy $fs1
if is_linux; then
log_must mount -t zfs $fs1 /tmp/$dir
log_must mkdir $import_dir
log_must cp $STF_SUITE/tests/functional/history/zfs-pool-v4.dat.Z $import_dir
log_must uncompress $import_dir/zfs-pool-v4.dat.Z
-upgrade_pool=$(zpool import -d $import_dir | grep "pool:" | awk '{print $2}')
+upgrade_pool=$(zpool import -d $import_dir | awk '/pool:/ { print $2 }')
log_must zpool import -d $import_dir $upgrade_pool
run_and_verify -p "$upgrade_pool" "zpool upgrade $upgrade_pool"