qemu with hax to log dma reads & writes jcs.org/2018/11/12/vfio

iotests/162: Fix for newer Linux 5.3+

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 <mreitz@redhat.com>
Message-id: 20191002174052.5773-1-mreitz@redhat.com
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>

+2 -2
+1 -1
tests/qemu-iotests/162
··· 46 46 # NBD expects all of its arguments to be strings 47 47 48 48 # So this should not crash 49 - $QEMU_IMG info 'json:{"driver": "nbd", "host": 42}' 49 + $QEMU_IMG info 'json:{"driver": "nbd", "host": -1}' 50 50 51 51 # And this should not treat @port as if it had not been specified 52 52 # (We need to set up a server here, because the error message for "Connection
+1 -1
tests/qemu-iotests/162.out
··· 1 1 QA output created by 162 2 2 3 3 === NBD === 4 - qemu-img: Could not open 'json:{"driver": "nbd", "host": 42}': Failed to connect socket: Invalid argument 4 + qemu-img: Could not open 'json:{"driver": "nbd", "host": -1}': address resolution failed for -1:10809: Name or service not known 5 5 image: nbd://localhost:PORT 6 6 image: nbd+unix://?socket=42 7 7