From 17c7a05f564d7349503b6effed3e4ddb6eb1e87e Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Thu, 12 Dec 2013 21:24:07 +0100 Subject: tests: Remove FIONBIO cause it doesn't work on x86. --- tests/testsuite.c | 43 +++++++++++++++++++------------------------ 1 file changed, 19 insertions(+), 24 deletions(-) diff --git a/tests/testsuite.c b/tests/testsuite.c index 70ffe8e..8f18097 100644 --- a/tests/testsuite.c +++ b/tests/testsuite.c @@ -63,30 +63,6 @@ static void test_socket_wrapper_dir(void **state) } #endif -static void test_swrap_ioctl_sock(void **state) -{ - int fd; - int rc; - int grp = -127; - - (void) state; /* unused */ - - fd = socket(AF_INET, SOCK_DGRAM, 0); - assert_int_not_equal(fd, -1); - -#ifdef FIONBIO - rc = ioctl(fd, FIONBIO); - assert_int_equal(rc, 0); -#endif - -#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) { int rc; @@ -106,6 +82,25 @@ static void test_swrap_socket(void **state) assert_int_equal(errno, EPROTONOSUPPORT); } +static void test_swrap_ioctl_sock(void **state) +{ + int fd; + int rc; + int grp = -127; + + (void) state; /* unused */ + + fd = socket(AF_INET, SOCK_DGRAM, 0); + assert_int_not_equal(fd, -1); + +#ifdef SIOCGPGRP + rc = ioctl(fd, SIOCGPGRP, &grp); + assert_int_equal(rc, 0); + + assert_int_not_equal(grp, -127); +#endif +} + #if 0 unsigned int socket_wrapper_default_iface(void); static bool test_socket_wrapper_default_iface(struct torture_context *tctx) -- cgit