cederom commented on PR #4169:
URL: https://github.com/apache/nuttx-apps/pull/4169#issuecomment-7247825400

   - **epoll04**: with #22431, `EPOLL_CTL_DEL`/`EPOLL_CTL_MOD` fall through all 
three lists (`setup`, `teardown`, `oneshot`) and return `-ENOENT`. That matches 
what the test expects, including the add → del → del sequence.
   - **epoll05**: `pipecommon_poll()` already sets `POLLOUT | POLLERR` for the 
write end when there are no readers (policy 0). The fix in #22431 is that 
`poll_notify()` now clears `POLLOUT` only on `POLLHUP`, not on `POLLERR`. This 
matches the `8 != 12` failure on master in the description. 
`EPOLLOUT`/`EPOLLERR` alias `POLLOUT`/`POLLERR`, so the epoll check is the same 
check.
   - The `CONFIG_PIPES` guard is right, since `TESTING_EPOLL` doesn't depend on 
`PIPES`. `TIMER_FD` is already a Kconfig dependency for epoll04.
   
   Optional nits, none blocking:
   
   1. The epoll05 commit message says `write()` "fails with EPIPE", but the 
test doesn't check it. Consider adding a `write()` and asserting `-1`/`EPIPE` 
(with `SIGPIPE` ignored, in case it's delivered). Then the test checks the 
behaviour that the `POLLOUT|POLLERR` result stands for.
   2. After `epoll_wait()`, also assert `ev.data.fd == fd[1]`.
   3. A baseline check before `close(fd[0])` would make the test sharper: 
`poll()` on the write end gives `POLLOUT` alone, so the test shows that 
`POLLERR` comes from the closed reader.
   4. `show_usage()` lists test case 5 unconditionally. It could note 
"(CONFIG_PIPES)".
   5. If an assert fails, epoll04/05 leak `efd`/`fd`, because the cmocka assert 
jumps out of the test function. epoll01–03 avoid that with setup/teardown. This 
is minor for a test app, but it would be consistent.


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