[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PATCH v4 16/26] tests: redirect stderr to stdout for iotes
From: |
Daniel P. Berrange |
Subject: |
[Qemu-block] [PATCH v4 16/26] tests: redirect stderr to stdout for iotests |
Date: |
Mon, 29 Feb 2016 12:00:51 +0000 |
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.
Signed-off-by: Daniel P. Berrange <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)))
--
2.5.0
- [Qemu-block] [PATCH v4 04/26] crypto: add support for anti-forensic split algorithm, (continued)
- [Qemu-block] [PATCH v4 04/26] crypto: add support for anti-forensic split algorithm, Daniel P. Berrange, 2016/02/29
- [Qemu-block] [PATCH v4 03/26] crypto: add support for generating initialization vectors, Daniel P. Berrange, 2016/02/29
- [Qemu-block] [PATCH v4 08/26] crypto: add support for the twofish cipher algorithm, Daniel P. Berrange, 2016/02/29
- [Qemu-block] [PATCH v4 12/26] crypto: add block encryption framework, Daniel P. Berrange, 2016/02/29
- [Qemu-block] [PATCH v4 11/26] crypto: wire up XTS mode for cipher APIs, Daniel P. Berrange, 2016/02/29
- [Qemu-block] [PATCH v4 10/26] crypto: refactor code for dealing with AES cipher, Daniel P. Berrange, 2016/02/29
- [Qemu-block] [PATCH v4 15/26] qemu-img/qemu-io: don't prompt for passwords if not required, Daniel P. Berrange, 2016/02/29
- [Qemu-block] [PATCH v4 14/26] block: add flag to indicate that no I/O will be performed, Daniel P. Berrange, 2016/02/29
- [Qemu-block] [PATCH v4 17/26] tests: refactor python I/O tests helper main method, Daniel P. Berrange, 2016/02/29
- [Qemu-block] [PATCH v4 09/26] crypto: import an implementation of the XTS cipher mode, Daniel P. Berrange, 2016/02/29
- [Qemu-block] [PATCH v4 16/26] tests: redirect stderr to stdout for iotests,
Daniel P. Berrange <=
- [Qemu-block] [PATCH v4 18/26] tests: add output filter to python I/O tests helper, Daniel P. Berrange, 2016/02/29
- [Qemu-block] [PATCH v4 24/26] block: rip out all traces of password prompting, Daniel P. Berrange, 2016/02/29
- [Qemu-block] [PATCH v4 21/26] qcow2: convert QCow2 to use QCryptoBlock for encryption, Daniel P. Berrange, 2016/02/29
- [Qemu-block] [PATCH v4 26/26] block: remove support for legecy AES qcow/qcow2 encryption, Daniel P. Berrange, 2016/02/29
- [Qemu-block] [PATCH v4 25/26] block: remove all encryption handling APIs, Daniel P. Berrange, 2016/02/29
- [Qemu-block] [PATCH v4 13/26] crypto: implement the LUKS block encryption format, Daniel P. Berrange, 2016/02/29
- [Qemu-block] [PATCH v4 22/26] qcow: make encrypt_sectors encrypt in place, Daniel P. Berrange, 2016/02/29
- [Qemu-block] [PATCH v4 23/26] qcow: convert QCow to use QCryptoBlock for encryption, Daniel P. Berrange, 2016/02/29
- [Qemu-block] [PATCH v4 20/26] qcow2: make qcow2_encrypt_sectors encrypt in place, Daniel P. Berrange, 2016/02/29
- [Qemu-block] [PATCH v4 19/26] block: add generic full disk encryption driver, Daniel P. Berrange, 2016/02/29