Skip to content

Commit

Permalink
tests: posix: eventfd: use reopen in test_write_then_read
Browse files Browse the repository at this point in the history
Use `reopen()` in one additional place in the eventfd
testsuite.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
  • Loading branch information
cfriedt authored and nashif committed Jun 2, 2023
1 parent d26d3f9 commit cf7c404
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions tests/posix/eventfd/src/blocking.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,8 @@ ZTEST_F(eventfd, test_write_then_read)
zassert_true(ret == 0, "read ret %d", ret);
zassert_true(val == 5, "val == %d", val);

close(fixture->fd);

/* Test EFD_SEMAPHORE */

fixture->fd = eventfd(0, EFD_SEMAPHORE);
zassert_true(fixture->fd >= 0, "fd == %d", fixture->fd);
reopen(&fixture->fd, 0, EFD_SEMAPHORE);

ret = eventfd_write(fixture->fd, 3);
zassert_true(ret == 0, "write ret %d", ret);
Expand Down

0 comments on commit cf7c404

Please sign in to comment.