ut/event: fix cpumask resetting for scheduler tests

Intention was for the threads to contain a single
core in the cpu mask.
This patch fixes it.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I8276cc906be53a7f8195d61c63bfa54bd2647b75
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8068
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
Tomasz Zawadzki 2021-05-26 10:30:52 -04:00 committed by Jim Harris
parent 62491a6716
commit 537b01bf17

View File

@ -543,6 +543,7 @@ test_scheduler(void)
/* Create threads. */
for (i = 0; i < 3; i++) {
spdk_cpuset_zero(&cpuset);
spdk_cpuset_set_cpu(&cpuset, i, true);
thread[i] = spdk_thread_create(NULL, &cpuset);
CU_ASSERT(thread[i] != NULL);
@ -789,6 +790,7 @@ test_governor(void)
/* Create threads. */
for (i = 0; i < 2; i++) {
spdk_cpuset_zero(&cpuset);
spdk_cpuset_set_cpu(&cpuset, i, true);
thread[i] = spdk_thread_create(NULL, &cpuset);
CU_ASSERT(thread[i] != NULL);