tests/Makefile.include | 2 ++ 1 file changed, 2 insertions(+)
From: Thomas Huth <thuth@redhat.com>
If QEMU gets configured for a single target that does not have
any thorough functional tests, "make check-functional" currently
fails with the error message "No rule to make target 'check-func'".
This happens because "check-func" only gets defined for thorough
tests (quick ones get added to "check-func-quick" instead).
Thus let's define a dummy target for this case, that simply
depends on the quick tests.
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Closes: https://gitlab.com/qemu-project/qemu/-/issues/3119
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
tests/Makefile.include | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tests/Makefile.include b/tests/Makefile.include
index 3538c0c7407..622be12e31b 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -113,6 +113,8 @@ check-functional:
@$(NINJA) precache-functional
@QEMU_TEST_NO_DOWNLOAD=1 $(MAKE) SPEED=thorough check-func check-func-quick
+check-func: check-func-quick
+
# Consolidated targets
.PHONY: check check-clean
--
2.51.0
On Thu, 18 Sept 2025 at 12:40, Thomas Huth <thuth@redhat.com> wrote: > > From: Thomas Huth <thuth@redhat.com> > > If QEMU gets configured for a single target that does not have > any thorough functional tests, "make check-functional" currently > fails with the error message "No rule to make target 'check-func'". > This happens because "check-func" only gets defined for thorough > tests (quick ones get added to "check-func-quick" instead). > Thus let's define a dummy target for this case, that simply > depends on the quick tests. Tested-by: Peter Maydell <peter.maydell@linaro.org> We also have the opposite problem if there are no 'quick' tests, which you can see if you try 'check-functional' on a build configured with the aarch64-linux-user target only: $ make -C build/aarch64-linux/ check-functional make: Entering directory '/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/aarch64-linux' /mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/aarch64-linux/pyvenv/bin/meson introspect --targets --tests --benchmarks | /mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/aarch64-linux/pyvenv/bin/python3 -B scripts/mtest2make.py > Makefile.mtest [0/1] Running external command precache-functional (wrapped by meson to set env) make[1]: Entering directory '/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/aarch64-linux' make[1]: *** No rule to make target 'check-func-quick', needed by 'check-func'. Stop. make[1]: Leaving directory '/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/aarch64-linux' make: *** [/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/tests/Makefile.include:114: check-functional] Error 2 make: Leaving directory '/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/aarch64-linux' (Those errors are with this patch applied; without it the error is slightly different: make[1]: *** No rule to make target 'check-func'. Stop.) But that can't show up on a system-emulation target, because tests like generic/version are in the "quick" category. thanks -- PMM
On 18/09/2025 13.51, Peter Maydell wrote: > On Thu, 18 Sept 2025 at 12:40, Thomas Huth <thuth@redhat.com> wrote: >> >> From: Thomas Huth <thuth@redhat.com> >> >> If QEMU gets configured for a single target that does not have >> any thorough functional tests, "make check-functional" currently >> fails with the error message "No rule to make target 'check-func'". >> This happens because "check-func" only gets defined for thorough >> tests (quick ones get added to "check-func-quick" instead). >> Thus let's define a dummy target for this case, that simply >> depends on the quick tests. > > Tested-by: Peter Maydell <peter.maydell@linaro.org> > > We also have the opposite problem if there are no 'quick' > tests, which you can see if you try 'check-functional' > on a build configured with the aarch64-linux-user target only: Yes, looks like we have to define both targets in Makefile.include, just in case of such situations. I just sent a v2 to fix it. Thomas
© 2016 - 2025 Red Hat, Inc.