casaroli opened a new pull request, #4207:
URL: https://github.com/apache/nuttx-apps/pull/4207

   depends-on: apache/nuttx/pull/22581
   
   ## Summary
   
   New case `test_nuttx_pthread_test22` in `cmocka_pthread_test`: it 
initializes a spin lock with `PTHREAD_PROCESS_PRIVATE`, with 
`PTHREAD_PROCESS_SHARED` and with 0, then locks it, tries it (`EBUSY`), unlocks 
it and destroys it. 0 is the value of `PTHREAD_PROCESS_PRIVATE` in glibc, and 
programs written for Linux often give it. apache/nuttx#22581 makes 
`pthread_spin_init()` accept it.
   
   ## Impact
   
   Test only. The case needs `CONFIG_PTHREAD_SPINLOCKS` (sim:citest and 
rv-virt:citest set it, with `CONFIG_CM_PTHREAD_TEST`); without it the case is 
skipped.
   
   ## Testing
   
   qemu-armv8a:nsh (flat, CI image gcc 12.3, QEMU TCG) and 
qemu-intel64:knsh_romfs (kernel, KVM): on nuttx master the new case fails (`22 
!= 0`); with apache/nuttx#22581, `cmocka_pthread_test` passes (9 passed). 
Builds with `-Werror`: rv-virt:citest, qemu-armv8a:nsh with 
`cmocka_pthread_test` with and without `CONFIG_PTHREAD_SPINLOCKS`. CMake: 
Makefile and CMakeLists.txt take `cases/*.c` by wildcard, so no build file 
changes.
   


-- 
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