/* Verify errno works well. 
Check whether a C standard errno can be stored successfully, no matter it is using tls or not.  */
ZTEST_USER(common_errno, test_errno)
/* Verify errno works well. 
Check whether a C standard errno can be stored successfully, no matter it is using tls or not.  */
ZTEST_USER(common_errno, test_errno)
{
	k_tid_t tid;
	uint32_t perm = K_INHERIT_PERMS;
	if (k_is_user_context()) {
		perm = perm | K_USER;
	}
	tid = k_thread_create(&eno_thread, eno_stack, STACK_SIZE,
				thread_entry_user, NULL, NULL, NULL,
				K_PRIO_PREEMPT(1), perm,
				K_NO_WAIT);
	k_thread_join(tid, K_FOREVER);
}