Run iotests during "make check"
Hi Peter,
the following changes since commit afd760539308a5524accf964107cdb1d54a059e3:
Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20190816' into staging (2019-08-16 17:21:40 +0100)
are available in the Git repository at:
https://gitlab.com/huth/qemu.git tags/pull-request-2019-08-17
for you to fetch changes up to 72e031f3b80a421b309ce0d1759b26e428f944db:
gitlab-ci: Remove qcow2 tests that are handled by "make check" already (2019-08-17 09:06:17 +0200)
----------------------------------------------------------------
- Run the iotest during "make check"
----------------------------------------------------------------
Paolo Bonzini (1):
block: fix NetBSD qemu-iotests failure
Thomas Huth (2):
tests: Run the iotests during "make check" again
gitlab-ci: Remove qcow2 tests that are handled by "make check" already
.gitlab-ci.yml | 13 ++++--------- block/file-posix.c | 4 ++-- tests/Makefile.include | 10 ++++++---- tests/check-block.sh | 44 ++++++++++++++++++++++++++++++++++---------- tests/qemu-iotests-quick.sh | 8 -------- 5 files changed, 46 insertions(+), 33 deletions(-) delete mode 100755 tests/qemu-iotests-quick.sh
[Qemu-devel] [PULL 1/3] block: fix NetBSD qemu-iotests failure
From: Paolo Bonzini <[email protected]>
Opening a block device on NetBSD has an additional step compared to other OSes, corresponding to raw_normalize_devicepath. The error message in that function is slightly different from that in raw_open_common and this was causing spurious failures in qemu-iotests. However, in general it is not important to know what exact step was failing, for example in the qemu-iotests case the error message contains the fairly unequivocal "No such file or directory" text from strerror. We can thus fix the failures by standardizing on a single error message for both raw_open_common and raw_normalize_devicepath; in fact, we can even use error_setg_file_open to make sure the error message is the same as in the rest of QEMU.
Message-Id: <[email protected]>
--- block/file-posix.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
block/file-posix.c +2 -2
@@ -217,7 +217,7 @@ static int raw_normalize_devicepath(const char **filename, Error **errp) fname = *filename; dp =strrchr (fname,'/' );if (lstat (fname, &sb) <0 ) { -error_setg_errno (errp, errno,"%s: stat failed" , fname); +error_setg_file_open (errp, errno, fname);return -errno; }
@@ -561,7 +561,7 @@ static int raw_open_common(BlockDriverState *bs, QDict *options, ret = fd <0 ? -errno :0 ;if (ret <0 ) { -error_setg_errno (errp, -ret,"Could not open '%s'" , filename); +error_setg_file_open (errp, -ret, filename);if (ret == -EROFS ) { ret = -EACCES ; }
Signature · 1 line
2.18.1
[Qemu-devel] [PULL 3/3] gitlab-ci: Remove qcow2 tests that are handled by "make check" already
In reply to Thomas HuthSince most iotests are now run during "make check" already, we do not need to test them explicitly from the gitlab-ci.yml script anymore. And while we're at it, add some of the new non-auto tests >= 246 instead.
Message-Id: <[email protected]>
--- .gitlab-ci.yml | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-)
.gitlab-ci.yml +4 -9
@@ -45,15 +45,10 @@ build-tcg-disabled: - ./check -raw 001 002 003 004 005 008 009 010 011 012 021 025 032 033 048 052 063 077 086 101 104 106 113 147 148 150 151 152 157 159 160 163 170 171 183 184 192 194 197 205 208 215 221 222 226 227 236 - - ./check -qcow2 001 002 003 004 005 007 008 009 010 011 012 013 017 018 019 - 020 021 022 024 025 027 028 029 031 032 033 034 035 036 037 038 - 039 040 042 043 046 047 048 049 050 051 052 053 054 056 057 058 - 060 061 062 063 065 066 067 068 069 071 072 073 074 079 080 082 - 085 086 089 090 091 095 096 097 098 099 102 103 104 105 107 108 - 110 111 114 117 120 122 124 126 127 129 130 132 133 134 137 138 - 139 140 141 142 143 144 145 147 150 151 152 154 155 156 157 158 - 161 165 170 172 174 176 177 179 184 186 187 190 192 194 195 196 - 197 200 202 203 205 208 209 214 215 216 217 218 222 226 227 229 234 + - ./check -qcow2 028 040 051 056 057 058 065 067 068 082 085 091 095 096 102 + 122 124 127 129 132 139 142 144 145 147 151 152 155 157 165 194 + 196 197 200 202 203 205 208 209 215 216 218 222 227 234 246 247 + 248 250 254 255 256 build-user: script:
Signature · 1 line
2.18.1
[Qemu-devel] [PULL 2/3] tests: Run the iotests during "make check" again
In reply to Thomas HuthPeople often forget to run the iotests before submitting patches or pull requests - this is likely due to the fact that we do not run the tests during our mandatory "make check" tests yet. Now that we've got a proper "auto" group of iotests that should be fine to run in every environment, we can enable the iotests during "make check" again by running the "auto" tests by default from the check-block.sh script.
Some cases still need to be checked first, though: iotests need bash and GNU sed (otherwise they fail), and if gprof is enabled, it spoils the output of some test cases causing them to fail. So if we detect that one of the required programs is missing or that gprof is enabled, we still have to skip the iotests to avoid failures.
And finally, since we are using check-block.sh now again, this patch also removes the qemu-iotests-quick.sh script since we do not need that anymore (and having two shell wrapper scripts around the block tests seems rather confusing than helpful).
Message-Id: <[email protected]>
--- tests/Makefile.include | 10 +++++---- tests/check-block.sh | 44 ++++++++++++++++++++++++++++--------- tests/qemu-iotests-quick.sh | 8 ------- 3 files changed, 40 insertions(+), 22 deletions(-) delete mode 100755 tests/qemu-iotests-quick.sh
tests/Makefile.include +6 -4
@@ -142,7 +142,7 @@ check-unit-y += tests/test-uuid$(EXESUF) check-unit-y += tests/ptimer-test$(EXESUF) check-unit-y += tests/test-qapi-util$(EXESUF) -check-block-$(CONFIG_POSIX) += tests/qemu-iotests-quick.sh +check-block-$(call land,$(CONFIG_POSIX),$(CONFIG_SOFTMMU)) += tests/check-block.sh # All QTests for now are POSIX-only, but the dependencies are # really in libqtest, not in the testcases themselves.
@@ -1092,8 +1092,10 @@ clean-tcg: $(CLEAN_TCG_TARGET_RULES) QEMU_IOTESTS_HELPERS-$(call land,$(CONFIG_SOFTMMU),$(CONFIG_LINUX)) = tests/qemu-iotests/socket_scm_helper$(EXESUF) -.PHONY: check-tests/qemu-iotests-quick.sh -check-tests/qemu-iotests-quick.sh: tests/qemu-iotests-quick.sh qemu-img$(EXESUF) qemu-io$(EXESUF) qemu-nbd$(EXESUF) $(QEMU_IOTESTS_HELPERS-y) +.PHONY: check-tests/check-block.sh +check-tests/check-block.sh: tests/check-block.sh qemu-img$(EXESUF) \ + qemu-io$(EXESUF) qemu-nbd$(EXESUF) $(QEMU_IOTESTS_HELPERS-y) \ + $(patsubst %,%/all,$(filter %-softmmu,$(TARGET_DIRS))) $< .PHONY: $(patsubst %, check-%, $(check-qapi-schema-y))
@@ -1167,7 +1169,7 @@ check-acceptance: check-venv $(TESTS_RESULTS_DIR) check-qapi-schema: $(patsubst %,check-%, $(check-qapi-schema-y)) check-tests/qapi-schema/doc-good.texi check-qtest: $(patsubst %,check-qtest-%, $(QTEST_TARGETS)) check-block: $(patsubst %,check-%, $(check-block-y)) -check: check-qapi-schema check-unit check-softfloat check-qtest check-decodetree +check: check-block check-qapi-schema check-unit check-softfloat check-qtest check-decodetree check-clean: rm -rf $(check-unit-y) tests/*.o $(QEMU_IOTESTS_HELPERS-y) rm -rf $(sort $(foreach target,$(SYSEMU_TARGET_LIST), $(check-qtest-$(target)-y)) $(check-qtest-generic-y))
tests/check-block.sh +34 -10
58 lines not on this page · raw message
tests/qemu-iotests-quick.sh deleted +0 -8
@@ -1,8 +0,0 @@ -#!/bin/sh - -cd tests/qemu-iotests - -ret=0 -TEST_DIR=${TEST_DIR:-/tmp/qemu-iotests-quick-$$} ./check -T -qcow2 -g quick || ret=1 - -exit $ret
Signature · 1 line
2.18.1
Peter Maydell
AppliedQuoted 19 lines · Thomas Huth
Hi Peter,
the following changes since commit
afd760539308a5524accf964107cdb1d54a059e3:Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20190816' into staging (2019-08-16 17:21:40 +0100)
are available in the Git repository at:
https://gitlab.com/huth/qemu.git tags/pull-request-2019-08-17
for you to fetch changes up to
72e031f3b80a421b309ce0d1759b26e428f944db:gitlab-ci: Remove qcow2 tests that are handled by "make check" already (2019-08-17 09:06:17 +0200)
----------------------------------------------------------------
- Run the iotest during "make check"
----------------------------------------------------------------
Quoted 6 lines
Paolo Bonzini (1):
block: fix NetBSD qemu-iotests failureThomas Huth (2):
tests: Run the iotests during "make check" again
gitlab-ci: Remove qcow2 tests that are handled by "make check" already
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/4.2
for any user-visible changes.
-- PMM
Re: [Qemu-devel] [PULL 2/3] tests: Run the iotests during "make check" again
In reply to Thomas HuthQuoted 18 lines · Thomas Huth
People often forget to run the iotests before submitting patches or pull requests - this is likely due to the fact that we do not run the tests during our mandatory "make check" tests yet. Now that we've got a proper "auto" group of iotests that should be fine to run in every environment, we can enable the iotests during "make check" again by running the "auto" tests by default from the
check-block.shscript.Some cases still need to be checked first, though: iotests need bash and GNU sed (otherwise they fail), and if gprof is enabled, it spoils the output of some test cases causing them to fail. So if we detect that one of the required programs is missing or that gprof is enabled, we still have to skip the iotests to avoid failures.
And finally, since we are using
check-block.shnow again, this patch also removes theqemu-iotests-quick.shscript since we do not need that anymore (and having two shell wrapper scripts around the block tests seems rather confusing than helpful).
Quoted 4 lines
Message-Id: <[email protected]>
Signed-off-by Thomas Huth <[email protected]>[AJB: -makecheck to check-block.sh, move check-block to start and gate it]Signed-off-by Alex Bennée <[email protected]>
This breaks when sanitizers are enabled. There are leaks reported, though I'm not sure if they are real, and in additions the warning lines break qemu-iotests' output comparison.
Paolo
Re: [Qemu-devel] [PULL 2/3] tests: Run the iotests during "make check" again
Quoted 19 lines · Paolo Bonzini
Quoted 18 lines · Thomas Huth
People often forget to run the iotests before submitting patches or pull requests - this is likely due to the fact that we do not run the tests during our mandatory "make check" tests yet. Now that we've got a proper "auto" group of iotests that should be fine to run in every environment, we can enable the iotests during "make check" again by running the "auto" tests by default from the
check-block.shscript.Some cases still need to be checked first, though: iotests need bash and GNU sed (otherwise they fail), and if gprof is enabled, it spoils the output of some test cases causing them to fail. So if we detect that one of the required programs is missing or that gprof is enabled, we still have to skip the iotests to avoid failures.
And finally, since we are using
check-block.shnow again, this patch also removes theqemu-iotests-quick.shscript since we do not need that anymore (and having two shell wrapper scripts around the block tests seems rather confusing than helpful).
Quoted 8 lines
Quoted 4 lines
Message-Id: <[email protected]>
Signed-off-by Thomas Huth <[email protected]>[AJB: -makecheck to check-block.sh, move check-block to start and gate it]Signed-off-by Alex Bennée <[email protected]>This breaks when sanitizers are enabled. There are leaks reported, though I'm not sure if they are real, and in additions the warning lines break qemu-iotests' output comparison.
D'oh, I already thought that it was too easy ;-) I'll have a look at it...
Thomas
Re: [Qemu-devel] [PULL 2/3] tests: Run the iotests during "make check" again
Quoted 25 lines · Thomas Huth
Quoted 24 lines · Paolo Bonzini
Quoted 22 lines · Thomas Huth
People often forget to run the iotests before submitting patches or pull requests - this is likely due to the fact that we do not run the tests during our mandatory "make check" tests yet. Now that we've got a proper "auto" group of iotests that should be fine to run in every environment, we can enable the iotests during "make check" again by running the "auto" tests by default from the
check-block.shscript.Some cases still need to be checked first, though: iotests need bash and GNU sed (otherwise they fail), and if gprof is enabled, it spoils the output of some test cases causing them to fail. So if we detect that one of the required programs is missing or that gprof is enabled, we still have to skip the iotests to avoid failures.
And finally, since we are using
check-block.shnow again, this patch also removes theqemu-iotests-quick.shscript since we do not need that anymore (and having two shell wrapper scripts around the block tests seems rather confusing than helpful).Message-Id: <[email protected]>
Signed-off-by Thomas Huth <[email protected]>[AJB: -makecheck to check-block.sh, move check-block to start and gate it]Signed-off-by Alex Bennée <[email protected]>
Quoted 5 lines
Quoted 3 lines
This breaks when sanitizers are enabled. There are leaks reported, though I'm not sure if they are real, and in additions the warning lines break qemu-iotests' output comparison.
D'oh, I already thought that it was too easy ;-) I'll have a look at it...
If I get that right, the problem only exists when compiling with Clang and sanitizers enabled - Clang outputs lots of warnings that some things are not implemented yet and then prints out these leak reports which are likely false positives...
I've sent a patch now to disable the iotests during "make check" when sanitizers are enabled. But I wonder whether we should maybe also check for these incomplete sanitizer implementations in the configure script to avoid to enable them in this case? (e.g. there are also lots of warnings during "make check-qtest" in this case, which is somewhat ugly)
Thomas