Skip to contentSkip to conversation

qemu-iotests: redirect nbd server stdout to /dev/null

PATCH Applied Jeff Cody 3 participants 3 messages Feb 14, 2017 – Feb 15, 2017

lore
Share & tools
lore

Jeff Cody

author
#0 lore raw

PATCH 1/1 qemu-iotests: redirect nbd server stdout to /dev/null

Some iotests (e.g. 174) try to filter the output of _make_test_image by piping the stdout. Pipe the server stdout to /dev/null, so that filter pipe does not need to wait until process completion.

---
 tests/qemu-iotests/common.rc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/qemu-iotests/common.rc +1 -1
index 6c0fd4c..08065dc 100644
@@ -172,7 +172,7 @@ _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 &"
+        eval "$QEMU_NBD -v -t -b 127.0.0.1 -p 10810 -f $IMGFMT  $TEST_IMG_FILE >/dev/null &"
         sleep 1 # FIXME: qemu-nbd needs to be listening before we continue
     fi
 }
Signature · 1 line
2.9.3
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Jeff Cody

Some iotests (e.g. 174) try to filter the output of _make_test_image by piping the stdout. Pipe the server stdout to /dev/null, so that filter pipe does not need to wait until process completion.

---
 tests/qemu-iotests/common.rc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 15 lines
tests/qemu-iotests/common.rc +1 -1
index 6c0fd4c..08065dc 100644
@@ -172,7 +172,7 @@ _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 &"
+        eval "$QEMU_NBD -v -t -b 127.0.0.1 -p 10810 -f $IMGFMT  $TEST_IMG_FILE >/dev/null &"
         sleep 1 # FIXME: qemu-nbd needs to be listening before we continue
     fi
 }
Signature · 2 lines
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org
Applied
#2 lore raw

Am 14.02.2017 um 19:42 hat Eric Blake geschrieben:

Quoted 11 lines · Jeff Cody
Quoted 8 lines

Some iotests (e.g. 174) try to filter the output of _make_test_image by piping the stdout. Pipe the server stdout to /dev/null, so that filter pipe does not need to wait until process completion.

---
 tests/qemu-iotests/common.rc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Thanks, applied to the block branch.

Kevin