From cfdcaf72ca60db28ad8a7240a5a09e99151cab24 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Wed, 1 Nov 2023 21:55:04 +0100 Subject: Add support for FD_ISSET --- tests/Makefile | 2 ++ tests/test_FD_ISSET_SETSIZE.c | 14 ++++++++++++++ tests/test_FD_ISSET_negative.c | 14 ++++++++++++++ 3 files changed, 30 insertions(+) create mode 100644 tests/test_FD_ISSET_SETSIZE.c create mode 100644 tests/test_FD_ISSET_negative.c (limited to 'tests') diff --git a/tests/Makefile b/tests/Makefile index 5f70069..a93e0e9 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -10,6 +10,8 @@ RUNTIME_TARGETS= \ test_FD_CLR_negative \ test_FD_SET_SETSIZE \ test_FD_SET_negative \ + test_FD_ISSET_SETSIZE \ + test_FD_ISSET_negative \ test_bcopy_dynamic_read \ test_bcopy_dynamic_write \ test_bcopy_static_read \ diff --git a/tests/test_FD_ISSET_SETSIZE.c b/tests/test_FD_ISSET_SETSIZE.c new file mode 100644 index 0000000..0362aaa --- /dev/null +++ b/tests/test_FD_ISSET_SETSIZE.c @@ -0,0 +1,14 @@ +#include "common.h" + +#include + +int main(int argc, char** argv) { + fd_set rfds; + + CHK_FAIL_START + FD_ISSET(FD_SETSIZE, &rfds); + CHK_FAIL_END + + puts((const char*)&rfds); + return ret; +} diff --git a/tests/test_FD_ISSET_negative.c b/tests/test_FD_ISSET_negative.c new file mode 100644 index 0000000..f0ff89a --- /dev/null +++ b/tests/test_FD_ISSET_negative.c @@ -0,0 +1,14 @@ +#include "common.h" + +#include + +int main(int argc, char** argv) { + fd_set rfds; + + CHK_FAIL_START + FD_ISSET(-1, &rfds); + CHK_FAIL_END + + puts((const char*)&rfds); + return ret; +} -- cgit v1.3