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

   depends-on: apache/nuttx/pull/22615
   
   ## Summary
   
   Add `testing/fs/inotifytest`, a small test of inotify `read()`:
   
   - `event`: `read()` gives an `IN_CREATE` event with the name of a new file;
   - `nonblock`: `read()` of a descriptor with `IN_NONBLOCK` and no event fails 
with `EAGAIN`;
   - `signal`: a signal with a handler (no `SA_RESTART`) ends a `read()` that 
waits for an event; `read()` fails with `EINTR`, as on Linux. The signal is 
sent every 200 ms, so that one that comes before the reader waits does not 
count. If `read()` does not end in 2 s, the test makes a file so that `read()` 
ends, and the check fails; so the test always ends.
   
   The files are made in a new tmpfs (`/inotifytest`), or in the directory 
given as the argument. The program prints one line per check and returns 1 if a 
check fails.
   
   The `signal` check needs apache/nuttx#22615 (the `depends-on` line).
   
   ## Impact
   
   A new test program, default n. Its Kconfig option depends on `FS_NOTIFY`, 
`ENABLE_ALL_SIGNALS` and not `DISABLE_PTHREAD`. No other app changes.
   
   ## Testing
   
   Run on Fedora in the NuttX CI image (gcc, `-Wno-cpp -Werror`), QEMU on the 
host, with apache/nuttx#22615:
   
   | Configuration | nuttx master | nuttx + #22615 |
   |---|---|---|
   | qemu-intel64:nsh (flat, x86_64, CMake) | `signal` FAIL, `event` and 
`nonblock` PASS | 3 PASS |
   | qemu-intel64:knsh_romfs (kernel, x86_64, CMake) | `signal` FAIL | 3 PASS |
   | qemu-armv8a:nsh_smp (flat SMP, arm64, Make) | `signal` FAIL | 3 PASS |
   | rv-virt:knsh64 (kernel, riscv64, Make + import) | `signal` FAIL | 3 PASS |
   | rv-virt:pnsh64 (protected), qemu-armv8a:knsh (kernel) | - | builds |
   
   `tools/checkpatch.sh -c -u -m -g` passes.
   


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