1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2026-01-01 01:41:18 +01:00

tests/posix_semaphore: better guarantee sequence of output lines

As suggested by @kaspar030 the THREAD_CREATE_WOUT_YIELD flag was removed.
Now the sequence of output lines is identical in two cases: stdio via UART,
and stdio via CDC ACM (which needs a thread for that).

The expects have been changed to match the new situation, which is what
was already given in the CDC ACM case.
This commit is contained in:
Kees Bakker 2020-06-14 20:03:32 +02:00
parent 52fd00dc22
commit 8369f42d5e
2 changed files with 4 additions and 5 deletions

View File

@ -78,8 +78,7 @@ static void test1(void)
kernel_pid_t pid = thread_create(test1_thread_stack,
sizeof(test1_thread_stack),
THREAD_PRIORITY_MAIN - 1,
THREAD_CREATE_STACKTEST |
THREAD_CREATE_WOUT_YIELD,
THREAD_CREATE_STACKTEST,
test1_second_thread,
NULL,
"second");

View File

@ -14,13 +14,13 @@ def _test1(term):
term.expect_exact("######################### TEST1:")
term.expect_exact("first: sem_init")
term.expect_exact("first: thread create")
term.expect_exact("second: sem_trywait")
term.expect_exact("second: sem_trywait done with == 0")
term.expect_exact("second: wait for post")
term.expect_exact("first: thread created")
term.expect_exact("first: sem_getvalue")
term.expect_exact("first: sem_getvalue != 0")
term.expect_exact("first: do yield")
term.expect_exact("second: sem_trywait")
term.expect_exact("second: sem_trywait done with == 0")
term.expect_exact("second: wait for post")
term.expect_exact("first: done yield")
term.expect_exact("first: sem_trywait")
term.expect_exact("first: sem_trywait FAILED")