/* Check that k_thread_suspend() cancels a preexisting thread timeout. 
Suspended threads should not wake up unexpectedly if they happened to have been sleeping when suspended.  */
ZTEST(threads_lifecycle, test_threads_suspend_timeout)
/* Check that k_thread_suspend() cancels a preexisting thread timeout. 
Suspended threads should not wake up unexpectedly if they happened to have been sleeping when suspended.  */
ZTEST(threads_lifecycle, test_threads_suspend_timeout)
{
	after_suspend = false;
	k_tid_t tid = k_thread_create(&tdata, tstack, STACK_SIZE,
				      sleep_suspended, NULL, NULL, NULL,
				      0, K_USER, K_NO_WAIT);
	k_msleep(50);
	k_thread_suspend(tid);
	k_msleep(200);
	zassert_false(after_suspend, "thread woke up unexpectedly");
	k_thread_abort(tid);
}