Commit 78cbcfdd authored by Tomasz Zawadzki's avatar Tomasz Zawadzki
Browse files

test/scheduler: fix cpu mask for rpc governor tests



1) When ran through isolate_cores.sh, only specific cores are possible
to use due to cgroup settings. "0x$spdk_main_core" was incorrectly
assigning "0x1" which is core 0. Rather than core 1 as intended.

2) After recent changes gscheduler requires that all SMT cores
are included in CPU mask, so this test wouldn't pass with just one.
Simply use the same spdk_cpumask as in other tests and modify
the remainder of the test to match that.

Signed-off-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ieda3e48cb3871a22f45062089daf7aed7b670d1a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/24303


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent ba69d467
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -13,8 +13,7 @@ source "$testdir/common.sh"
rpc=rpc_cmd

function framework_get_governor() {
	# Start specifically on single core, which later is checked via RPC
	"${SPDK_APP[@]}" -m "0x$spdk_main_core" &
	"${SPDK_APP[@]}" -m "$spdk_cpumask" &
	spdk_pid=$!
	trap 'killprocess $spdk_pid; exit 1' SIGINT SIGTERM EXIT
	waitforlisten $spdk_pid
@@ -28,9 +27,8 @@ function framework_get_governor() {
	[[ "$($rpc framework_get_scheduler | jq -r '.scheduler_name')" == "gscheduler" ]]
	[[ "$($rpc framework_get_governor | jq -r '.governor_name')" == "dpdk_governor" ]]

	# Check that there is only one core managed by governor, matches the mask and
	# detects frequency
	[[ "$($rpc framework_get_governor | jq -r '.cores | length')" -eq 1 ]]
	# Check that core length matches the cpumask and first one is the main core
	[[ "$($rpc framework_get_governor | jq -r '.cores | length')" -eq "$spdk_cpus_no" ]]
	[[ "$($rpc framework_get_governor | jq -r '.cores[0].lcore_id')" -eq "$spdk_main_core" ]]
	[[ -n "$($rpc framework_get_governor | jq -r '.cores[0].current_frequency')" ]]