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. |
40066f8 to
9dfa701
Compare
|
Done. |
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. The case needs CONFIG_HRTIMER: the work queue fix of apache/nuttx#22473 is for the hrtimer work queue only. Without CONFIG_HRTIMER the case is not built. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com>
194b3b3
9dfa701 to
194b3b3
Compare
depends-on: apache/nuttx#22473
Summary
A new case of the ostest work queue test, for apache/nuttx#22473: 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) and only withCONFIG_HRTIMER: the fix of apache/nuttx#22473 is for the hrtimer work queue. WithoutCONFIG_HRTIMERthe case is not built. 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#22473, ostest ends with status 0. Built for qemu-armv7a:smp and qemu-armv7a:nsh. Built with-Werrorfor qemu-armv8a:nsh_smp with ostest: withCONFIG_HRTIMER=nthe case is not built; withCONFIG_HRTIMER=yon the apache/nuttx#22473 branch it builds.tools/checkpatch.sh -c -u -m -gpasses.