tests/sema: add test for sema_wait_timed_ztimer()
This commit is contained in:
parent
b339e91e18
commit
4cd9e96066
@ -1,5 +1,7 @@
|
|||||||
include ../Makefile.tests_common
|
include ../Makefile.tests_common
|
||||||
|
|
||||||
USEMODULE += sema
|
USEMODULE += sema
|
||||||
|
USEMODULE += xtimer
|
||||||
|
USEMODULE += ztimer_usec
|
||||||
|
|
||||||
include $(RIOTBASE)/Makefile.include
|
include $(RIOTBASE)/Makefile.include
|
||||||
|
|||||||
@ -25,7 +25,6 @@
|
|||||||
#include "msg.h"
|
#include "msg.h"
|
||||||
#include "sema.h"
|
#include "sema.h"
|
||||||
#include "thread.h"
|
#include "thread.h"
|
||||||
#include "xtimer.h"
|
|
||||||
|
|
||||||
#define TEST_TIME_US 1000
|
#define TEST_TIME_US 1000
|
||||||
#define TEST_ITERATIONS 4
|
#define TEST_ITERATIONS 4
|
||||||
@ -79,6 +78,11 @@ int main(void)
|
|||||||
printf("MAIN ERROR: sema_wait_timed()");
|
printf("MAIN ERROR: sema_wait_timed()");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
if (sema_wait_timed_ztimer(&test_sema, ZTIMER_USEC, TEST_TIME_US)
|
||||||
|
!= -ETIMEDOUT) {
|
||||||
|
printf("MAIN_ERROR: sema_wait_timed_ztimer()");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
thread_create(stack,
|
thread_create(stack,
|
||||||
sizeof(stack),
|
sizeof(stack),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user