diff mbox series

[2/3] iotests: log to stderr instead of stdout

Message ID 20200514201614.19941-3-jsnow@redhat.com
State New
Headers show
Series [1/3] iotests: log messages from notrun() | expand

Commit Message

John Snow May 14, 2020, 8:16 p.m. UTC
Separate the streams; stdout is for test diff output, stderr is for
control messages and things for the human to look at.

(Cough, unfortunately, I didn't realize that ./check actually just
always redirects both, so even on STDERR, you can't see warnings.
Oh well...)

Signed-off-by: John Snow <jsnow@redhat.com>
---
 tests/qemu-iotests/iotests.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
index 1caa7812de..9231767acf 100644
--- a/tests/qemu-iotests/iotests.py
+++ b/tests/qemu-iotests/iotests.py
@@ -1171,7 +1171,11 @@  def execute_setup_common(supported_fmts: Sequence[str] = (),
     debug = '-d' in sys.argv
     if debug:
         sys.argv.remove('-d')
-    logging.basicConfig(level=(logging.DEBUG if debug else logging.WARN))
+
+    logging.basicConfig(
+        level=logging.DEBUG if debug else logging.WARN,
+        stream=sys.stderr,
+    )
 
     _verify_image_format(supported_fmts, unsupported_fmts)
     _verify_protocol(supported_protocols, unsupported_protocols)