From 8701f636c6820ffc8c38183fb255633af42e43f9 Mon Sep 17 00:00:00 2001 From: Shuhei Matsumoto Date: Tue, 8 Sep 2020 01:15:31 +0900 Subject: [PATCH] test/nvmf_example: Not echo but substitute directly to NVMF_EXAMPLE variable Following the last patch, simply set NVMF_EXAMPLE directly without using echo. Signed-off-by: Shuhei Matsumoto Change-Id: Ibc3b9268263f44c0b865a15a1ed1a15a404ed23e Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4091 Tested-by: SPDK CI Jenkins Reviewed-by: Tomasz Zawadzki Reviewed-by: Aleksey Marchuk --- test/nvmf/target/nvmf_example.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/test/nvmf/target/nvmf_example.sh b/test/nvmf/target/nvmf_example.sh index 256295a87..e1ab28f62 100755 --- a/test/nvmf/target/nvmf_example.sh +++ b/test/nvmf/target/nvmf_example.sh @@ -7,22 +7,25 @@ source $rootdir/test/nvmf/common.sh rpc_py="$rootdir/scripts/rpc.py" +NVMF_EXAMPLE=("$SPDK_EXAMPLE_DIR/nvmf") + MALLOC_BDEV_SIZE=64 MALLOC_BLOCK_SIZE=512 function build_nvmf_example_args() { if [ $SPDK_RUN_NON_ROOT -eq 1 ]; then - echo "sudo -u $USER $SPDK_EXAMPLE_DIR/nvmf -i $NVMF_APP_SHM_ID" -g 10000 + NVMF_EXAMPLE=(sudo -u "$USER" "${NVMF_EXAMPLE[@]}") + NVMF_EXAMPLE+=(-i "$NVMF_APP_SHM_ID" -g 10000) else - echo "$SPDK_EXAMPLE_DIR/nvmf -i $NVMF_APP_SHM_ID" -g 10000 + NVMF_EXAMPLE+=(-i "$NVMF_APP_SHM_ID" -g 10000) fi } -NVMF_EXAMPLE="$(build_nvmf_example_args)" +build_nvmf_example_args function nvmfexamplestart() { timing_enter start_nvmf_example - $NVMF_EXAMPLE $1 & + "${NVMF_EXAMPLE[@]}" $1 & nvmfpid=$! trap 'process_shm --id $NVMF_APP_SHM_ID; nvmftestfini; exit 1' SIGINT SIGTERM EXIT waitforlisten $nvmfpid