ZTS: fix "not found" errors
This commit fixes several "not found" errors caused by calling undefined or incorrect shell functions in the following ZFS Test Suite groups: * alloc_class * channel_program/lua_core * channel_program/synctask_core * cli_root/zpool_import * cli_user/misc Reviewed-by: George Melikov <mail@gmelikov.ru> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Giuseppe Di Natale <guss80@gmail.com> Reviewed-by: bunder2015 <omfgbunder@gmail.com> Signed-off-by: loli10K <ezomori.nozomu@gmail.com> Closes #8152
This commit is contained in:
parent
62ee31adce
commit
00369f3338
@ -24,7 +24,7 @@
|
||||
|
||||
verify_runnable "global"
|
||||
|
||||
claim= "Removing a special device from a pool succeeds."
|
||||
claim="Removing a special device from a pool succeeds."
|
||||
|
||||
log_assert $claim
|
||||
log_onexit cleanup
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
verify_runnable "global"
|
||||
|
||||
claim= "Removing a dedup device from a pool succeeds."
|
||||
claim="Removing a dedup device from a pool succeeds."
|
||||
|
||||
log_assert $claim
|
||||
log_onexit cleanup
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
verify_runnable "global"
|
||||
|
||||
pool_cleanup
|
||||
default_cleanup
|
||||
disk_cleanup
|
||||
|
||||
log_pass
|
||||
|
@ -37,7 +37,7 @@ log_must_program $TESTPOOL $ZCP_ROOT/lua_core/tst.exists.zcp \
|
||||
$TESTPOOL $TESTPOOL/$TESTFS $TESTPOOL/$TESTFS@$TESTSNAP \
|
||||
$TESTPOOL/$TESTCLONE
|
||||
|
||||
log_mustnot_checkerr_program "not in the target pool" \
|
||||
log_mustnot_checkerror_program "not in the target pool" \
|
||||
$TESTPOOL - <<-EOF
|
||||
return zfs.exists('rpool')
|
||||
EOF
|
||||
|
@ -14,8 +14,6 @@
|
||||
# Copyright (c) 2016 by Delphix. All rights reserved.
|
||||
#
|
||||
|
||||
verify_runnable "global"
|
||||
|
||||
. $STF_SUITE/tests/functional/channel_program/channel_common.kshlib
|
||||
|
||||
#
|
||||
@ -23,6 +21,8 @@ verify_runnable "global"
|
||||
# run C program which tests passing different nvlists to lua
|
||||
#
|
||||
|
||||
verify_runnable "global"
|
||||
|
||||
log_assert "nvlist arguments can be passed to LUA."
|
||||
|
||||
log_must nvlist_to_lua $TESTPOOL
|
||||
|
@ -14,8 +14,6 @@
|
||||
# Copyright (c) 2016 by Delphix. All rights reserved.
|
||||
#
|
||||
|
||||
verify_runnable "global"
|
||||
|
||||
. $STF_SUITE/tests/functional/channel_program/channel_common.kshlib
|
||||
|
||||
#
|
||||
|
@ -14,8 +14,6 @@
|
||||
# Copyright (c) 2016 by Delphix. All rights reserved.
|
||||
#
|
||||
|
||||
verify_runnable "global"
|
||||
|
||||
. $STF_SUITE/tests/functional/channel_program/channel_common.kshlib
|
||||
|
||||
#
|
||||
|
@ -14,8 +14,6 @@
|
||||
# Copyright (c) 2016 by Delphix. All rights reserved.
|
||||
#
|
||||
|
||||
verify_runnable "global"
|
||||
|
||||
. $STF_SUITE/tests/functional/channel_program/channel_common.kshlib
|
||||
|
||||
#
|
||||
|
@ -14,8 +14,6 @@
|
||||
# Copyright (c) 2016, 2017 by Delphix. All rights reserved.
|
||||
#
|
||||
|
||||
verify_runnable "global"
|
||||
|
||||
. $STF_SUITE/tests/functional/channel_program/channel_common.kshlib
|
||||
|
||||
#
|
||||
|
@ -14,10 +14,10 @@
|
||||
# Copyright (c) 2016, 2017 by Delphix. All rights reserved.
|
||||
#
|
||||
|
||||
verify_runnable "global"
|
||||
|
||||
. $STF_SUITE/tests/functional/channel_program/channel_common.kshlib
|
||||
|
||||
verify_runnable "global"
|
||||
|
||||
fs=$TESTPOOL/$TESTFS/testchild
|
||||
|
||||
function cleanup
|
||||
|
@ -14,10 +14,10 @@
|
||||
# Copyright (c) 2016, 2017 by Delphix. All rights reserved.
|
||||
#
|
||||
|
||||
verify_runnable "global"
|
||||
|
||||
. $STF_SUITE/tests/functional/channel_program/channel_common.kshlib
|
||||
|
||||
verify_runnable "global"
|
||||
|
||||
snap=$TESTPOOL/$TESTFS@$TESTSNAP
|
||||
|
||||
function cleanup
|
||||
|
@ -90,7 +90,7 @@ function test_shared_device
|
||||
typeset checksum2=$(dev_checksum $sharedvdev)
|
||||
|
||||
if [[ $checksum1 == $checksum2 ]]; then
|
||||
log_pos "Device hasn't been modified by original pool"
|
||||
log_pass "Device hasn't been modified by original pool"
|
||||
else
|
||||
log_fail "Device has been modified by original pool." \
|
||||
"Checksum mismatch: $checksum1 != $checksum2."
|
||||
|
@ -55,7 +55,7 @@ default_setup_noexit "$DISK" "" "volume"
|
||||
log_must zfs snapshot $TESTPOOL/$TESTFS@snap
|
||||
log_must zfs clone $TESTPOOL/$TESTFS@snap $TESTPOOL/$TESTFS/clone
|
||||
# create a file in the filesystem that isn't in the above snapshot
|
||||
touch /$TESTDIR/file.txt
|
||||
touch $TESTDIR/file.txt
|
||||
|
||||
|
||||
# create a non-default property and a child we can use to test inherit
|
||||
@ -116,28 +116,28 @@ then
|
||||
|
||||
# Now create several virtual disks to test zpool with
|
||||
|
||||
mkfile $MINVDEVSIZE /$TESTDIR/disk1.dat
|
||||
mkfile $MINVDEVSIZE /$TESTDIR/disk2.dat
|
||||
mkfile $MINVDEVSIZE /$TESTDIR/disk3.dat
|
||||
mkfile $MINVDEVSIZE /$TESTDIR/disk-additional.dat
|
||||
mkfile $MINVDEVSIZE /$TESTDIR/disk-export.dat
|
||||
mkfile $MINVDEVSIZE /$TESTDIR/disk-offline.dat
|
||||
mkfile $MINVDEVSIZE /$TESTDIR/disk-spare1.dat
|
||||
mkfile $MINVDEVSIZE /$TESTDIR/disk-spare2.dat
|
||||
mkfile $MINVDEVSIZE $TEST_BASE_DIR/disk1.dat
|
||||
mkfile $MINVDEVSIZE $TEST_BASE_DIR/disk2.dat
|
||||
mkfile $MINVDEVSIZE $TEST_BASE_DIR/disk3.dat
|
||||
mkfile $MINVDEVSIZE $TEST_BASE_DIR/disk-additional.dat
|
||||
mkfile $MINVDEVSIZE $TEST_BASE_DIR/disk-export.dat
|
||||
mkfile $MINVDEVSIZE $TEST_BASE_DIR/disk-offline.dat
|
||||
mkfile $MINVDEVSIZE $TEST_BASE_DIR/disk-spare1.dat
|
||||
mkfile $MINVDEVSIZE $TEST_BASE_DIR/disk-spare2.dat
|
||||
|
||||
# and create a pool we can perform attach remove replace,
|
||||
# etc. operations with
|
||||
log_must zpool create $TESTPOOL.virt mirror /$TESTDIR/disk1.dat \
|
||||
/$TESTDIR/disk2.dat /$TESTDIR/disk3.dat /$TESTDIR/disk-offline.dat \
|
||||
spare /$TESTDIR/disk-spare1.dat
|
||||
log_must zpool create $TESTPOOL.virt mirror $TEST_BASE_DIR/disk1.dat \
|
||||
$TEST_BASE_DIR/disk2.dat $TEST_BASE_DIR/disk3.dat \
|
||||
$TEST_BASE_DIR/disk-offline.dat spare $TEST_BASE_DIR/disk-spare1.dat
|
||||
|
||||
|
||||
# Offline one of the disks to test online
|
||||
log_must zpool offline $TESTPOOL.virt /$TESTDIR/disk-offline.dat
|
||||
log_must zpool offline $TESTPOOL.virt $TEST_BASE_DIR/disk-offline.dat
|
||||
|
||||
|
||||
# create an exported pool to test import
|
||||
log_must zpool create $TESTPOOL.exported /$TESTDIR/disk-export.dat
|
||||
log_must zpool create $TESTPOOL.exported $TEST_BASE_DIR/disk-export.dat
|
||||
log_must zpool export $TESTPOOL.exported
|
||||
|
||||
set -A props $POOL_PROPS
|
||||
@ -154,8 +154,8 @@ then
|
||||
|
||||
# copy a v1 pool from cli_root
|
||||
cp $STF_SUITE/tests/functional/cli_root/zpool_upgrade/blockfiles/zfs-pool-v1.dat.bz2 \
|
||||
/$TESTDIR
|
||||
log_must bunzip2 /$TESTDIR/zfs-pool-v1.dat.bz2
|
||||
log_must zpool import -d /$TESTDIR v1-pool
|
||||
$TEST_BASE_DIR/
|
||||
log_must bunzip2 $TEST_BASE_DIR/zfs-pool-v1.dat.bz2
|
||||
log_must zpool import -d $TEST_BASE_DIR/ v1-pool
|
||||
fi
|
||||
log_pass
|
||||
|
@ -47,7 +47,6 @@ verify_runnable "global"
|
||||
|
||||
log_assert "zpool upgrade returns an error when run as a user"
|
||||
|
||||
log_onexit cleanup
|
||||
# zpool upgrade returns 0 when it can't do anything
|
||||
log_must zpool upgrade $TESTPOOL.virt
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user