Repository navigation
Conversation
|
Thanks, this test does reproduce the inversion fixed by apache/nuttx#22164:
The guards look right. The code is under Comments:
The rest looks good: the final |
e3077e8 to
40066f8
Compare
|
Thanks for the update. I compared it with the previous version (e3077e8..40066f8):
The code changes look good. LGTM once the commit message is fixed and the kernel PR is merged first. |
Add a work queue test: 2 * CONFIG_SMP_NCPUS threads (2 threads without SMP) queue delayed and immediate work and cancel the delayed work in a loop. Half of the threads do it in the critical section. The threads are not pinned to a CPU. The work queue enters the critical section to start its timer and to wake a worker, so this checks that the two orders do not stop the CPUs on SMP. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com>
40066f8 to
9dfa701
Compare
|
Done. |
depends-on: apache/nuttx/pull/22164
Summary
A new case of the ostest work queue test, for apache/nuttx#22164: 2 *
CONFIG_SMP_NCPUSthreads (2 threads without SMP) queue delayed and immediate work on a custom queue and cancel the delayed work, 2000 times each. The threads are not pinned to a CPU. Half of the threads do it in the critical section.The work queue starts and stops its timer and wakes its workers with the queue locked, and these calls enter the critical section. On SMP NuttX master, a thread in the critical section waits for the queue lock while another CPU holds the queue lock and waits for the critical section, and the test stops.
Impact
Only
testing/ostest/wqueue.c, in the flat build (the other builds have noenter_critical_section()in user space). No new Kconfig option. Without SMP the case runs with two threads.Testing
qemu-armv8a:nsh under HVF with 4 CPUs: on NuttX master, ostest stops in
wqueue_test: critical section; with apache/nuttx#22164, ostest ends with status 0. Built for qemu-armv7a:smp and qemu-armv7a:nsh.tools/checkpatch.sh -c -u -m -gpasses.