All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] iotests: fix the redirection order in 083
@ 2016-04-26 10:13 Wei Jiangang
  2016-04-26 14:52 ` Eric Blake
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Wei Jiangang @ 2016-04-26 10:13 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf, mreitz, qemu-trivial, qemu-block, Wei Jiangang

It should redirect stdout to /dev/null first,
then redirect stderr to whatever stdout currently points at.

Signed-off-by: Wei Jiangang <weijg.fnst@cn.fujitsu.com>
---
 tests/qemu-iotests/083 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/qemu-iotests/083 b/tests/qemu-iotests/083
index aa99278..7d368b5 100755
--- a/tests/qemu-iotests/083
+++ b/tests/qemu-iotests/083
@@ -44,7 +44,7 @@ choose_tcp_port() {
 
 wait_for_tcp_port() {
 	while ! (netstat --tcp --listening --numeric | \
-		 grep "$1.*0\\.0\\.0\\.0:\\*.*LISTEN") 2>&1 >/dev/null; do
+		 grep "$1.*0\\.0\\.0\\.0:\\*.*LISTEN") >/dev/null 2>&1; do
 		sleep 0.1
 	done
 }
@@ -71,7 +71,7 @@ EOF
 		nbd_url="nbd:127.0.0.1:$port:exportname=foo"
 	fi
 
-	$PYTHON nbd-fault-injector.py $extra_args "127.0.0.1:$port" "$TEST_DIR/nbd-fault-injector.conf" 2>&1 >/dev/null &
+	$PYTHON nbd-fault-injector.py $extra_args "127.0.0.1:$port" "$TEST_DIR/nbd-fault-injector.conf" >/dev/null 2>&1 &
 	wait_for_tcp_port "127\\.0\\.0\\.1:$port"
 	$QEMU_IO -c "read 0 512" "$nbd_url" 2>&1 | _filter_qemu_io | _filter_nbd
 
-- 
1.9.3

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] iotests: fix the redirection order in 083
  2016-04-26 10:13 [Qemu-devel] [PATCH] iotests: fix the redirection order in 083 Wei Jiangang
@ 2016-04-26 14:52 ` Eric Blake
  2016-04-27 11:06 ` Max Reitz
  2016-05-06 19:04 ` Michael Tokarev
  2 siblings, 0 replies; 4+ messages in thread
From: Eric Blake @ 2016-04-26 14:52 UTC (permalink / raw)
  To: Wei Jiangang, qemu-devel; +Cc: kwolf, qemu-trivial, qemu-block, mreitz

[-- Attachment #1: Type: text/plain, Size: 474 bytes --]

On 04/26/2016 04:13 AM, Wei Jiangang wrote:
> It should redirect stdout to /dev/null first,
> then redirect stderr to whatever stdout currently points at.
> 
> Signed-off-by: Wei Jiangang <weijg.fnst@cn.fujitsu.com>
> ---
>  tests/qemu-iotests/083 | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

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

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] iotests: fix the redirection order in 083
  2016-04-26 10:13 [Qemu-devel] [PATCH] iotests: fix the redirection order in 083 Wei Jiangang
  2016-04-26 14:52 ` Eric Blake
@ 2016-04-27 11:06 ` Max Reitz
  2016-05-06 19:04 ` Michael Tokarev
  2 siblings, 0 replies; 4+ messages in thread
From: Max Reitz @ 2016-04-27 11:06 UTC (permalink / raw)
  To: Wei Jiangang, qemu-devel; +Cc: kwolf, qemu-trivial, qemu-block


[-- Attachment #1.1: Type: text/plain, Size: 418 bytes --]

On 26.04.2016 12:13, Wei Jiangang wrote:
> It should redirect stdout to /dev/null first,
> then redirect stderr to whatever stdout currently points at.
> 
> Signed-off-by: Wei Jiangang <weijg.fnst@cn.fujitsu.com>
> ---
>  tests/qemu-iotests/083 | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Thanks, applied to my block-next tree:

https://github.com/XanClic/qemu/commits/block-next

Max


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] iotests: fix the redirection order in 083
  2016-04-26 10:13 [Qemu-devel] [PATCH] iotests: fix the redirection order in 083 Wei Jiangang
  2016-04-26 14:52 ` Eric Blake
  2016-04-27 11:06 ` Max Reitz
@ 2016-05-06 19:04 ` Michael Tokarev
  2 siblings, 0 replies; 4+ messages in thread
From: Michael Tokarev @ 2016-05-06 19:04 UTC (permalink / raw)
  To: Wei Jiangang, qemu-devel; +Cc: kwolf, qemu-trivial, qemu-block, mreitz

26.04.2016 13:13, Wei Jiangang wrote:
> It should redirect stdout to /dev/null first,
> then redirect stderr to whatever stdout currently points at.

Actually this is interesting.

By doing this like it was done initially, we see any possible
errors from grep or python, because errors will go to initial stdout.
Now, errors are sent to /dev/null too.

:)

JFYI.

/mjt

> Signed-off-by: Wei Jiangang <weijg.fnst@cn.fujitsu.com>
> ---
>  tests/qemu-iotests/083 | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/qemu-iotests/083 b/tests/qemu-iotests/083
> index aa99278..7d368b5 100755
> --- a/tests/qemu-iotests/083
> +++ b/tests/qemu-iotests/083
> @@ -44,7 +44,7 @@ choose_tcp_port() {
>  
>  wait_for_tcp_port() {
>  	while ! (netstat --tcp --listening --numeric | \
> -		 grep "$1.*0\\.0\\.0\\.0:\\*.*LISTEN") 2>&1 >/dev/null; do
> +		 grep "$1.*0\\.0\\.0\\.0:\\*.*LISTEN") >/dev/null 2>&1; do
>  		sleep 0.1
>  	done
>  }
> @@ -71,7 +71,7 @@ EOF
>  		nbd_url="nbd:127.0.0.1:$port:exportname=foo"
>  	fi
>  
> -	$PYTHON nbd-fault-injector.py $extra_args "127.0.0.1:$port" "$TEST_DIR/nbd-fault-injector.conf" 2>&1 >/dev/null &
> +	$PYTHON nbd-fault-injector.py $extra_args "127.0.0.1:$port" "$TEST_DIR/nbd-fault-injector.conf" >/dev/null 2>&1 &
>  	wait_for_tcp_port "127\\.0\\.0\\.1:$port"
>  	$QEMU_IO -c "read 0 512" "$nbd_url" 2>&1 | _filter_qemu_io | _filter_nbd
>  
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-05-06 19:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-26 10:13 [Qemu-devel] [PATCH] iotests: fix the redirection order in 083 Wei Jiangang
2016-04-26 14:52 ` Eric Blake
2016-04-27 11:06 ` Max Reitz
2016-05-06 19:04 ` Michael Tokarev

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.