[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 15/48] tests: redirect stderr to stdout for iotests
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PULL 15/48] tests: redirect stderr to stdout for iotests |
Date: |
Tue, 29 Mar 2016 17:08:15 +0200 |
From: "Daniel P. Berrange" <address@hidden>
The python I/O tests helper for running qemu-img/qemu-io
setup stdout to be captured to a pipe, but left stderr
untouched. As a result, if something failed in qemu-img/
qemu-io, data written to stderr would get output directly
and not line up with data on the test stdout due to
buffering. If we explicitly redirect stderr to the same
pipe as stdout, things are much clearer when they go
wrong.
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Daniel P. Berrange <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
tests/qemu-iotests/iotests.py | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
index 0a238ec..5f82bbe 100644
--- a/tests/qemu-iotests/iotests.py
+++ b/tests/qemu-iotests/iotests.py
@@ -71,7 +71,9 @@ def qemu_img_verbose(*args):
def qemu_img_pipe(*args):
'''Run qemu-img and return its output'''
- subp = subprocess.Popen(qemu_img_args + list(args), stdout=subprocess.PIPE)
+ subp = subprocess.Popen(qemu_img_args + list(args),
+ stdout=subprocess.PIPE,
+ stderr=subprocess.STDOUT)
exitcode = subp.wait()
if exitcode < 0:
sys.stderr.write('qemu-img received signal %i: %s\n' % (-exitcode, '
'.join(qemu_img_args + list(args))))
@@ -80,7 +82,8 @@ def qemu_img_pipe(*args):
def qemu_io(*args):
'''Run qemu-io and return the stdout data'''
args = qemu_io_args + list(args)
- subp = subprocess.Popen(args, stdout=subprocess.PIPE)
+ subp = subprocess.Popen(args, stdout=subprocess.PIPE,
+ stderr=subprocess.STDOUT)
exitcode = subp.wait()
if exitcode < 0:
sys.stderr.write('qemu-io received signal %i: %s\n' % (-exitcode, '
'.join(args)))
--
1.8.3.1
- [Qemu-devel] [PULL 05/48] block: Make backing files always writeback, (continued)
- [Qemu-devel] [PULL 05/48] block: Make backing files always writeback, Kevin Wolf, 2016/03/29
- [Qemu-devel] [PULL 09/48] block/qapi: make two printf() formats literal, Kevin Wolf, 2016/03/29
- [Qemu-devel] [PULL 11/48] block/qapi: Set s->device in bdrv_query_stats(), Kevin Wolf, 2016/03/29
- [Qemu-devel] [PULL 08/48] block: Remove blk_set_bs(), Kevin Wolf, 2016/03/29
- [Qemu-devel] [PULL 07/48] block/raw-posix.c: Make physical devices usable in QEMU under Mac OS X host, Kevin Wolf, 2016/03/29
- [Qemu-devel] [PULL 06/48] block: Reject writethrough mode except at the root, Kevin Wolf, 2016/03/29
- [Qemu-devel] [PULL 10/48] block/qapi: fix unbounded stack for dump_qdict, Kevin Wolf, 2016/03/29
- [Qemu-devel] [PULL 14/48] qemu-img/qemu-io: don't prompt for passwords if not required, Kevin Wolf, 2016/03/29
- [Qemu-devel] [PULL 12/48] block/qapi: Pass bdrv_query_blk_stats() s->stats, Kevin Wolf, 2016/03/29
- [Qemu-devel] [PULL 13/48] block: add flag to indicate that no I/O will be performed, Kevin Wolf, 2016/03/29
- [Qemu-devel] [PULL 15/48] tests: redirect stderr to stdout for iotests,
Kevin Wolf <=
- [Qemu-devel] [PULL 16/48] tests: refactor python I/O tests helper main method, Kevin Wolf, 2016/03/29
- [Qemu-devel] [PULL 17/48] tests: add output filter to python I/O tests helper, Kevin Wolf, 2016/03/29
- [Qemu-devel] [PULL 18/48] block: add generic full disk encryption driver, Kevin Wolf, 2016/03/29
- [Qemu-devel] [PULL 23/48] replay: fix error message, Kevin Wolf, 2016/03/29
- [Qemu-devel] [PULL 19/48] block: move encryption deprecation warning into qcow code, Kevin Wolf, 2016/03/29
- [Qemu-devel] [PULL 21/48] block: add flush callback, Kevin Wolf, 2016/03/29
- [Qemu-devel] [PULL 25/48] block: Add bdrv_parse_cache_mode(), Kevin Wolf, 2016/03/29
- [Qemu-devel] [PULL 22/48] replay: bh scheduling fix, Kevin Wolf, 2016/03/29
- [Qemu-devel] [PULL 26/48] qemu-nbd: Call blk_set_enable_write_cache() explicitly, Kevin Wolf, 2016/03/29
- [Qemu-devel] [PULL 28/48] qemu-img: Expand all BDRV_O_FLAGS uses, Kevin Wolf, 2016/03/29