Message ID | 20211015100718.17828-1-pbonzini@redhat.com |
---|---|
Headers | show |
Series | Replace custom test harness with "meson test" | expand |
On 15/10/2021 12.07, Paolo Bonzini wrote: > Hi all, > > Starting with Meson 0.57, "meson test" has all features of QEMU's > makefile-based harness and more. I just gave it a try, and basically I like this ... but I also encountered two issues: > * CTRL+C will only interrupt the longest running test. Pressing > CTRL+C repeatedly three times (which you would likely do anyway, > that's how things work) interrupts the whole run I tried this, and while hitting CTRL-C multiple times brought me back to the shell prompt, the remaining tests kept getting started in the background instead of getting stopped ... something is still fishy here, I think. > * Right now "make check-block" only does a single test run just like > "../tests/check-block.sh", but it would be possible to add the thorough > suite to "meson test --suite block" as well. The output of the iotests is also not optimal yet... when running "make check SPEED=slow", the iotests are run multiple times with different target image types, but each run prints the same "▶ 1/1 test 001 OK" etc. to the console, so it's hard to say which target type is currently exercised. Would it be possible to include the target image type here, e.g. something like: ▶ 1/1 test-qcow2 001 OK ? Thomas
On 18/10/21 11:51, Thomas Huth wrote: >> * CTRL+C will only interrupt the longest running test. Pressing >> CTRL+C repeatedly three times (which you would likely do anyway, >> that's how things work) interrupts the whole run > > I tried this, and while hitting CTRL-C multiple times brought me back to > the shell prompt, the remaining tests kept getting started in the > background instead of getting stopped ... something is still fishy here, > I think. Ok, I checked that out. Looks like CTRL+C magic and "make -j" are incompatible. :/ So this will have to wait a bit more, but in the meanwhile people can already use "meson test" if they want. >> * Right now "make check-block" only does a single test run just like >> "../tests/check-block.sh", but it would be possible to add the >> thorough >> suite to "meson test --suite block" as well. > > The output of the iotests is also not optimal yet... when running "make > check SPEED=slow", the iotests are run multiple times with different > target image types, but each run prints the same "▶ 1/1 test 001 OK" > etc. to the console, so it's hard to say which target type is currently > exercised. Would it be possible to include the target image type here, > e.g. something like: Yes, that's trivial: diff --git a/tests/qemu-iotests/testrunner.py b/tests/qemu-iotests/testrunner.py index 3ef14af1fa..45debc1928 100644 --- a/tests/qemu-iotests/testrunner.py +++ b/tests/qemu-iotests/testrunner.py @@ -163,11 +163,11 @@ def test_print_one_line(self, test: str, starttime: str, if self.tap: if status == 'pass': - print(f'ok test {test}') + print(f'ok {self.env.imgfmt} {test}') elif status == 'fail': - print(f'not ok test {test}') + print(f'not ok {self.env.imgfmt} {test}') elif status == 'not run': - print(f'ok test {test} # SKIP') + print(f'ok {self.env.imgfmt} {test} # SKIP') return if lasttime: In fact, that's exactly what was printed in the non-TAP case. Thanks for the feedback, even though it was bad! :) Paolo