From: Michael Tokarev <mjt@tls.msk.ru>
To: Wei Jiangang <weijg.fnst@cn.fujitsu.com>, qemu-devel@nongnu.org
Cc: kwolf@redhat.com, qemu-trivial@nongnu.org, qemu-block@nongnu.org,
mreitz@redhat.com
Subject: Re: [Qemu-trivial] [PATCH] iotests: fix the redirection order in 083
Date: Fri, 6 May 2016 22:04:37 +0300 [thread overview]
Message-ID: <572CEAC5.60806@msgid.tls.msk.ru> (raw)
In-Reply-To: <1461665601-14908-1-git-send-email-weijg.fnst@cn.fujitsu.com>
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
>
>
prev parent reply other threads:[~2016-05-06 19:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-26 10:13 [Qemu-trivial] [Qemu-devel][PATCH] iotests: fix the redirection order in 083 Wei Jiangang
2016-04-26 14:52 ` [Qemu-trivial] [Qemu-devel] [PATCH] " Eric Blake
2016-04-27 11:06 ` [Qemu-trivial] [Qemu-devel][PATCH] " Max Reitz
2016-05-06 19:04 ` Michael Tokarev [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=572CEAC5.60806@msgid.tls.msk.ru \
--to=mjt@tls.msk.ru \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=weijg.fnst@cn.fujitsu.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).