summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile2
-rw-r--r--tests/test_select_dynamic.c16
-rw-r--r--tests/test_select_static.c16
3 files changed, 34 insertions, 0 deletions
diff --git a/tests/Makefile b/tests/Makefile
index a93e0e9..4889dc7 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -78,6 +78,8 @@ RUNTIME_TARGETS= \
78 test_recv_static \ 78 test_recv_static \
79 test_recvfrom_dynamic \ 79 test_recvfrom_dynamic \
80 test_recvfrom_static \ 80 test_recvfrom_static \
81 test_select_dynamic \
82 test_select_static \
81 test_send_dynamic \ 83 test_send_dynamic \
82 test_send_static \ 84 test_send_static \
83 test_sendto_dynamic \ 85 test_sendto_dynamic \
diff --git a/tests/test_select_dynamic.c b/tests/test_select_dynamic.c
new file mode 100644
index 0000000..e67baf3
--- /dev/null
+++ b/tests/test_select_dynamic.c
@@ -0,0 +1,16 @@
1#include "common.h"
2
3#include <sys/select.h>
4
5int main(int argc, char** argv) {
6#if !defined(__clang__)
7 fd_set rfds;
8
9 CHK_FAIL_START
10 select(FD_SETSIZE + argc, &rfds, NULL, NULL, NULL);
11 CHK_FAIL_END
12
13 puts((const char*)&rfds);
14#endif
15 return ret;
16}
diff --git a/tests/test_select_static.c b/tests/test_select_static.c
new file mode 100644
index 0000000..c2abf7f
--- /dev/null
+++ b/tests/test_select_static.c
@@ -0,0 +1,16 @@
1#include "common.h"
2
3#include <sys/select.h>
4
5int main(int argc, char** argv) {
6#if !defined(__clang__)
7 fd_set rfds;
8
9 CHK_FAIL_START
10 select(1337, &rfds, NULL, NULL, NULL);
11 CHK_FAIL_END
12
13 puts((const char*)&rfds);
14#endif
15 return ret;
16}