aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorFam Zheng <famz@redhat.com>2017-05-05 18:21:53 +0800
committerKevin Wolf <kwolf@redhat.com>2017-05-26 16:48:21 +0200
commitcf1cd117e2b38f1b5d28e435b4b527a32055e133 (patch)
tree6caf8e25d16419b39dfb713dfb44fc4e1a298da7 /tests
parent0bb0aea4bac2332389a9b481f650a2a9df80ea0c (diff)
iotests: 147: Don't test inet6 if not available
This is the case in our docker tests, as we use --net=none there. Skip this method. Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/qemu-iotests/1477
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/qemu-iotests/147 b/tests/qemu-iotests/147
index 32afea63d4..db34838cd0 100755
--- a/tests/qemu-iotests/147
+++ b/tests/qemu-iotests/147
@@ -147,6 +147,13 @@ class BuiltinNBD(NBDBlockdevAddBase):
self._server_down()
def test_inet6(self):
+ try:
+ socket.getaddrinfo("::0", "0", socket.AF_INET6,
+ socket.SOCK_STREAM, socket.IPPROTO_TCP,
+ socket.AI_ADDRCONFIG | socket.AI_CANONNAME)
+ except socket.gaierror:
+ # IPv6 not available, skip
+ return
address = { 'type': 'inet',
'data': {
'host': '::1',