mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-24 14:03:55 +01:00
Merge pull request #14271 from keestux/fix-test-xtimer_mutex_lock_timeout
tests/xtimer_mutex_lock_timeout: don't assume number of threads at start
This commit is contained in:
commit
57809d65a0
@ -29,14 +29,17 @@ def testfunc(child):
|
||||
child.expect_exact("> ")
|
||||
child.sendline("mutex_timeout_long_locked_low")
|
||||
child.expect("starting test: xtimer mutex lock timeout with thread")
|
||||
child.expect("threads = 2")
|
||||
child.expect("threads = (\d+)")
|
||||
num_threads = int(child.match.group(1))
|
||||
child.expect("THREAD low prio: start")
|
||||
child.expect("MAIN THREAD: calling xtimer_mutex_lock_timeout")
|
||||
child.expect("OK")
|
||||
child.expect("threads = 3")
|
||||
child.expect("threads = (\d+)")
|
||||
assert int(child.match.group(1)) == num_threads + 1
|
||||
child.expect("MAIN THREAD: waiting for created thread to end")
|
||||
child.expect("THREAD low prio: exiting low")
|
||||
child.expect("threads = 2")
|
||||
child.expect("threads = (\d+)")
|
||||
assert int(child.match.group(1)) == num_threads
|
||||
child.expect_exact("> ")
|
||||
child.sendline("mutex_timeout_short_locked")
|
||||
child.expect("starting test: xtimer mutex lock timeout with short timeout and locked mutex")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user