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:
parent
0ecb36c727
commit
8701f636c6
@ -7,22 +7,25 @@ source $rootdir/test/nvmf/common.sh
|
|||||||
|
|
||||||
rpc_py="$rootdir/scripts/rpc.py"
|
rpc_py="$rootdir/scripts/rpc.py"
|
||||||
|
|
||||||
|
NVMF_EXAMPLE=("$SPDK_EXAMPLE_DIR/nvmf")
|
||||||
|
|
||||||
MALLOC_BDEV_SIZE=64
|
MALLOC_BDEV_SIZE=64
|
||||||
MALLOC_BLOCK_SIZE=512
|
MALLOC_BLOCK_SIZE=512
|
||||||
|
|
||||||
function build_nvmf_example_args() {
|
function build_nvmf_example_args() {
|
||||||
if [ $SPDK_RUN_NON_ROOT -eq 1 ]; then
|
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
|
else
|
||||||
echo "$SPDK_EXAMPLE_DIR/nvmf -i $NVMF_APP_SHM_ID" -g 10000
|
NVMF_EXAMPLE+=(-i "$NVMF_APP_SHM_ID" -g 10000)
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
NVMF_EXAMPLE="$(build_nvmf_example_args)"
|
build_nvmf_example_args
|
||||||
|
|
||||||
function nvmfexamplestart() {
|
function nvmfexamplestart() {
|
||||||
timing_enter start_nvmf_example
|
timing_enter start_nvmf_example
|
||||||
$NVMF_EXAMPLE $1 &
|
"${NVMF_EXAMPLE[@]}" $1 &
|
||||||
nvmfpid=$!
|
nvmfpid=$!
|
||||||
trap 'process_shm --id $NVMF_APP_SHM_ID; nvmftestfini; exit 1' SIGINT SIGTERM EXIT
|
trap 'process_shm --id $NVMF_APP_SHM_ID; nvmftestfini; exit 1' SIGINT SIGTERM EXIT
|
||||||
waitforlisten $nvmfpid
|
waitforlisten $nvmfpid
|
||||||
|
Loading…
Reference in New Issue
Block a user