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

   depends-on: apache/nuttx#22511
   
   ## Summary
   
   The nuttx PR above keeps a reported level-triggered file watched, so that a 
file that `epoll_wait()` reported still wakes `poll()` of the epoll set and an 
epoll set that holds the set. This PR adds the test cases for it.
   
   This PR adds the program `cmocka_epoll_nest` to `testing/fs/epoll` (the same 
option, `CONFIG_TESTING_EPOLL`). Each case has a pipe in an inner epoll set and 
the inner set in an outer set:
   
   - epoll_nest_pending, epoll_nest_later: one round of a library that gives 
its set to the event loop of its user (`epoll_wait()` with timeout 0 on its 
set, then read), then a byte that is already there or that comes 200 ms later 
must wake the outer set.
   - epoll_poll_pending: the same with `poll()` of the inner set.
   - epoll_nest_stream: 20 bytes 20 ms apart through the nested set, no wait of 
1 s may time out.
   - epoll_poll_set, epoll_poll_wakes, epoll_nest_level, epoll_nest_three, 
epoll_nest_timer: `poll()` and epoll on an epoll descriptor (ready, still ready 
after a report, drained, a late byte, a set in a set in a set, a timerfd in the 
inner set).
   
   The cases are in a new program, so the cases of `cmocka_epoll` do not change.
   
   ## Impact
   
   Test only. Make and CMake.
   
   ## Testing
   
   Host: macOS arm64 (Arm GNU 13.2.Rel1, QEMU 11.1 TCG). NuttX master 
0c45a2fc48b, nuttx-apps master c621be657. Configs: qemu-armv8a:nsh (flat) and 
qemu-armv8a:knsh (kernel, the program runs from /system/bin) with cmocka, 
timerfd, local sockets and `CONFIG_TESTING_EPOLL`. Builds with `-Werror`.
   
   - NuttX master: 4 passed, 5 failed (epoll_nest_pending, epoll_nest_later, 
epoll_poll_pending, epoll_nest_stream, epoll_poll_set), flat and kernel.
   - NuttX master + the nuttx PR above: 9 passed, flat and kernel.
   
   Builds with `-Werror` in the CI image (with the options above): 
rv-virt:nsh64 (Make and CMake) on the nuttx PR, qemu-armv8a:nsh on master. 0 
warnings (rv-virt has the RWX segment linker warning of master).
   
   `tools/checkpatch.sh -c -u -m -g`: pass.
   


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