summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDiego Elio 'Flameeyes' Pettenò <flameeyes@gmail.com>2009-06-24 18:03:40 +0200
committerLennart Poettering <lennart@poettering.net>2009-06-29 17:40:28 +0200
commit080f6308f2c01ecce77bc4b7f93b061194791e00 (patch)
tree46402405d8f463c4d7e78eb824f8d4a6277bdad2
parentcd375da1dbf3f10c31167a128ef2f355eb01bd6e (diff)
Ignore IPv6 tests, if IPv6 was built in but the system doesn't have it.
This removes a test failure when an IPv6-enabled PulseAudio is tested on a system where IPv6 is not enabled in kernel.
-rw-r--r--src/tests/ipacl-test.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/tests/ipacl-test.c b/src/tests/ipacl-test.c
index f89665cd..57b70685 100644
--- a/src/tests/ipacl-test.c
+++ b/src/tests/ipacl-test.c
@@ -91,8 +91,10 @@ int main(int argc, char *argv[]) {
close(fd);
#ifdef HAVE_IPV6
- fd = socket(PF_INET6, SOCK_STREAM, 0);
- assert(fd >= 0);
+ if ( (fd = socket(PF_INET6, SOCK_STREAM, 0)) < 0 ) {
+ printf("Unable to open IPv6 socket, IPv6 tests ignored");
+ return 0;
+ }
memset(&sa6, 0, sizeof(sa6));
sa6.sin6_family = AF_INET6;