Skip to contentSkip to conversation

tests/qemu-iotests/testrunner: Quote "case not run" lines in TAP mode

PATCH Applied Thomas Huth 2 participants 2 messages Feb 23, 2022 – Feb 24, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests/qemu-iotests/testrunner: Quote "case not run" lines in TAP mode

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.

---
 tests/qemu-iotests/testrunner.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
tests/qemu-iotests/testrunner.py +4 -1
index 9a94273975..0c7dc34a9e 100644
@@ -365,7 +365,10 @@ def run_test(self, test: str,
                                  description=res.description)
 
         if res.casenotrun:
-            print(res.casenotrun)
+            if self.tap:
+                print('#' + res.casenotrun.replace('\n', '\n#'))
+            else:
+                print(res.casenotrun)
 
         return res
 
Signature · 1 line
2.27.0
Applied
#1 lore raw
Quoted 9 lines · Thomas Huth

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

Quoted 8 lines

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.

---
  tests/qemu-iotests/testrunner.py | 5 ++++-
  1 file changed, 4 insertions(+), 1 deletion(-)

Thanks, applied to my block branch:

https://gitlab.com/hreitz/qemu/-/commits/block

Hanna