diff options
author | Fam Zheng <famz@redhat.com> | 2017-05-05 18:21:53 +0800 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2017-05-26 16:48:21 +0200 |
commit | cf1cd117e2b38f1b5d28e435b4b527a32055e133 (patch) | |
tree | 6caf8e25d16419b39dfb713dfb44fc4e1a298da7 /tests/qemu-iotests | |
parent | 0bb0aea4bac2332389a9b481f650a2a9df80ea0c (diff) | |
download | qemu-cf1cd117e2b38f1b5d28e435b4b527a32055e133.zip qemu-cf1cd117e2b38f1b5d28e435b4b527a32055e133.tar.gz qemu-cf1cd117e2b38f1b5d28e435b4b527a32055e133.tar.bz2 |
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/qemu-iotests')
-rwxr-xr-x | tests/qemu-iotests/147 | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/qemu-iotests/147 b/tests/qemu-iotests/147 index 32afea6..db34838 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', |