diff --git a/tests/xtimer_msg/main.c b/tests/xtimer_msg/main.c index 49f0b73348..4ad7262f35 100644 --- a/tests/xtimer_msg/main.c +++ b/tests/xtimer_msg/main.c @@ -28,6 +28,8 @@ #include "thread.h" #include "msg.h" +#include "test_utils/expect.h" + char timer_stack[THREAD_STACKSIZE_DEFAULT]; char timer_stack_local[THREAD_STACKSIZE_DEFAULT]; @@ -103,6 +105,8 @@ int main(void) NULL, "timer"); + expect(pid_is_valid(pid)); + puts("sending 1st msg"); m.content.ptr = &msg_a; msg_try_send(&m, pid); @@ -120,6 +124,8 @@ int main(void) NULL, "timer local"); + expect(pid_is_valid(pid2)); + while (1) { xtimer_sleep(1); msg_try_send(&m, pid2); diff --git a/tests/ztimer_msg/main.c b/tests/ztimer_msg/main.c index 39d490521f..f4bbf1fce8 100644 --- a/tests/ztimer_msg/main.c +++ b/tests/ztimer_msg/main.c @@ -29,6 +29,8 @@ #include "msg.h" #include "timex.h" +#include "test_utils/expect.h" + #ifdef MODULE_ZTIMER_MSEC #define ZTIMER ZTIMER_MSEC #define TICKS_PER_SEC MS_PER_SEC @@ -112,6 +114,8 @@ int main(void) NULL, "timer"); + expect(pid_is_valid(pid)); + puts("sending 1st msg"); m.content.ptr = &msg_a; msg_try_send(&m, pid); @@ -129,6 +133,8 @@ int main(void) NULL, "timer local"); + expect(pid_is_valid(pid2)); + while (1) { ztimer_sleep(ZTIMER, 1 * TICKS_PER_SEC); msg_try_send(&m, pid2);