aboutsummaryrefslogtreecommitdiff
path: root/test/validation/api/scheduler
diff options
context:
space:
mode:
authorMatias Elo <matias.elo@nokia.com>2020-04-03 10:43:47 +0300
committerMatias Elo <matias.elo@nokia.com>2020-04-06 15:41:57 +0300
commitadbd88e59121b3ed14ffb668a83e2be509e80cec (patch)
tree3a23ae21494e1f65a58c4bc561b389aa61c904fd /test/validation/api/scheduler
parent6bd9064bc88826c7377c3d384c14edb7d539eab4 (diff)
validation: scheduler: test odp_schedule_group_create() with non-zero mask
Previously odp_schedule_group_create() was only tested with empty thread masks. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Suggested-by: Carl Wallen <carl.wallen@nokia.com>
Diffstat (limited to 'test/validation/api/scheduler')
-rw-r--r--test/validation/api/scheduler/scheduler.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/test/validation/api/scheduler/scheduler.c b/test/validation/api/scheduler/scheduler.c
index 90d30ff5b..feb23d57b 100644
--- a/test/validation/api/scheduler/scheduler.c
+++ b/test/validation/api/scheduler/scheduler.c
@@ -685,7 +685,7 @@ static void scheduler_test_groups(void)
CU_ASSERT(lookup == ODP_SCHED_GROUP_INVALID);
/* Now create it and verify we can find it */
- mygrp2 = odp_schedule_group_create("Test Group 2", &zeromask);
+ mygrp2 = odp_schedule_group_create("Test Group 2", &mymask);
CU_ASSERT_FATAL(mygrp2 != ODP_SCHED_GROUP_INVALID);
lookup = odp_schedule_group_lookup("Test Group 2");
@@ -694,15 +694,7 @@ static void scheduler_test_groups(void)
/* Destroy group with no name */
CU_ASSERT_FATAL(odp_schedule_group_destroy(null_grp) == 0);
- /* Verify we're not part of it */
- rc = odp_schedule_group_thrmask(mygrp2, &testmask);
- CU_ASSERT(rc == 0);
- CU_ASSERT(!odp_thrmask_isset(&testmask, thr_id));
-
- /* Now join the group and verify we're part of it */
- rc = odp_schedule_group_join(mygrp2, &mymask);
- CU_ASSERT(rc == 0);
-
+ /* Verify we're part of group 2 */
rc = odp_schedule_group_thrmask(mygrp2, &testmask);
CU_ASSERT(rc == 0);
CU_ASSERT(odp_thrmask_isset(&testmask, thr_id));
@@ -711,6 +703,11 @@ static void scheduler_test_groups(void)
rc = odp_schedule_group_leave(mygrp2, &mymask);
CU_ASSERT(rc == 0);
+ /* Verify we're not part of group 2 anymore */
+ rc = odp_schedule_group_thrmask(mygrp2, &testmask);
+ CU_ASSERT(rc == 0);
+ CU_ASSERT(!odp_thrmask_isset(&testmask, thr_id));
+
/* Now verify scheduler adherence to groups */
odp_pool_param_init(&params);
params.buf.size = 100;