Commit 0ecb36c7 authored by Shuhei Matsumoto's avatar Shuhei Matsumoto Committed by Tomasz Zawadzki
Browse files

test/nvmf: Use $USER instead of logname to follow other cases



$USER gives the login name who logged in the terminal and
logname prints the login name who logged in the session.

test/nvmf/common.sh has used $USER to start the SPDK application,
as non-root but test/nvmf/host/perf.sh and
test/nvmf/target/nvmf_example.sh have used logname to start the
example application as non-root.

It looks OK to use $USER to start application as non-root like other
cases.

Signed-off-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ia0a17e3bd37a76e4d808e5816ba6716920f8f340
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4090


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
parent 5cf0c370
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@ $rpc_py nvmf_subsystem_add_listener nqn.2016-06.io.spdk:cnode1 -t $TEST_TRANSPOR
# Test multi-process access to local NVMe device
if [ -n "$local_nvme_trid" ]; then
	if [ $SPDK_RUN_NON_ROOT -eq 1 ]; then
		perf_app="sudo -u $(logname) $SPDK_EXAMPLE_DIR/perf"
		perf_app="sudo -u $USER $SPDK_EXAMPLE_DIR/perf"
	else
		perf_app="$SPDK_EXAMPLE_DIR/perf"
	fi
+1 −1
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@ MALLOC_BLOCK_SIZE=512

function build_nvmf_example_args() {
	if [ $SPDK_RUN_NON_ROOT -eq 1 ]; then
		echo "sudo -u $(logname) $SPDK_EXAMPLE_DIR/nvmf -i $NVMF_APP_SHM_ID" -g 10000
		echo "sudo -u $USER $SPDK_EXAMPLE_DIR/nvmf -i $NVMF_APP_SHM_ID" -g 10000
	else
		echo "$SPDK_EXAMPLE_DIR/nvmf -i $NVMF_APP_SHM_ID" -g 10000
	fi