tests: don't fail if no fio or python3.sysctl
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: John Kennedy <john.kennedy@delphix.com> Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #13259
This commit is contained in:
parent
bd328a588b
commit
2d9da5e1c8
|
@ -3376,6 +3376,7 @@ function write_compressible
|
|||
done
|
||||
done
|
||||
else
|
||||
command -v fio > /dev/null || log_unsupported "fio missing"
|
||||
log_must eval fio \
|
||||
--name=job \
|
||||
--fallocate=0 \
|
||||
|
|
|
@ -26,5 +26,7 @@
|
|||
|
||||
. $STF_SUITE/include/libtest.shlib
|
||||
|
||||
is_freebsd && ! python3 -c 'import sysctl' 2>/dev/null && log_unsupported "python3 sysctl module missing"
|
||||
|
||||
DISK=${DISKS%% *}
|
||||
default_setup $DISK
|
||||
|
|
|
@ -44,6 +44,8 @@
|
|||
|
||||
verify_runnable "global"
|
||||
|
||||
command -v fio > /dev/null || log_unsupported "fio missing"
|
||||
|
||||
log_assert "Looping around a cache device succeeds."
|
||||
|
||||
function cleanup
|
||||
|
|
|
@ -27,34 +27,15 @@
|
|||
|
||||
. $STF_SUITE/include/libtest.shlib
|
||||
|
||||
log_assert "arc_summary generates output and doesn't return an error code"
|
||||
is_freebsd && ! python3 -c 'import sysctl' 2>/dev/null && log_unsupported "python3 sysctl module missing"
|
||||
|
||||
# Depending on which version of arc_summary is installed some command
|
||||
# line options may not be available. The python3 version includes
|
||||
# several additional flags.
|
||||
python3 -V 2>&1 > /dev/null
|
||||
if (( $? )); then
|
||||
# Some systems have Python 3 installed, but only older versions
|
||||
# that don't have the subprocess.run() functionality. We catch
|
||||
# these with a separate test. Remove this when all systems have
|
||||
# reached 3.5 or greater
|
||||
VERSIONPYTEST=$(python3 -V)
|
||||
if [[ ${VERSIONPYTEST:9:1} -lt 5 ]]; then
|
||||
set -A args "" "-a" "-d" "-p 1"
|
||||
else
|
||||
set -A args "" "-a" "-d" "-p 1" "-g" "-s arc" "-r"
|
||||
fi
|
||||
else
|
||||
set -A args "" "-a" "-d" "-p 1"
|
||||
fi
|
||||
log_assert "arc_summary generates output and doesn't return an error code"
|
||||
|
||||
# Without this, the below checks aren't going to work the way we hope...
|
||||
set -o pipefail
|
||||
|
||||
typeset -i i=0
|
||||
while [[ $i -lt ${#args[*]} ]]; do
|
||||
log_must eval "arc_summary ${args[i]} > /dev/null"
|
||||
((i = i + 1))
|
||||
for arg in "" "-a" "-d" "-p 1" "-g" "-s arc" "-r"; do
|
||||
log_must eval "arc_summary $arg > /dev/null"
|
||||
done
|
||||
|
||||
log_must eval "arc_summary | head > /dev/null"
|
||||
|
|
|
@ -27,11 +27,11 @@
|
|||
|
||||
. $STF_SUITE/include/libtest.shlib
|
||||
|
||||
typeset args=("-x" "-5" "-p 7" "--err" "-@")
|
||||
is_freebsd && ! python3 -c 'import sysctl' 2>/dev/null && log_unsupported "python3 sysctl module missing"
|
||||
|
||||
log_assert "arc_summary generates an error code with invalid options"
|
||||
|
||||
for arg in "${args[@]}"; do
|
||||
for arg in "-x" "-5" "-p 7" "--err" "-@"; do
|
||||
log_mustnot eval "arc_summary $arg > /dev/null"
|
||||
done
|
||||
|
||||
|
|
|
@ -27,6 +27,8 @@
|
|||
|
||||
. $STF_SUITE/include/libtest.shlib
|
||||
|
||||
is_freebsd && ! python3 -c 'import sysctl' 2>/dev/null && log_unsupported "python3 sysctl module missing"
|
||||
|
||||
set -A args "" "-s \",\"" "-x" "-v" \
|
||||
"-f time,hit%,dh%,ph%,mh%"
|
||||
|
||||
|
@ -38,4 +40,3 @@ while [[ $i -lt ${#args[*]} ]]; do
|
|||
((i = i + 1))
|
||||
done
|
||||
log_pass "arcstat generates output and doesn't return an error code"
|
||||
|
||||
|
|
|
@ -52,6 +52,8 @@ export DIRECT=1
|
|||
|
||||
verify_runnable "global"
|
||||
|
||||
command -v fio > /dev/null || log_unsupported "fio missing"
|
||||
|
||||
log_assert "L2ARC with compressed_arc enabled succeeds."
|
||||
|
||||
origin_carc_setting=$(get_tunable COMPRESSED_ARC_ENABLED)
|
||||
|
|
|
@ -52,6 +52,8 @@ export DIRECT=1
|
|||
|
||||
verify_runnable "global"
|
||||
|
||||
command -v fio > /dev/null || log_unsupported "fio missing"
|
||||
|
||||
log_assert "L2ARC with compressed_arc disabled succeeds."
|
||||
|
||||
origin_carc_setting=$(get_tunable COMPRESSED_ARC_ENABLED)
|
||||
|
|
|
@ -53,6 +53,8 @@ export DIRECT=1
|
|||
|
||||
verify_runnable "global"
|
||||
|
||||
command -v fio > /dev/null || log_unsupported "fio missing"
|
||||
|
||||
log_assert "L2ARC with encryption enabled succeeds."
|
||||
|
||||
origin_carc_setting=$(get_tunable COMPRESSED_ARC_ENABLED)
|
||||
|
|
|
@ -53,6 +53,8 @@ export DIRECT=1
|
|||
|
||||
verify_runnable "global"
|
||||
|
||||
command -v fio > /dev/null || log_unsupported "fio missing"
|
||||
|
||||
log_assert "L2ARC with compressed_arc disabled succeeds."
|
||||
|
||||
origin_carc_setting=$(get_tunable COMPRESSED_ARC_ENABLED)
|
||||
|
|
|
@ -44,7 +44,7 @@ if [[ $(linux_version) -lt $(linux_version "5.1") ]]; then
|
|||
log_unsupported "Requires io_uring support"
|
||||
fi
|
||||
|
||||
fio --ioengine=io_uring --parse-only || log_unsupported "io_uring support required"
|
||||
fio --ioengine=io_uring --parse-only || log_unsupported "fio io_uring support required"
|
||||
|
||||
function cleanup
|
||||
{
|
||||
|
|
|
@ -39,6 +39,8 @@
|
|||
|
||||
verify_runnable "global"
|
||||
|
||||
command -v fio > /dev/null || log_unsupported "fio missing"
|
||||
|
||||
function cleanup
|
||||
{
|
||||
log_must rm -f "$mntpnt/rw*"
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
# 2. Repeat the test with additional fio(1) options.
|
||||
#
|
||||
|
||||
if ! compare_version_gte $(fio --version) "fio-2.3"; then
|
||||
if ! compare_version_gte "$(fio --version)" "fio-2.3"; then
|
||||
log_unsupported "Requires fio-2.3 or newer"
|
||||
fi
|
||||
|
||||
|
|
|
@ -39,6 +39,8 @@
|
|||
|
||||
verify_runnable "global"
|
||||
|
||||
command -v fio > /dev/null || log_unsupported "fio missing"
|
||||
|
||||
function cleanup
|
||||
{
|
||||
log_must rm -f "$mntpnt/rw*"
|
||||
|
|
|
@ -39,6 +39,8 @@
|
|||
|
||||
verify_runnable "global"
|
||||
|
||||
command -v fio > /dev/null || log_unsupported "fio missing"
|
||||
|
||||
function cleanup
|
||||
{
|
||||
log_must rm -f "/$TESTPOOL/rw*"
|
||||
|
|
|
@ -39,6 +39,8 @@
|
|||
|
||||
verify_runnable "global"
|
||||
|
||||
command -v fio > /dev/null || log_unsupported "fio missing"
|
||||
|
||||
function cleanup
|
||||
{
|
||||
log_must rm -f "$mntpnt/rw*"
|
||||
|
|
|
@ -40,6 +40,8 @@
|
|||
|
||||
verify_runnable "global"
|
||||
|
||||
command -v fio > /dev/null || log_unsupported "fio missing"
|
||||
|
||||
log_assert "L2ARC MFU/MRU arcstats do not leak."
|
||||
|
||||
function cleanup
|
||||
|
|
|
@ -38,6 +38,8 @@
|
|||
|
||||
verify_runnable "global"
|
||||
|
||||
command -v fio > /dev/null || log_unsupported "fio missing"
|
||||
|
||||
log_assert "l2arc_misses does not increment upon reads from a pool without l2arc."
|
||||
|
||||
function cleanup
|
||||
|
|
|
@ -39,6 +39,8 @@
|
|||
|
||||
verify_runnable "global"
|
||||
|
||||
command -v fio > /dev/null || log_unsupported "fio missing"
|
||||
|
||||
log_assert "l2arc_mfuonly does not cache MRU buffers."
|
||||
|
||||
function cleanup
|
||||
|
|
|
@ -49,6 +49,8 @@
|
|||
|
||||
verify_runnable "global"
|
||||
|
||||
command -v fio > /dev/null || log_unsupported "fio missing"
|
||||
|
||||
log_assert "Persistent L2ARC with an unencrypted ZFS file system succeeds."
|
||||
|
||||
function cleanup
|
||||
|
|
|
@ -52,6 +52,8 @@
|
|||
|
||||
verify_runnable "global"
|
||||
|
||||
command -v fio > /dev/null || log_unsupported "fio missing"
|
||||
|
||||
log_assert "Persistent L2ARC with an encrypted ZFS file system succeeds."
|
||||
|
||||
function cleanup
|
||||
|
|
|
@ -38,6 +38,8 @@
|
|||
|
||||
verify_runnable "global"
|
||||
|
||||
command -v fio > /dev/null || log_unsupported "fio missing"
|
||||
|
||||
log_assert "Persistent L2ARC fails as expected when L2ARC_REBUILD_ENABLED = 0."
|
||||
|
||||
function cleanup
|
||||
|
|
|
@ -40,6 +40,8 @@
|
|||
|
||||
verify_runnable "global"
|
||||
|
||||
command -v fio > /dev/null || log_unsupported "fio missing"
|
||||
|
||||
log_assert "Off/onlining an L2ARC device results in rebuilding L2ARC, vdev not present."
|
||||
|
||||
function cleanup
|
||||
|
|
|
@ -39,6 +39,8 @@
|
|||
|
||||
verify_runnable "global"
|
||||
|
||||
command -v fio > /dev/null || log_unsupported "fio missing"
|
||||
|
||||
log_assert "Off/onlining an L2ARC device results in rebuilding L2ARC, vdev present."
|
||||
|
||||
function cleanup
|
||||
|
|
|
@ -30,6 +30,8 @@
|
|||
|
||||
verify_runnable "both"
|
||||
|
||||
command -v fio > /dev/null || log_unsupported "fio missing"
|
||||
|
||||
function cleanup
|
||||
{
|
||||
destroy_pool $TESTPOOL
|
||||
|
|
|
@ -32,6 +32,8 @@
|
|||
# 4. Reattach it to make a mirror
|
||||
#
|
||||
|
||||
command -v fio > /dev/null || log_unsupported "fio missing"
|
||||
|
||||
TMPDIR=${TMPDIR:-$TEST_BASE_DIR}
|
||||
|
||||
DISK1="$TMPDIR/dsk1"
|
||||
|
|
|
@ -31,6 +31,8 @@
|
|||
|
||||
verify_runnable "global"
|
||||
|
||||
command -v fio > /dev/null || log_unsupported "fio missing"
|
||||
|
||||
function cleanup
|
||||
{
|
||||
#
|
||||
|
|
|
@ -36,6 +36,8 @@
|
|||
|
||||
verify_runnable "global"
|
||||
|
||||
command -v fio > /dev/null || log_unsupported "fio missing"
|
||||
|
||||
log_assert "Trim of L2ARC succeeds."
|
||||
|
||||
function cleanup
|
||||
|
|
|
@ -38,6 +38,8 @@
|
|||
. $STF_SUITE/include/libtest.shlib
|
||||
. $STF_SUITE/tests/perf/perf.shlib
|
||||
|
||||
command -v fio > /dev/null || log_unsupported "fio missing"
|
||||
|
||||
function cleanup
|
||||
{
|
||||
# kill fio and iostat
|
||||
|
|
|
@ -38,6 +38,8 @@
|
|||
. $STF_SUITE/include/libtest.shlib
|
||||
. $STF_SUITE/tests/perf/perf.shlib
|
||||
|
||||
command -v fio > /dev/null || log_unsupported "fio missing"
|
||||
|
||||
function cleanup
|
||||
{
|
||||
# kill fio and iostat
|
||||
|
|
|
@ -28,6 +28,8 @@
|
|||
. $STF_SUITE/include/libtest.shlib
|
||||
. $STF_SUITE/tests/perf/perf.shlib
|
||||
|
||||
command -v fio > /dev/null || log_unsupported "fio missing"
|
||||
|
||||
function cleanup
|
||||
{
|
||||
# kill fio and iostat
|
||||
|
|
|
@ -37,6 +37,8 @@
|
|||
. $STF_SUITE/include/libtest.shlib
|
||||
. $STF_SUITE/tests/perf/perf.shlib
|
||||
|
||||
command -v fio > /dev/null || log_unsupported "fio missing"
|
||||
|
||||
function cleanup
|
||||
{
|
||||
# kill fio and iostat
|
||||
|
|
|
@ -18,6 +18,8 @@
|
|||
. $STF_SUITE/include/libtest.shlib
|
||||
. $STF_SUITE/tests/perf/perf.shlib
|
||||
|
||||
command -v fio > /dev/null || log_unsupported "fio missing"
|
||||
|
||||
function cleanup
|
||||
{
|
||||
# kill fio and iostat
|
||||
|
|
|
@ -28,6 +28,8 @@
|
|||
. $STF_SUITE/include/libtest.shlib
|
||||
. $STF_SUITE/tests/perf/perf.shlib
|
||||
|
||||
command -v fio > /dev/null || log_unsupported "fio missing"
|
||||
|
||||
function cleanup
|
||||
{
|
||||
# kill fio and iostat
|
||||
|
|
|
@ -34,6 +34,8 @@
|
|||
. $STF_SUITE/include/libtest.shlib
|
||||
. $STF_SUITE/tests/perf/perf.shlib
|
||||
|
||||
command -v fio > /dev/null || log_unsupported "fio missing"
|
||||
|
||||
function cleanup
|
||||
{
|
||||
# kill fio and iostat
|
||||
|
|
|
@ -32,6 +32,8 @@
|
|||
. $STF_SUITE/include/libtest.shlib
|
||||
. $STF_SUITE/tests/perf/perf.shlib
|
||||
|
||||
command -v fio > /dev/null || log_unsupported "fio missing"
|
||||
|
||||
function cleanup
|
||||
{
|
||||
# kill fio and iostat
|
||||
|
|
|
@ -37,6 +37,8 @@
|
|||
. $STF_SUITE/include/libtest.shlib
|
||||
. $STF_SUITE/tests/perf/perf.shlib
|
||||
|
||||
command -v fio > /dev/null || log_unsupported "fio missing"
|
||||
|
||||
function cleanup
|
||||
{
|
||||
# kill fio and iostat
|
||||
|
|
Loading…
Reference in New Issue