On 08/02/2022 14.12, Hanna Reitz wrote:
On 08.02.22 11:13, Thomas Huth wrote:
We can get a nicer progress indication if we add the iotests
individually via the 'check' script instead of going through
the check-block.sh wrapper.
For this, we have to add some of the sanity checks that have
originally been done in the tests/check-block.sh script (whether
"bash" is available or whether CFLAGS contain -fsanitize switches)
to the meson.build file now, and add the environment variables
that have been set up by the tests/check-block.sh script before.
Signed-off-by: Thomas Huth <th...@redhat.com>
---
tests/qemu-iotests/meson.build | 45 ++++++++++++++++++++++++++++------
1 file changed, 37 insertions(+), 8 deletions(-)
diff --git a/tests/qemu-iotests/meson.build b/tests/qemu-iotests/meson.build
index e1832c90e0..5a6ccd35d8 100644
--- a/tests/qemu-iotests/meson.build
+++ b/tests/qemu-iotests/meson.build
@@ -1,9 +1,29 @@
-if not have_tools or targetos == 'windows'
+if not have_tools or targetos == 'windows' or \
+ config_host.has_key('CONFIG_GPROF')
subdir_done()
endif
+bash = find_program('bash', required: false)
+if not bash.found() or \
+ run_command(bash, ['--version']).stdout().contains('GNU bash, version 3')
Instead of me asking about where the LANG=C is, or me lamenting that we
could test very simply for [123] before and can no longer now... Can we not
just do `find_program('bash', required: false, version: '>= 4.0')`?
Oh, cool, find_program() has a version parameter, didn't know that before!
Thanks for the hint, I'll give it a try!
+ foreach tst: iotests
+ test('iotest-' + format + '-' + tst,
+ python, args: [check_script.full_path(), '-tap', '-' + format,
tst],
+ depends: qemu_iotests_binaries,
+ env: qemu_iotests_env + \
+ { 'TEST_DIR':
+ meson.current_build_dir() / 'scratch' / format + '-' +
tst },
+ protocol: 'tap',
+ suite: suites,
+ timeout: 0)
So as far I understand you’d like to have meson run the iotests in parallel
this way. I don’t actually think that’s safely possible for multiple
formats at once, because a test’s output is always written into
`${build_dir}/tests/qemu-iotests/${seq}.out.bad`; so if you run e.g. test
001 both with raw and qcow2 simultaneously, then they can get in each
other’s way.
Drat, I think you're right. I was testing with "make check SPEED=slow" and
that was still working fine, but with "make check SPEED=thorough" I'm
getting errors, indeed.
(In my test branch, I have
https://gitlab.com/hreitz/qemu/-/commit/f3110b1eeb93d02aeadc5c8b807594cfa10a6aad
for this – maybe I should send something like this in a more refined form to
the list some time...)
Thanks a lot, that fixes the problems with SPEED=thorough indeed!
Thomas