From 28d61f4202a73fa39d07774c66e1404858adfee9 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Thu, 22 Jun 2023 18:33:53 +0200 Subject: Add a test for `poll` --- tests/Makefile | 1 + tests/test_poll.c | 14 ++++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 tests/test_poll.c (limited to 'tests') diff --git a/tests/Makefile b/tests/Makefile index b27b294..fa0bcdd 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -31,6 +31,7 @@ TARGETS=test_memcpy_static_write \ test_stpncpy_overwrite_under \ test_stpncpy_static_write \ test_getcwd \ + test_poll \ .SILENT: diff --git a/tests/test_poll.c b/tests/test_poll.c new file mode 100644 index 0000000..397aa3d --- /dev/null +++ b/tests/test_poll.c @@ -0,0 +1,14 @@ +#include "common.h" + +#include + +int main(int argc, char** argv) { + struct pollfd buffer[12] = {0}; + + CHK_FAIL_START + poll(buffer, 14, NULL); + CHK_FAIL_END + + puts(buffer); + return ret; +} -- cgit v1.3