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 <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ibc3b9268263f44c0b865a15a1ed1a15a404ed23e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4091
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This commit is contained in:
Shuhei Matsumoto 2020-09-08 01:15:31 +09:00 committed by Tomasz Zawadzki
parent 0ecb36c727
commit 8701f636c6

View File

@ -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