Skip to content

Commit 86b3741

Browse files
[nrf fromlist] tests: kernel: usage: Adjustments for slower platforms
Adjusting sleep times as core is to slow too run the test with the default system clock frequency, and fixing outdated comment in the test manifest file. Upstream PR #: 100175 Signed-off-by: Paweł Pelikan <[email protected]>
1 parent 428ce9f commit 86b3741

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

tests/kernel/usage/thread_runtime_stats/src/test_thread_runtime_stats.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,11 @@ ZTEST(usage_api, test_all_stats_usage)
8787

8888
k_thread_runtime_stats_all_get(&stats2);
8989

90+
#if defined(CONFIG_RISCV)
91+
k_sleep(K_TICKS(3)); /* Helper runs for 3 ticks - on slower platforms */
92+
#else
9093
k_sleep(K_TICKS(2)); /* Helper runs for 2 ticks */
94+
#endif
9195

9296
k_thread_runtime_stats_all_get(&stats3);
9397

tests/kernel/usage/thread_runtime_stats/testcase.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ tests:
33
tags: kernel
44
# The following architectures are excluded as they have boards that
55
# exhibit precision timing anomalies related to emulation.
6-
# posix, riscv32, sparc
6+
# posix, sparc
77
# The following architectures are exluded as the necessary
88
# thread runtime statistic hooks do not yet exist.
99
# mips

0 commit comments

Comments
 (0)