412505d286
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> |
||
---|---|---|
.. | ||
aio.c | ||
barrier.c | ||
cancel.c | ||
cond.c | ||
dev_null.c | ||
fpu.c | ||
getopt.c | ||
Kconfig | ||
Make.defs | ||
Makefile | ||
mqueue.c | ||
mutex.c | ||
nsem.c | ||
ostest_main.c | ||
ostest.h | ||
posixtimer.c | ||
prioinherit.c | ||
pthread_cleanup.c | ||
pthread_rwlock_cancel.c | ||
pthread_rwlock.c | ||
restart.c | ||
rmutex.c | ||
robust.c | ||
roundrobin.c | ||
sem.c | ||
semtimed.c | ||
setjmp.c | ||
setvbuf.c | ||
sigev_thread.c | ||
sighand.c | ||
signest.c | ||
sigprocmask.c | ||
specific.c | ||
sporadic2.c | ||
sporadic.c | ||
suspend.c | ||
timedmqueue.c | ||
timedmutex.c | ||
timedwait.c | ||
tls.c | ||
vfork.c | ||
waitpid.c | ||
wqueue.c |