Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[test] skip IPv6 socket tests without IPv6, fixes #1068
There are systems without INET6 family support at all. It is a kernel option afterall.
Thanks to basiliscos for reporting
  • Loading branch information
Reini Urban committed Apr 1, 2014
1 parent 3295df4 commit fe3797d
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions t/pmc/socket.t
@@ -1,5 +1,5 @@
#!./parrot
# Copyright (C) 2006-2013, Parrot Foundation.
# Copyright (C) 2006-2014, Parrot Foundation.

=head1 NAME

Expand All @@ -13,8 +13,9 @@ t/pmc/socket.t - test the Socket PMC

Tests the Socket PMC.

The IPv6-related tests in this file do not actually require an IPv6 networking
stack, so we don't need to check if this parrot is IPv6-aware.
The IPv6-related tests are in F<t/pmc/socket_ipv6.t>.
We sometimes cannot even create an IPv6 family socket without
HAS_IPV6, see GH #1068.

=cut

Expand All @@ -24,7 +25,7 @@ stack, so we don't need to check if this parrot is IPv6-aware.
.sub main :main
.include 'test_more.pir'

plan(25)
plan(23)

test_init()
test_get_fd()
Expand All @@ -34,9 +35,7 @@ stack, so we don't need to check if this parrot is IPv6-aware.
test_close()
test_is_closed()
test_tcp_socket()
test_tcp_socket6()
test_udp_socket()
test_udp_socket6()
test_getprotobyname()
test_server()

Expand Down Expand Up @@ -148,14 +147,6 @@ CODE
test_create_socket(.PIO_PF_INET, .PIO_SOCK_STREAM, .PIO_PROTO_TCP, 'Created a TCP Socket')
.end

.sub test_tcp_socket6
test_create_socket(.PIO_PF_INET6, .PIO_SOCK_STREAM, .PIO_PROTO_TCP, 'Created a IPv6 TCP Socket')
.end

.sub test_udp_socket6
test_create_socket(.PIO_PF_INET6, .PIO_SOCK_DGRAM, .PIO_PROTO_UDP, 'Created a IPv6 UDP Socket')
.end

.sub test_udp_socket
test_create_socket(.PIO_PF_INET, .PIO_SOCK_DGRAM, .PIO_PROTO_UDP, 'Created a UDP Socket')
.end
Expand Down

0 comments on commit fe3797d

Please sign in to comment.