aboutsummaryrefslogtreecommitdiff
path: root/tests/zfs-tests/tests/functional/cli_root/zfs_upgrade/zfs_upgrade_004_pos.ksh
diff options
context:
space:
mode:
authorJohn Wren Kennedy <john.kennedy@delphix.com>2017-04-06 00:18:22 +0000
committerBrian Behlendorf <behlendorf1@llnl.gov>2017-04-06 16:25:36 +0000
commitc1d9abf9059a19c2b48eaa645dbce2e1fba3e0b1 (patch)
treee10f847d69d44292b0b641324cc5007b8c4badff /tests/zfs-tests/tests/functional/cli_root/zfs_upgrade/zfs_upgrade_004_pos.ksh
parent7a4500a10102c00a67442628df2ac2395484757e (diff)
downloadsrc-c1d9abf9059a19c2b48eaa645dbce2e1fba3e0b1.tar.gz
src-c1d9abf9059a19c2b48eaa645dbce2e1fba3e0b1.zip
OpenZFS 7290 - ZFS test suite needs to control what utilities it can run
Authored by: John Wren Kennedy <john.kennedy@delphix.com> Reviewed by: Dan Kimmel <dan.kimmel@delphix.com> Reviewed by: Matthew Ahrens <mahrens@delphix.com> Reviewed by: Dan McDonald <danmcd@omniti.com> Approved by: Gordon Ross <gordon.w.ross@gmail.com> Ported-by: Brian Behlendorf <behlendorf1@llnl.gov> Ported-by: George Melikov <mail@gmelikov.ru> Porting Notes: - Utilities which aren't available under Linux have been removed. - Because of sudo's default secure path behavior PATH must be explicitly reset at the top of libtest.shlib. This avoids the need for all users to customize secure path on their system. - Updated ZoL infrastructure to manage constrained path - Updated all test cases - Check permissions for usergroup tests - When testing in-tree create links under bin/ - Update fault cleanup such that missing files during cleanup aren't fatal. - Configure su environment with constrained path OpenZFS-issue: https://www.illumos.org/issues/7290 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/1d32ba6 Closes #5903
Diffstat (limited to 'tests/zfs-tests/tests/functional/cli_root/zfs_upgrade/zfs_upgrade_004_pos.ksh')
-rwxr-xr-xtests/zfs-tests/tests/functional/cli_root/zfs_upgrade/zfs_upgrade_004_pos.ksh20
1 files changed, 12 insertions, 8 deletions
diff --git a/tests/zfs-tests/tests/functional/cli_root/zfs_upgrade/zfs_upgrade_004_pos.ksh b/tests/zfs-tests/tests/functional/cli_root/zfs_upgrade/zfs_upgrade_004_pos.ksh
index 47cff6ea530e..e3ff4f4b9073 100755
--- a/tests/zfs-tests/tests/functional/cli_root/zfs_upgrade/zfs_upgrade_004_pos.ksh
+++ b/tests/zfs-tests/tests/functional/cli_root/zfs_upgrade/zfs_upgrade_004_pos.ksh
@@ -24,7 +24,11 @@
# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
+
+#
+# Copyright (c) 2016 by Delphix. All rights reserved.
#
+
. $STF_SUITE/include/libtest.shlib
. $STF_SUITE/tests/functional/cli_root/zfs_upgrade/zfs_upgrade.kshlib
@@ -44,9 +48,9 @@ verify_runnable "both"
function cleanup
{
if datasetexists $rootfs ; then
- log_must $ZFS destroy -Rf $rootfs
+ log_must zfs destroy -Rf $rootfs
fi
- log_must $ZFS create $rootfs
+ log_must zfs create $rootfs
}
function setup_datasets
@@ -58,14 +62,14 @@ function setup_datasets
typeset current_fs=$rootfs/$verfs
typeset current_snap=${current_fs}@snap
typeset current_clone=$rootfs/clone$verfs
- log_must $ZFS create -o version=${version} ${current_fs}
- log_must $ZFS snapshot ${current_snap}
- log_must $ZFS clone ${current_snap} ${current_clone}
+ log_must zfs create -o version=${version} ${current_fs}
+ log_must zfs snapshot ${current_snap}
+ log_must zfs clone ${current_snap} ${current_clone}
for subversion in $ZFS_ALL_VERSIONS ; do
typeset subverfs
eval subverfs=\$ZFS_VERSION_$subversion
- log_must $ZFS create -o version=${subversion} \
+ log_must zfs create -o version=${subversion} \
${current_fs}/$subverfs
done
datasets="$datasets ${current_fs}"
@@ -92,9 +96,9 @@ for newv in "" "current" $ZFS_VERSION; do
newv=$ZFS_VERSION
fi
- log_must eval '$ZFS upgrade -r $opt $topfs > /dev/null 2>&1'
+ log_must eval 'zfs upgrade -r $opt $topfs > /dev/null 2>&1'
- for fs in $($ZFS list -rH -t filesystem -o name $topfs) ; do
+ for fs in $(zfs list -rH -t filesystem -o name $topfs) ; do
log_must check_fs_version $fs $newv
done
done