Skip to content

Commit

Permalink
tests/common/timeout_order: reset test case thread to original prio
Browse files Browse the repository at this point in the history
That was an oversight that should not have caused any problem. However,
the test harness expects the test's thread to be higher prio than the
test suite's thread that spawns it, because the test suite reuses the
stack space for the next test, if there is one.

Change-Id: Iad951118278abf0d9c23012d78ed56b75bc2958a
Signed-off-by: Benjamin Walsh <[email protected]>
  • Loading branch information
bboccoqq authored and Anas Nashif committed Mar 1, 2017
1 parent 2c3a20b commit e307d9e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/kernel/common/src/timeout_order.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ void timeout_order_test(void)
k_thread_priority_set(k_current_get(), prio + 1);

assert_equal(k_poll(poll_events, NUM_TIMEOUTS, 2000), 0, "");

k_thread_priority_set(k_current_get(), prio - 1);

for (ii = 0; ii < NUM_TIMEOUTS; ii++) {
assert_equal(poll_events[ii].state,
K_POLL_STATE_SEM_AVAILABLE, "");
Expand Down

0 comments on commit e307d9e

Please sign in to comment.