diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/Makefile | 2 | ||||
| -rw-r--r-- | tests/test_FD_ISSET_SETSIZE.c | 14 | ||||
| -rw-r--r-- | tests/test_FD_ISSET_negative.c | 14 |
3 files changed, 30 insertions, 0 deletions
diff --git a/tests/Makefile b/tests/Makefile index 5f70069..a93e0e9 100644 --- a/tests/Makefile +++ b/tests/Makefile | |||
| @@ -10,6 +10,8 @@ RUNTIME_TARGETS= \ | |||
| 10 | test_FD_CLR_negative \ | 10 | test_FD_CLR_negative \ |
| 11 | test_FD_SET_SETSIZE \ | 11 | test_FD_SET_SETSIZE \ |
| 12 | test_FD_SET_negative \ | 12 | test_FD_SET_negative \ |
| 13 | test_FD_ISSET_SETSIZE \ | ||
| 14 | test_FD_ISSET_negative \ | ||
| 13 | test_bcopy_dynamic_read \ | 15 | test_bcopy_dynamic_read \ |
| 14 | test_bcopy_dynamic_write \ | 16 | test_bcopy_dynamic_write \ |
| 15 | test_bcopy_static_read \ | 17 | 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 @@ | |||
| 1 | #include "common.h" | ||
| 2 | |||
| 3 | #include <sys/select.h> | ||
| 4 | |||
| 5 | int main(int argc, char** argv) { | ||
| 6 | fd_set rfds; | ||
| 7 | |||
| 8 | CHK_FAIL_START | ||
| 9 | FD_ISSET(FD_SETSIZE, &rfds); | ||
| 10 | CHK_FAIL_END | ||
| 11 | |||
| 12 | puts((const char*)&rfds); | ||
| 13 | return ret; | ||
| 14 | } | ||
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 @@ | |||
| 1 | #include "common.h" | ||
| 2 | |||
| 3 | #include <sys/select.h> | ||
| 4 | |||
| 5 | int main(int argc, char** argv) { | ||
| 6 | fd_set rfds; | ||
| 7 | |||
| 8 | CHK_FAIL_START | ||
| 9 | FD_ISSET(-1, &rfds); | ||
| 10 | CHK_FAIL_END | ||
| 11 | |||
| 12 | puts((const char*)&rfds); | ||
| 13 | return ret; | ||
| 14 | } | ||
