diff --git a/common.zsh b/common.zsh index 65bcc9b..e855f2e 100644 --- a/common.zsh +++ b/common.zsh @@ -29,7 +29,7 @@ DMESG=() PROTO=(tcp) SRVDMESG=() USER=$(whoami) -VERSION=(3 4.0 4.1 4.2) +VERSION=(3 4) ###################### @@ -70,9 +70,20 @@ function prepare_to_test() $BIN/rping.zsh ${RDMA[-1]} ${CLIENT[-1]} ${SERVER[-1]} fi setup_client_func + check_versions echo } +function check_versions() +{ + valid=(3 4.0 4.1 4.2) + if [[ ${VERSION[(ie)4]} -le ${#VERSION} ]]; then + VERSION+=(4.0 4.1 4.2) + fi + VERSION=(${(ou)VERSION}) + VERSION=(${VERSION:*valid}) +} + TRAPEXIT() { if [ ${#DMESG} -gt 0 ]; then diff --git a/completions/_xfstests.zsh b/completions/_xfstests.zsh index eaf4bd3..16e5282 100644 --- a/completions/_xfstests.zsh +++ b/completions/_xfstests.zsh @@ -13,6 +13,6 @@ function _xfstests.zsh() { {-s,--server}'[the server to test against]: : _alternative "hosts\:hosts\: _ssh_hosts" "domains\:domains\:($(virsh list --all --name))"' \ - \*{-v,--version}+'[the nfs version to test (default=all)]: :(3 4.0 4.1 4.2)' \ + \*{-v,--version}+'[the nfs version to test (default=all)]: :(3 4 4.0 4.1 4.2)' \ {-x,--export}'[the exported directory on the server]: : _files -/' } diff --git a/xfstests.zsh b/xfstests.zsh index ec8cc99..52f10a5 100755 --- a/xfstests.zsh +++ b/xfstests.zsh @@ -66,10 +66,6 @@ run_xfs_tests() { mkdir -p $TMP_RESULTS for proto in $PROTO; do for vers in $VERSION; do - case $vers in - "-v" | "--version") continue ;; - esac - run_xfs_tests $proto $vers & done done