We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 91970ad commit d02ef74Copy full SHA for d02ef74
tests/drivers/virtualization/ivshmem/src/ivshmem.c
@@ -48,9 +48,26 @@ void test_ivshmem_plain(void)
48
"registering handlers should not be supported");
49
}
50
51
+#ifdef CONFIG_USERSPACE
52
+void test_is_usermode(void)
53
+{
54
+ zassert_true(k_is_user_context(), "thread left in kernel mode");
55
+}
56
+
57
+void test_quit_kernel(void)
58
59
+ k_thread_user_mode_enter((k_thread_entry_t)test_is_usermode,
60
+ NULL, NULL, NULL);
61
62
+#else
63
64
+{ }
65
+#endif /* CONFIG_USERSPACE */
66
67
void test_main(void)
68
{
69
ztest_test_suite(test_ivshmem,
70
+ ztest_unit_test(test_quit_kernel),
71
ztest_unit_test(test_ivshmem_plain));
72
ztest_run_test_suite(test_ivshmem);
73
0 commit comments