diff mbox

[v2,8/9] qemu-iotests: Fix stderr handling in common.qemu

Message ID 1415389165-16157-9-git-send-email-kwolf@redhat.com
State New
Headers show

Commit Message

Kevin Wolf Nov. 7, 2014, 7:39 p.m. UTC
The original intention was to pipe stderr of qemu into $fifo_out.
However, the redirections were specified in the wrong order for this.
This patch fixes it.

Now qemu's output on stderr can be retrieved with _send_qemu_cmd, which
applies several useful filters on the output that were missing before.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 tests/qemu-iotests/common.qemu | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Max Reitz Nov. 10, 2014, 3:04 p.m. UTC | #1
On 2014-11-07 at 20:39, Kevin Wolf wrote:
> The original intention was to pipe stderr of qemu into $fifo_out.
> However, the redirections were specified in the wrong order for this.
> This patch fixes it.
>
> Now qemu's output on stderr can be retrieved with _send_qemu_cmd, which
> applies several useful filters on the output that were missing before.
>
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
>   tests/qemu-iotests/common.qemu | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)

Reviewed-by: Max Reitz <mreitz@redhat.com>
Eric Blake Nov. 10, 2014, 7:55 p.m. UTC | #2
On 11/07/2014 12:39 PM, Kevin Wolf wrote:
> The original intention was to pipe stderr of qemu into $fifo_out.
> However, the redirections were specified in the wrong order for this.
> This patch fixes it.
> 
> Now qemu's output on stderr can be retrieved with _send_qemu_cmd, which
> applies several useful filters on the output that were missing before.
> 
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
>  tests/qemu-iotests/common.qemu | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Reviewed-by: Eric Blake <eblake@redhat.com>
Stefan Hajnoczi Nov. 13, 2014, 10:48 a.m. UTC | #3
On Fri, Nov 07, 2014 at 08:39:24PM +0100, Kevin Wolf wrote:
> The original intention was to pipe stderr of qemu into $fifo_out.
> However, the redirections were specified in the wrong order for this.
> This patch fixes it.
> 
> Now qemu's output on stderr can be retrieved with _send_qemu_cmd, which
> applies several useful filters on the output that were missing before.
> 
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
>  tests/qemu-iotests/common.qemu | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
diff mbox

Patch

diff --git a/tests/qemu-iotests/common.qemu b/tests/qemu-iotests/common.qemu
index ee7ebb4..8e618b5 100644
--- a/tests/qemu-iotests/common.qemu
+++ b/tests/qemu-iotests/common.qemu
@@ -153,8 +153,9 @@  function _launch_qemu()
     mkfifo "${fifo_out}"
     mkfifo "${fifo_in}"
 
-    "${QEMU}" -nographic -serial none ${comm} -machine accel=qtest "${@}" 2>&1 \
+    "${QEMU}" -nographic -serial none ${comm} -machine accel=qtest "${@}" \
                                                                 >"${fifo_out}" \
+                                                                2>&1 \
                                                                 <"${fifo_in}" &
     QEMU_PID[${_QEMU_HANDLE}]=$!