From 86b3741a0ca67106bc4634054a682d31f6e6e4c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Pelikan?= Date: Thu, 27 Nov 2025 16:02:05 +0100 Subject: [PATCH] [nrf fromlist] tests: kernel: usage: Adjustments for slower platforms MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .../thread_runtime_stats/src/test_thread_runtime_stats.c | 4 ++++ tests/kernel/usage/thread_runtime_stats/testcase.yaml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/kernel/usage/thread_runtime_stats/src/test_thread_runtime_stats.c b/tests/kernel/usage/thread_runtime_stats/src/test_thread_runtime_stats.c index 699534a640ba..dc5de181dfc5 100644 --- a/tests/kernel/usage/thread_runtime_stats/src/test_thread_runtime_stats.c +++ b/tests/kernel/usage/thread_runtime_stats/src/test_thread_runtime_stats.c @@ -87,7 +87,11 @@ ZTEST(usage_api, test_all_stats_usage) k_thread_runtime_stats_all_get(&stats2); +#if defined(CONFIG_RISCV) + k_sleep(K_TICKS(3)); /* Helper runs for 3 ticks - on slower platforms */ +#else k_sleep(K_TICKS(2)); /* Helper runs for 2 ticks */ +#endif k_thread_runtime_stats_all_get(&stats3); diff --git a/tests/kernel/usage/thread_runtime_stats/testcase.yaml b/tests/kernel/usage/thread_runtime_stats/testcase.yaml index b96eb0b38160..f493d193f918 100644 --- a/tests/kernel/usage/thread_runtime_stats/testcase.yaml +++ b/tests/kernel/usage/thread_runtime_stats/testcase.yaml @@ -3,7 +3,7 @@ tests: tags: kernel # The following architectures are excluded as they have boards that # exhibit precision timing anomalies related to emulation. - # posix, riscv32, sparc + # posix, sparc # The following architectures are exluded as the necessary # thread runtime statistic hooks do not yet exist. # mips