Commit 79fce488 authored by Tomasz Zawadzki's avatar Tomasz Zawadzki
Browse files

test/scheduler: test scheduling period with dynamic scheduler



Static scheduler sets the scheduling period to 0 when it is
initialized, as no scheduling will take place.

Instead use dynamic scheduler to test scheduling period.
Changed the test order since it is not possible to change
back to static.

Fixes #3454

Signed-off-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ic6098c42861255617471fdc4948d183c56944895
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/24301
parent 673f3731
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -47,13 +47,13 @@ function scheduler_opts() {
	trap 'killprocess $spdk_pid; exit 1' SIGINT SIGTERM EXIT
	waitforlisten $spdk_pid

	# It is possible to change settings generic scheduler opts for schedulers in event framework
	$rpc framework_set_scheduler static -p 424242
	[[ "$($rpc framework_get_scheduler | jq -r '. | select(.scheduler_name == "static") | .scheduler_period')" -eq 424242 ]]

	# It should not be possible to change settings that a scheduler does not support
	NOT $rpc framework_set_scheduler static --core-limit 42

	# It is possible to change settings generic scheduler opts for schedulers in event framework
	$rpc framework_set_scheduler dynamic -p 424242
	[[ "$($rpc framework_get_scheduler | jq -r '. | select(.scheduler_name == "dynamic") | .scheduler_period')" -eq 424242 ]]

	# Verify that the scheduler is changed and the non-default value is set
	$rpc framework_set_scheduler dynamic --core-limit 42
	[[ "$($rpc framework_get_scheduler | jq -r '. | select(.scheduler_name == "dynamic") | .core_limit')" -eq 42 ]]