1. SIGSTOP and SIGKILL should not be used as test. In g_some_signals,
SIGKILL is used.
2. The SIGSTOP and SIGKILL flags of current task are set so we need to
delete them.
problem: ostest may fail at procmask test, because signals:sigkill/sigstop should not be added in signal mask
solution: skip checking whether sigkill/sigstop are in signal mask
Signed-off-by: guanyi <guanyi@xiaomi.com>
in project nuttx "remove PTHREAD_CLEANUP, and use PTHREAD_CLEANUP_STACKSIZE to enable or disable interfaces pthread_cleanup_push() and pthread_cleanup_pop()", project apps also needes adjust code.
Signed-off-by: yanghuatao <yanghuatao@xiaomi.com>
If the same signal is quickly repeated multiple times, the signal may be ignored.
In SMP since we cannot control thread scheduling to ensure timely signal processing,
it is best to use semaphores to wait for signal processing to complete, which can also shorten the ostest time
Signed-off-by: hujun5 <hujun5@xiaomi.com>
ostest contains some logic that depends on internal implementation of signal sets and ostest must be updated to match those changes.
There is no particular impact from this PR. This PR is the result of impact from nuttx 8885.
Tested with nuttx 8885
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>
Summary:
- This commit shows errno in message queue test
Impact:
- None
Testing:
- Tested with esp32-devkitc:smp on QEMU-7.1
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
Summary:
- This commit fixes the task_restart test for the 2nd time execution
Impact:
- None
Testing:
- sim:ostest
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
Summary:
- This commit adds ASSERT in case of errors to stop the
execution of ostest
- Also, add some 'ERROR' messages
Impact:
- None
Testing:
- Run ostest with several configs
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>