From 35a9ddb5b6c4b46b84d84ca226b38d713ef20b35 Mon Sep 17 00:00:00 2001 From: Krzysztof Karas Date: Mon, 5 Sep 2022 12:48:41 +0200 Subject: [PATCH] test: restore rpc_py to point to rpc.py instead of rpc_cmd rpc_cmd function does not tolerate piping arguments into it, so code execution skips the parts responsible for generating a return code. The code is equal to nothing or "", which then is compared with a value, ultimately erroring out the whole test. To avoid these problems restore rpc_py varible declaration in multiconnection.sh and ext4test.sh scripts. Additionally added a comment in compress.sh to match ext4test.sh and multiconnection.sh. Change-Id: I4fb5f737d4e97d602f522b810363bc0d4522bf0d Signed-off-by: Krzysztof Karas Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14356 Tested-by: SPDK CI Jenkins Reviewed-by: Dong Yi Reviewed-by: Pawel Piatek Reviewed-by: Kamil Godzwon Reviewed-by: Tomasz Zawadzki Reviewed-by: Jim Harris --- test/compress/compress.sh | 3 +++ test/iscsi_tgt/ext4test/ext4test.sh | 3 +++ test/iscsi_tgt/multiconnection/multiconnection.sh | 3 +++ 3 files changed, 9 insertions(+) diff --git a/test/compress/compress.sh b/test/compress/compress.sh index 4ac815583..48889c5a2 100755 --- a/test/compress/compress.sh +++ b/test/compress/compress.sh @@ -8,6 +8,9 @@ plugindir=$rootdir/examples/bdev/fio_plugin source "$rootdir/scripts/common.sh" source "$rootdir/test/common/autotest_common.sh" source "$rootdir/test/nvmf/common.sh" + +# Declare rpc_py here, because its default value points to rpc_cmd function, +# which does not tolerate piping arguments into it. rpc_py="$rootdir/scripts/rpc.py" function error_cleanup() { diff --git a/test/iscsi_tgt/ext4test/ext4test.sh b/test/iscsi_tgt/ext4test/ext4test.sh index 4fd9648c6..6c3847409 100755 --- a/test/iscsi_tgt/ext4test/ext4test.sh +++ b/test/iscsi_tgt/ext4test/ext4test.sh @@ -7,6 +7,9 @@ source $rootdir/test/iscsi_tgt/common.sh iscsitestinit +# Declare rpc_py here, because its default value points to rpc_cmd function, +# which does not tolerate piping arguments into it. +rpc_py="$rootdir/scripts/rpc.py" node_base="iqn.2013-06.com.intel.ch.spdk" timing_enter start_iscsi_tgt diff --git a/test/iscsi_tgt/multiconnection/multiconnection.sh b/test/iscsi_tgt/multiconnection/multiconnection.sh index 35aded32a..78e3fcd3e 100755 --- a/test/iscsi_tgt/multiconnection/multiconnection.sh +++ b/test/iscsi_tgt/multiconnection/multiconnection.sh @@ -7,6 +7,9 @@ source $rootdir/test/iscsi_tgt/common.sh iscsitestinit +# Declare rpc_py here, because its default value points to rpc_cmd function, +# which does not tolerate piping arguments into it. +rpc_py="$rootdir/scripts/rpc.py" fio_py="$rootdir/scripts/fio-wrapper" CONNECTION_NUMBER=30