Skip to content
Permalink
Browse files

tests: schedule_api: skip test assert if COVERAGE

This test case is so timing sensitive that gathering code
coverage data screws up the results.

Since this is an abnormal execution environment anyway,
just skip the assertions if CONFIG_COVERAGE=y.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
  • Loading branch information...
andrewboie authored and nashif committed Jun 18, 2019
1 parent 03f2277 commit 6020a50092125d257bbdeb82948abc62ea69c0e0
Showing with 10 additions and 2 deletions.
  1. +10 −2 tests/kernel/sched/schedule_api/src/test_sched_timeslice_reset.c
@@ -70,8 +70,16 @@ static void thread_tslice(void *p1, void *p2, void *p3)
#endif

/** TESTPOINT: timeslice should be reset for each preemptive thread*/
zassert_true(t >= expected_slice_min, NULL);
zassert_true(t <= expected_slice_max, NULL);
#ifndef CONFIG_COVERAGE
zassert_true(t >= expected_slice_min,
"timeslice too small, expected %u got %u",
expected_slice_min, t);
zassert_true(t <= expected_slice_max,
"timeslice too big, expected %u got %u",
expected_slice_max, t);
#else
(void)t;
#endif /* CONFIG_COVERAGE */
thread_idx = (thread_idx + 1) % NUM_THREAD;

/* Keep the current thread busy for more than one slice, even though,

0 comments on commit 6020a50

Please sign in to comment.
You can’t perform that action at this time.