Make zfs test easier to run in local install
When ZFS is installed by 'make install', programs will be installed into '/usr/local'. ZFS test scripts can't locate programs 'zpool' that caused tests failure. Fix typo in help message. Add sanity check to for ksh and generate a useful error message. Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #4495
This commit is contained in:
parent
2b54cb1451
commit
e612379614
|
@ -177,7 +177,7 @@ $0 -r linux-fast
|
||||||
|
|
||||||
# Cleanup a previous run of the test suite prior to testing, run the
|
# Cleanup a previous run of the test suite prior to testing, run the
|
||||||
# default (linux) suite of tests and perform no cleanup on exit.
|
# default (linux) suite of tests and perform no cleanup on exit.
|
||||||
$0 -c
|
$0 -x
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
@ -250,6 +250,13 @@ if [ $(sudo whoami) != "root" ]; then
|
||||||
fail "Passwordless sudo access required."
|
fail "Passwordless sudo access required."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
|
# Check if ksh exists
|
||||||
|
#
|
||||||
|
if [ -z "$(which ksh 2>/dev/null)" ]; then
|
||||||
|
fail "This test suite requires ksh."
|
||||||
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
# Verify the ZFS module stack if loaded.
|
# Verify the ZFS module stack if loaded.
|
||||||
#
|
#
|
||||||
|
|
|
@ -29,6 +29,20 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
. $STF_SUITE/include/commands.cfg
|
. $STF_SUITE/include/commands.cfg
|
||||||
|
|
||||||
|
# Common paths
|
||||||
|
bindir=@bindir@
|
||||||
|
sbindir=@sbindir@
|
||||||
|
|
||||||
|
# ZFS Commands
|
||||||
|
export ZDB=${ZDB:-${sbindir}/zdb}
|
||||||
|
export ZFS=${ZFS:-${sbindir}/zfs}
|
||||||
|
export ZHACK=${ZHACK:-${sbindir}/zhack}
|
||||||
|
export ZINJECT=${ZINJECT:-${sbindir}/zinject}
|
||||||
|
export ZPOOL=${ZPOOL:-${sbindir}/zpool}
|
||||||
|
export ZTEST=${ZTEST:-${sbindir}/ztest}
|
||||||
|
export ZPIOS=${ZPIOS:-${sbindir}/zpios}
|
||||||
|
|
||||||
. $STF_SUITE/include/libtest.shlib
|
. $STF_SUITE/include/libtest.shlib
|
||||||
|
|
||||||
# Optionally override the installed ZFS commands to run in-tree
|
# Optionally override the installed ZFS commands to run in-tree
|
||||||
|
@ -45,21 +59,8 @@ export RT_SHORT="1"
|
||||||
export ZONE_POOL="zonepool"
|
export ZONE_POOL="zonepool"
|
||||||
export ZONE_CTR="zonectr"
|
export ZONE_CTR="zonectr"
|
||||||
|
|
||||||
# Common paths
|
|
||||||
bindir=@bindir@
|
|
||||||
sbindir=@sbindir@
|
|
||||||
helperdir=@datarootdir@/@PACKAGE@/zfs-tests/bin
|
|
||||||
|
|
||||||
# ZFS Commands
|
|
||||||
ZDB=${ZDB:-${sbindir}/zdb}
|
|
||||||
ZFS=${ZFS:-${sbindir}/zfs}
|
|
||||||
ZHACK=${ZHACK:-${sbindir}/zhack}
|
|
||||||
ZINJECT=${ZINJECT:-${sbindir}/zinject}
|
|
||||||
ZPOOL=${ZPOOL:-${sbindir}/zpool}
|
|
||||||
ZTEST=${ZTEST:-${sbindir}/ztest}
|
|
||||||
ZPIOS=${ZPIOS:-${sbindir}/zpios}
|
|
||||||
|
|
||||||
# Test Suite Specific Commands
|
# Test Suite Specific Commands
|
||||||
|
helperdir=@datarootdir@/@PACKAGE@/zfs-tests/bin
|
||||||
export CHG_USR_EXEC=${CHG_USR_EXEC:-${helperdir}/chg_usr_exec}
|
export CHG_USR_EXEC=${CHG_USR_EXEC:-${helperdir}/chg_usr_exec}
|
||||||
export DEVNAME2DEVID=${DEVNAME2DEVID:-${helperdir}/devname2devid}
|
export DEVNAME2DEVID=${DEVNAME2DEVID:-${helperdir}/devname2devid}
|
||||||
export DIR_RD_UPDATE=${DIR_RD_UPDATE:-${helperdir}/dir_rd_update}
|
export DIR_RD_UPDATE=${DIR_RD_UPDATE:-${helperdir}/dir_rd_update}
|
||||||
|
|
|
@ -31,13 +31,6 @@
|
||||||
|
|
||||||
. ${STF_TOOLS}/include/logapi.shlib
|
. ${STF_TOOLS}/include/logapi.shlib
|
||||||
|
|
||||||
ZDB=${ZDB:-/sbin/zdb}
|
|
||||||
ZFS=${ZFS:-/sbin/zfs}
|
|
||||||
ZINJECT=${ZINJECT:-/sbin/zinject}
|
|
||||||
ZHACK=${ZHACK:-/sbin/zhack}
|
|
||||||
ZPOOL=${ZPOOL:-/sbin/zpool}
|
|
||||||
ZTEST=${ZTEST:-/sbin/ztest}
|
|
||||||
|
|
||||||
# Determine if this is a Linux test system
|
# Determine if this is a Linux test system
|
||||||
#
|
#
|
||||||
# Return 0 if platform Linux, 1 if otherwise
|
# Return 0 if platform Linux, 1 if otherwise
|
||||||
|
|
Loading…
Reference in New Issue