tests: ztest: ztress: Test tweaks and disabling SMP
Disable SMP in the test. Minor tweaks in the test. Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
This commit is contained in:
parent
4d9507ae33
commit
af335f85d9
3 changed files with 5 additions and 3 deletions
|
@ -1,2 +1,3 @@
|
|||
CONFIG_ZTEST=y
|
||||
CONFIG_ZTRESS=y
|
||||
CONFIG_TEST_EXTRA_STACKSIZE=2048
|
||||
|
|
|
@ -53,6 +53,8 @@ static void test_timeout(void)
|
|||
err = ztress_execute(&timer_data, thread_data, ARRAY_SIZE(thread_data));
|
||||
d = k_uptime_get() - d;
|
||||
zassert_within(d, 1000, 200, NULL);
|
||||
|
||||
ztress_set_timeout(K_NO_WAIT);
|
||||
}
|
||||
|
||||
static void timeout_abort(struct k_timer *timer)
|
||||
|
@ -68,7 +70,6 @@ static void test_abort(void)
|
|||
k_timer_init(&timer, timeout_abort, NULL);
|
||||
k_timer_start(&timer, K_MSEC(100), K_NO_WAIT);
|
||||
|
||||
ztress_set_timeout(K_NO_WAIT);
|
||||
ZTRESS_EXECUTE(ZTRESS_THREAD(ztress_handler_busy, NULL, repeat, 0, K_MSEC(1)),
|
||||
ZTRESS_THREAD(ztress_handler_busy, NULL, repeat, 0, K_MSEC(1)));
|
||||
|
||||
|
@ -114,7 +115,7 @@ static void test_no_context_requirements(void)
|
|||
|
||||
uint32_t exec_cnt = ztress_exec_count(1);
|
||||
|
||||
zassert_true(exec_cnt >= repeat && exec_cnt < repeat + 10, NULL);
|
||||
zassert_true(exec_cnt >= repeat && exec_cnt < repeat + 10, "exec_cnt: %u", exec_cnt);
|
||||
|
||||
/* Set of two threads. Second thread and timer context has no ending
|
||||
* condition (exec_cnt and preempt_cnt are 0).
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
common:
|
||||
tags: test_framework
|
||||
filter: CONFIG_QEMU_TARGET
|
||||
filter: CONFIG_QEMU_TARGET and not CONFIG_SMP
|
||||
tests:
|
||||
testing.ztest.ztress:
|
||||
integration_platforms:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue