CV-Bowen opened a new pull request, #4075:
URL: https://github.com/apache/nuttx-apps/pull/4075

   ## Summary
   
   Add a cmocka test suite for the lock-free ring queue in
   `include/nuttx/ring.h` (apache/nuttx#21945), covering all four modes
   (SPSC/MPSC/SPMC/MPMC):
   
   - basic and batch enqueue/dequeue, full and empty boundaries, partial
     batches, index wrap-around, non-power-of-two capacities
   - `ring_alloc()`, overwrite (discard count), skip
   - init and warm-restart recovery: rewind, corrupted or resized blob,
     interrupted multi-producer commit, SPSC slave init (`-EAGAIN`/`-EINVAL`),
     concurrent init where exactly one caller runs the init body
   - pthread producer/consumer stress
   
   Enable `CONFIG_TESTING_RING` (needs `CONFIG_TESTING_CMOCKA`) and run
   `ring_test` from nsh.
   
   Depends on apache/nuttx#21945.
   
   ## Impact
   
   New test application only, off by default.
   
   ## Testing
   
   Host: Ubuntu 22.04.5 LTS x86_64; sim: gcc 13.1.0; qemu-armv8a: 
aarch64-none-elf-gcc 12.2.1, QEMU 10.2.1
   
   Same runs as apache/nuttx#21945, with the nuttx PR applied:
   
   | configure | result |
   |---|---|
   | `sim:nsh` | 80/80 PASS, 0 warnings |
   | `qemu-armv8a:nsh_smp` (`CONFIG_SMP_NCPUS=2`) | 80/80 PASS, 0 warnings |
   
   <details><summary>sim:nsh</summary>
   
   ```
   [==========] g_spsc_local_tests: 36 test(s) run.
   [  PASSED  ] 36 test(s).
   [==========] g_mpsc_local_tests: 11 test(s) run.
   [  PASSED  ] 11 test(s).
   [==========] g_spmc_local_tests: 11 test(s) run.
   [  PASSED  ] 11 test(s).
   [==========] g_mpmc_local_tests: 22 test(s) run.
   [  PASSED  ] 22 test(s).
   ```
   
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to