Skip to content

Commit 0b0294d

Browse files
Andrew Boieandrewboie
authored andcommitted
kernel: cover k_usleep() from user mode
No test was exercising the k_usleep() system call, run the test case as a user thread to fix code coverage. Signed-off-by: Andrew Boie <[email protected]>
1 parent ca3549d commit 0b0294d

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

tests/kernel/sleep/prj.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ CONFIG_IRQ_OFFLOAD=y
22
CONFIG_ZTEST=y
33
CONFIG_QEMU_TICKLESS_WORKAROUND=y
44
CONFIG_SMP=n
5+
CONFIG_TEST_USERSPACE=y

tests/kernel/sleep/src/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,6 @@ void test_main(void)
240240
{
241241
ztest_test_suite(sleep,
242242
ztest_unit_test(test_sleep),
243-
ztest_unit_test(test_usleep));
243+
ztest_user_unit_test(test_usleep));
244244
ztest_run_test_suite(sleep);
245245
}

0 commit comments

Comments
 (0)