diff mbox

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

Message ID 261ff7cb02d96c98ea068f3ca255a747b88ebc10.1487096041.git.jcody@redhat.com
State New
Headers show

Commit Message

Jeff Cody Feb. 14, 2017, 6:15 p.m. UTC
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.

Signed-off-by: Jeff Cody <jcody@redhat.com>
---
 tests/qemu-iotests/common.rc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Eric Blake Feb. 14, 2017, 6:42 p.m. UTC | #1
On 02/14/2017 12:15 PM, Jeff Cody wrote:
> 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.
> 
> Signed-off-by: Jeff Cody <jcody@redhat.com>
> ---
>  tests/qemu-iotests/common.rc | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Eric Blake <eblake@redhat.com>

> 
> diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc
> index 6c0fd4c..08065dc 100644
> --- a/tests/qemu-iotests/common.rc
> +++ b/tests/qemu-iotests/common.rc
> @@ -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
>  }
>
Kevin Wolf Feb. 15, 2017, 4:22 p.m. UTC | #2
Am 14.02.2017 um 19:42 hat Eric Blake geschrieben:
> On 02/14/2017 12:15 PM, Jeff Cody wrote:
> > 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.
> > 
> > Signed-off-by: Jeff Cody <jcody@redhat.com>
> > ---
> >  tests/qemu-iotests/common.rc | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Reviewed-by: Eric Blake <eblake@redhat.com>

Thanks, applied to the block branch.

Kevin
diff mbox

Patch

diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc
index 6c0fd4c..08065dc 100644
--- a/tests/qemu-iotests/common.rc
+++ b/tests/qemu-iotests/common.rc
@@ -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
 }