]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
tests/qemu-iotests/testrunner: Quote "case not run" lines in TAP mode
authorThomas Huth <thuth@redhat.com>
Wed, 23 Feb 2022 12:43:53 +0000 (13:43 +0100)
committerHanna Reitz <hreitz@redhat.com>
Mon, 7 Mar 2022 08:19:20 +0000 (09:19 +0100)
In TAP mode, the stdout is reserved for the TAP protocol, so we
have to make sure to mark other lines with a comment '#' character
at the beginning to avoid that the TAP parser at the other end
gets confused.

To test this condition, run "configure" for example with:

 --block-drv-rw-whitelist=copy-before-write,qcow2,raw,file,host_device,blkdebug,null-co,copy-on-read

so that iotest 041 will report that some tests are not run due to
the missing "quorum" driver. Without this change, "make check-block"
fails since the meson tap parser gets confused by these messages.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20220223124353.3273898-1-thuth@redhat.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>
tests/qemu-iotests/testrunner.py

index 9a942739754f72cdd846871df8ebddcd6d6aba88..0c7dc34a9e239640139add17826e479c5a7cc7b3 100644 (file)
@@ -365,7 +365,10 @@ class TestRunner(ContextManager['TestRunner']):
                                  description=res.description)
 
         if res.casenotrun:
-            print(res.casenotrun)
+            if self.tap:
+                print('#' + res.casenotrun.replace('\n', '\n#'))
+            else:
+                print(res.casenotrun)
 
         return res