nuttx-apps/testing/ostest
Zhe Weng 412505d286 ostest: Introduce basic work queue test
The test consists of two parts:
- A tester that tries to trigger wrong states of work queue
- A verifier that checks whether the wqueue is still working properly

The tester is trying to queue and cancel work several times with
priority lower/same/higher than the work queue.

Most wrong cases are likely to happen with high priority like:
- If `cancel` never decreases semcount, the count may keep growing
  and finally overflow
- If `cancel` is decreasing semcount too much, the `work_thread` may
  be waken up less times than expected

The lower/same priority testers are just added for covering other
unexpected situations.

The verifier is trying to queue some works and check they are called as
expected:
- Frist queue a 'sleep' worker, to let a work queue thread be in busy
  status and not waiting on sem, while other work queue thread(s) (if
  any) still waiting for sem. If sem is in wrong state, it may cause
  wrong behavior in either thread waiting/not waiting on the sem.
- Then queue a few count works, if the work queue(s) are still working
  properly, these works should finally be all called once.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-03-22 12:56:01 +02:00
..
aio.c apps: add <assert.h> header file 2023-03-16 12:00:28 +01:00
barrier.c apps: add <assert.h> header file 2023-03-16 12:00:28 +01:00
cancel.c apps: add <assert.h> header file 2023-03-16 12:00:28 +01:00
cond.c apps: add <assert.h> header file 2023-03-16 12:00:28 +01:00
dev_null.c apps: add <assert.h> header file 2023-03-16 12:00:28 +01:00
fpu.c apps: add <assert.h> header file 2023-03-16 12:00:28 +01:00
getopt.c apps: add <assert.h> header file 2023-03-16 12:00:28 +01:00
Kconfig testing/ostest: remove CONFIG_TESTING_OSTEST_FPUSIZE 2022-04-19 02:48:24 +08:00
Make.defs Makefiles: Gregory Nutt: update licenses to Apache 2021-06-07 21:35:33 -05:00
Makefile ostest: Introduce basic work queue test 2023-03-22 12:56:01 +02:00
mqueue.c apps: add <assert.h> header file 2023-03-16 12:00:28 +01:00
mutex.c apps: add <assert.h> header file 2023-03-16 12:00:28 +01:00
nsem.c apps: add <assert.h> header file 2023-03-16 12:00:28 +01:00
ostest_main.c ostest: Introduce basic work queue test 2023-03-22 12:56:01 +02:00
ostest.h ostest: Introduce basic work queue test 2023-03-22 12:56:01 +02:00
posixtimer.c apps: add <assert.h> header file 2023-03-16 12:00:28 +01:00
prioinherit.c apps: add <assert.h> header file 2023-03-16 12:00:28 +01:00
pthread_cleanup.c apps: add <assert.h> header file 2023-03-16 12:00:28 +01:00
pthread_rwlock_cancel.c apps: add <assert.h> header file 2023-03-16 12:00:28 +01:00
pthread_rwlock.c apps: add <assert.h> header file 2023-03-16 12:00:28 +01:00
restart.c apps: add <assert.h> header file 2023-03-16 12:00:28 +01:00
rmutex.c apps: add <assert.h> header file 2023-03-16 12:00:28 +01:00
robust.c apps: add <assert.h> header file 2023-03-16 12:00:28 +01:00
roundrobin.c apps: remove unnecessary sem_setprotocol code 2023-03-17 11:58:03 -03:00
sem.c apps: add <assert.h> header file 2023-03-16 12:00:28 +01:00
semtimed.c apps: add <assert.h> header file 2023-03-16 12:00:28 +01:00
setjmp.c ostest: Introduce basic setjmp/longjmp test 2022-03-01 12:03:31 +08:00
setvbuf.c apps: add <assert.h> header file 2023-03-16 12:00:28 +01:00
sigev_thread.c apps: add <assert.h> header file 2023-03-16 12:00:28 +01:00
sighand.c apps: add <assert.h> header file 2023-03-16 12:00:28 +01:00
signest.c apps: add <assert.h> header file 2023-03-16 12:00:28 +01:00
sigprocmask.c apps: add <assert.h> header file 2023-03-16 12:00:28 +01:00
specific.c apps: add <assert.h> header file 2023-03-16 12:00:28 +01:00
sporadic2.c apps: add <assert.h> header file 2023-03-16 12:00:28 +01:00
sporadic.c apps: add <assert.h> header file 2023-03-16 12:00:28 +01:00
suspend.c apps: add <assert.h> header file 2023-03-16 12:00:28 +01:00
timedmqueue.c apps: add <assert.h> header file 2023-03-16 12:00:28 +01:00
timedmutex.c apps: add <assert.h> header file 2023-03-16 12:00:28 +01:00
timedwait.c apps: add <assert.h> header file 2023-03-16 12:00:28 +01:00
tls.c apps: add <assert.h> header file 2023-03-16 12:00:28 +01:00
vfork.c apps: add <assert.h> header file 2023-03-16 12:00:28 +01:00
waitpid.c apps: add <assert.h> header file 2023-03-16 12:00:28 +01:00
wqueue.c ostest: Introduce basic work queue test 2023-03-22 12:56:01 +02:00