Commit 7347f60b authored by Michal Berger's avatar Michal Berger Committed by Tomasz Zawadzki
Browse files

autotest: Use rpc_cmd() for rpc plugin-based tests



Also, create a common dir which will hold symlinks to all existing
plugins used in the tests. Location of the actual lib is not changed
so the relation to the given test suite is clearly preserved.

Signed-off-by: default avatarMichal Berger <michalx.berger@intel.com>
Change-Id: Icb70bbc61fbfa3325a357d5dd93f554ff132a3b9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7146


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent 5ddb210e
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -244,7 +244,9 @@ done

# start rpc.py coprocess if it's not started yet
if [[ -z $RPC_PIPE_PID ]] || ! kill -0 "$RPC_PIPE_PID" &> /dev/null; then
	coproc RPC_PIPE { "$rootdir/scripts/rpc.py" --server; }
	# Include list to all known plugins we use in the tests
	PYTHONPATH+=":$rootdir/test/rpc_plugins"
	coproc RPC_PIPE { PYTHONPATH="$PYTHONPATH" "$rootdir/scripts/rpc.py" --server; }
	exec {RPC_PIPE_OUTPUT}<&${RPC_PIPE[0]} {RPC_PIPE_INPUT}>&${RPC_PIPE[1]}
	# all descriptors will automatically close together with this bash
	# process, this will make rpc.py stop reading and exit gracefully
+1 −2
Original line number Diff line number Diff line
@@ -22,8 +22,7 @@ function scheduler_create_thread() {
	$rpc --plugin scheduler_plugin scheduler_thread_delete $thread_id
}

export PYTHONPATH=$testdir
rpc="$rootdir/scripts/rpc.py"
rpc=rpc_cmd

$testdir/scheduler -m 0xF -p 0x2 --wait-for-rpc &
scheduler_pid=$!
+1 −1
Original line number Diff line number Diff line
@@ -45,7 +45,7 @@ waitforlisten $spdk_pid
export PYTHONPATH=$testdir

# basic integrity test
rpc="$rootdir/scripts/rpc.py"
rpc=rpc_cmd
run_test "rpc_integrity" rpc_integrity
run_test "rpc_plugins" rpc_plugins
# same integrity test, but with rpc_cmd() instead
+1 −0
Original line number Diff line number Diff line
../rpc/rpc_plugin.py
 No newline at end of file
+1 −0
Original line number Diff line number Diff line
../event/scheduler/scheduler_plugin.py
 No newline at end of file
Loading