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:
LOLi
2018-11-27 18:39:37 +01:00
committed by Brian Behlendorf
parent 62ee31adce
commit 00369f3338
14 changed files with 28 additions and 37 deletions
@@ -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