iotests: Launch qemu-nbd with -e 42
PATCH 1/1 iotests: Launch qemu-nbd with -e 42
There is no reason for the qemu-nbd server used for tests not to accept an arbitrary number of clients. In fact, test 181 will require it to accept two clients at the same time (and thus it fails before this patch).
This patch updates common.rc to launch qemu-nbd with -e 42 which should be enough for all of our current and future tests.
--- tests/qemu-iotests/common.rc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
tests/qemu-iotests/common.rc +3 -1
@@ -168,7 +168,9 @@ _make_test_img() # Start an NBD server on the image file, which is what we'll be talking to if [ $IMGPROTO = "nbd" ]; then - eval "$QEMU_NBD -v -t -b 127.0.0.1 -p 10810 -f $IMGFMT $TEST_IMG_FILE >/dev/null &" + # Pass a sufficiently high number to -e that should be enough for all + # tests + eval "$QEMU_NBD -v -t -b 127.0.0.1 -p 10810 -f $IMGFMT -e 42 $TEST_IMG_FILE >/dev/null &" sleep 1 # FIXME: qemu-nbd needs to be listening before we continue fi }
Signature · 1 line
2.12.2
Quoted 7 lines · Max Reitz
There is no reason for the qemu-nbd server used for tests not to accept an arbitrary number of clients. In fact, test 181 will require it to accept two clients at the same time (and thus it fails before this patch).
This patch updates common.rc to launch qemu-nbd with -e 42 which should be enough for all of our current and future tests.
Perfect place for you to inject some jibe about "life, the universe, and everything" ;)
Quoted 13 lines
Signed-off-by Max Reitz <[email protected]>--- tests/qemu-iotests/common.rc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)tests/qemu-iotests/common.rc +0
-0
tests/qemu-iotests/common.rc _make_test_img() · line 173
Quoted 7 lines
tests/qemu-iotests/common.rc +3
-1@@ -168,7 +168,9 @@ _make_test_img() # Start an NBD server on the image file, which is what we'll be talking to if [ $IMGPROTO = "nbd" ]; then - eval "$QEMU_NBD -v -t -b 127.0.0.1 -p 10810 -f $IMGFMT $TEST_IMG_FILE >/dev/null &" + # Pass a sufficiently high number to -e that should be enough for all + # tests + eval "$QEMU_NBD -v -t -b 127.0.0.1 -p 10810 -f $IMGFMT -e 42 $TEST_IMG_FILE >/dev/null &"
Worth dropping the double-space before $TEST_IMG_FILE while touching this?
Signature · 3 lines
Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
Quoted 11 lines · Eric Blake
Quoted 7 lines · Max Reitz
There is no reason for the qemu-nbd server used for tests not to accept an arbitrary number of clients. In fact, test 181 will require it to accept two clients at the same time (and thus it fails before this patch).
This patch updates common.rc to launch qemu-nbd with -e 42 which should be enough for all of our current and future tests.
Perfect place for you to inject some jibe about "life, the universe, and everything" ;)
Everybody knows anyway. ;-)
Quoted 14 lines
Quoted 14 lines
Signed-off-by Max Reitz <[email protected]>--- tests/qemu-iotests/common.rc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)tests/qemu-iotests/common.rc +0
-0@@ -168,7 +168,9 @@ _make_test_img()
Quoted 8 lines
tests/qemu-iotests/common.rc _make_test_img() · line 173
Quoted 6 lines
tests/qemu-iotests/common.rc +3
-1# Start an NBD server on the image file, which is what we'll be talking to if [ $IMGPROTO = "nbd" ]; then - eval "$QEMU_NBD -v -t -b 127.0.0.1 -p 10810 -f $IMGFMT $TEST_IMG_FILE >/dev/null &" + # Pass a sufficiently high number to -e that should be enough for all + # tests + eval "$QEMU_NBD -v -t -b 127.0.0.1 -p 10810 -f $IMGFMT -e 42 $TEST_IMG_FILE >/dev/null &"Worth dropping the double-space before $TEST_IMG_FILE while touching this?
I wasn't sure myself. It somehow is a nice separation between the option arguments and the image file name so I thought that maybe it was intended and was afraid to remove it... Well, and it doesn't really hurt.
Why don't we have CODING_STYLE for shell scripts? :-)
Quoted 1 line
Reviewed-by Eric Blake <[email protected]>
Thanks!
Max
Kevin Wolf
AppliedAm 26.04.2017 um 16:14 hat Max Reitz geschrieben:
Quoted 9 lines
There is no reason for the qemu-nbd server used for tests not to accept an arbitrary number of clients. In fact, test 181 will require it to accept two clients at the same time (and thus it fails before this patch).
This patch updates common.rc to launch qemu-nbd with -e 42 which should be enough for all of our current and future tests.
Signed-off-by Max Reitz <[email protected]>
Thanks, applied to block-next.
Kevin