summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2013-11-15 09:23:34 +0100
committerAndreas Schneider <asn@cryptomilk.org>2013-11-15 09:23:34 +0100
commit2b6ca736e4caf3258c9bcb4f117222a9cefaf354 (patch)
treec7569c539b24e92053b5c321c27850527397ba1e
parent0df9fa8ab86c4474dc14d679df5902338f05a9c2 (diff)
downloadsocket_wrapper-2b6ca736e4caf3258c9bcb4f117222a9cefaf354.tar.gz
socket_wrapper-2b6ca736e4caf3258c9bcb4f117222a9cefaf354.tar.xz
socket_wrapper-2b6ca736e4caf3258c9bcb4f117222a9cefaf354.zip
tests: Add SIOCGPGRP test.
-rw-r--r--tests/testsuite.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/testsuite.c b/tests/testsuite.c
index 880068b..ae797a7 100644
--- a/tests/testsuite.c
+++ b/tests/testsuite.c
@@ -67,6 +67,7 @@ static void test_swrap_ioctl_sock(void **state)
{
int fd;
int rc;
+ int grp = -127;
(void) state; /* unused */
@@ -75,6 +76,13 @@ static void test_swrap_ioctl_sock(void **state)
rc = ioctl(fd, FIONBIO);
assert_int_equal(rc, 0);
+
+#ifdef SIOCGPGRP
+ rc = ioctl(fd, SIOCGPGRP, &grp);
+ assert_int_equal(rc, 0);
+
+ assert_int_not_equal(grp, -127);
+#endif
}
static void test_swrap_socket(void **state)