zephyr/tests/posix/eventfd
Christopher Friedt 386f6c7006 tests: posix: eventfd: add stress test
This test simply counts how many times `eventfd_read()`
and `eventfd_write()` can be called on an
`eventfd(0, EFD_SEMAPHORE | EFD_NONBLOCK)` file
descriptor.

Prior to the recent changes in `eventfd`, we were seeing
approximately < 1000 writes / s. However, the previous
`eventfd` implementation would fail this test with the
result that the number of successful reads was far greater
than the number of successful writes.

This should be impossible, and with the recent `eventfd`
changes that was fixed. Additionally, we are seeing an
increase in over 40x for non-blocking eventfd reads and
writes.

```
START - test_stress
I: BOARD: qemu_riscv64_smp
I: TEST_DURATION_S: 5
I: UPDATE_INTERVAL_S: 1
I: avg: 48537 reads/s
I: avg: 48575 writes/s
PASS - test_stress in 5.002 seconds
```

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-06-02 18:45:46 -04:00
..
src tests: posix: eventfd: add stress test 2023-06-02 18:45:46 -04:00
CMakeLists.txt cmake: use find_package() instead of literal include in tests and samples 2021-11-01 10:33:09 -04:00
Kconfig tests: posix: eventfd: add stress test 2023-06-02 18:45:46 -04:00
prj.conf tests: posix: eventfd: reduce testing requirements and scope 2023-05-30 10:46:06 -04:00
testcase.yaml tests: posix: eventfd: reduce testing requirements and scope 2023-05-30 10:46:06 -04:00