]> Git Repo - qemu.git/commitdiff
iotests/162: Fix for newer Linux 5.3+
authorMax Reitz <[email protected]>
Wed, 2 Oct 2019 17:40:52 +0000 (19:40 +0200)
committerMax Reitz <[email protected]>
Thu, 10 Oct 2019 10:13:23 +0000 (12:13 +0200)
Linux 5.3 has made 0.0.0.0/8 a working IPv4 subnet.  As such, "42" is
now a valid host, and the connection to it will (hopefully) time out
over a long period rather than quickly return with EINVAL.

So let us use a negative integer for testing that NBD will not crash
when it receives integer hosts.  This way, the connection will again
fail quickly and reliably.

Signed-off-by: Max Reitz <[email protected]>
Message-id: 20191002174052[email protected]
Reviewed-by: Eric Blake <[email protected]>
Signed-off-by: Max Reitz <[email protected]>
tests/qemu-iotests/162
tests/qemu-iotests/162.out

index 2d719afbeda9a7206add2b216f90641a01f6743d..c0053ed975869864edb0ef1adfa999b4805bea7f 100755 (executable)
@@ -46,7 +46,7 @@ echo '=== NBD ==='
 # NBD expects all of its arguments to be strings
 
 # So this should not crash
-$QEMU_IMG info 'json:{"driver": "nbd", "host": 42}'
+$QEMU_IMG info 'json:{"driver": "nbd", "host": -1}'
 
 # And this should not treat @port as if it had not been specified
 # (We need to set up a server here, because the error message for "Connection
index 3c5be2c5699a225cc80bbdc40bec20c80aea7efe..5a00d36d17878376380430dad70527edf45bef2f 100644 (file)
@@ -1,7 +1,7 @@
 QA output created by 162
 
 === NBD ===
-qemu-img: Could not open 'json:{"driver": "nbd", "host": 42}': Failed to connect socket: Invalid argument
+qemu-img: Could not open 'json:{"driver": "nbd", "host": -1}': address resolution failed for -1:10809: Name or service not known
 image: nbd://localhost:PORT
 image: nbd+unix://?socket=42
 
This page took 0.034676 seconds and 4 git commands to generate.