Skip to contentSkip to conversation

testing/next: hot fixes (Makefile, gitlab, docker)

PATCH In review Alex Bennée 3 participants 12 messages Jun 1 Kbuild

lore
Share & tools
lore
#0 lore raw

cover testing/next: hot fixes (Makefile, gitlab, docker)

The last testing/next which enabled MacOS broke check-functional-FOO (which isn't directly called in GitLab CI). Revert the offending commit and replace with a more hacky workaround in the gitlab invocation itself.

Also include a fix to select the right docker fallback for building mips things.

Please review.

Alex.

Alex Bennée (3):
Revert "Makefile: include tests/Makefile.include before ninja
calculation"
gitlab: work around the inability to build targets for MacOS
configure: use debian-all-test-cross for mipsel tcg tests

 configure              | 2 +-
 Makefile               | 4 ++--
 .gitlab-ci.d/macos.yml | 3 +++
 3 files changed, 6 insertions(+), 3 deletions(-)
Signature · 1 line
2.47.3
#1 lore raw

PATCH 1/3 Revert "Makefile: include tests/Makefile.include before ninja calculation"

This reverts commit fd63125b9089610d63a53c11ff2fda6b53a2265d which broke the ability to run the check-functional-FOO series of tests.

We will need to try something else for the MacOS builds.

---
 Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Makefile +2 -2
index 829c51e364c..54547a37b1a 100644
@@ -45,8 +45,6 @@ include config-host.mak
 include Makefile.prereqs
 Makefile.prereqs: config-host.mak
 
-include $(SRC_PATH)/tests/Makefile.include
-
 # 0. ensure the build tree is okay
 
 # Check that we're not trying to do an out-of-tree build from
@@ -182,6 +180,8 @@ endif # config-host.mak does not exist
 
 SUBDIR_MAKEFLAGS=$(if $(V),,--no-print-directory --quiet)
 
+include $(SRC_PATH)/tests/Makefile.include
+
 all: recurse-all
 
 SUBDIR_RULES=$(foreach t, all clean distclean, $(addsuffix /$(t), $(SUBDIRS)))
Signature · 1 line
2.47.3
Reviewed-by on v1 1/3
#2 lore raw

Re: [PATCH 1/3] Revert "Makefile: include tests/Makefile.include before ninja calculation"

Quoted 24 lines · Alex Bennée

This reverts commit fd63125b9089610d63a53c11ff2fda6b53a2265d which broke the ability to run the check-functional-FOO series of tests.

We will need to try something else for the MacOS builds.

---
 Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Makefile +0 -2
index 829c51e364c..54547a37b1a 100644
@@ -45,8 +45,6 @@ include config-host.mak
 include Makefile.prereqs
 Makefile.prereqs: config-host.mak
 
-include $(SRC_PATH)/tests/Makefile.include
-
 # 0. ensure the build tree is okay
 
 # Check that we're not trying to do an out-of-tree build from

Makefile endif # config-host.mak does not exist · line 187

Quoted 8 lines
Makefile +2 -0
@@ -182,6 +180,8 @@ endif # config-host.mak does not exist
 
 SUBDIR_MAKEFLAGS=$(if $(V),,--no-print-directory --quiet)
 
+include $(SRC_PATH)/tests/Makefile.include
+
 all: recurse-all
 
 SUBDIR_RULES=$(foreach t, all clean distclean, $(addsuffix /$(t), $(SUBDIRS)))

Maybe regression can be fixed by moving step 4. at the end of Makefile, as suggested on the original thread.

But current reverts works also:

#3 lore raw

PATCH 2/3 gitlab: work around the inability to build targets for MacOS

In reply to Alex Bennée

Unfortunately a previous fix to ensure .ninja-goals was set for the TCG tests broken the ability to run check-functional-FOO. As we have now reverted we need a solution for the MacOS gitlab run. The simplest is to add an explicit make invocation to build the signed binaries before we run the tests.

---
 .gitlab-ci.d/macos.yml | 3 +++
 1 file changed, 3 insertions(+)
.gitlab-ci.d/macos.yml +3 -0
index f61750a3f4a..8366b4ad564 100644
@@ -29,6 +29,7 @@
     - cd build
     - ../configure --enable-werror $CONFIGURE_ARGS || { cat config.log meson-logs/meson-log.txt; exit 1; }
     - $MAKE -j$(sysctl -n hw.ncpu)
+    - for TARGET in $TEST_BINARIES ; do $MAKE $TARGET ; done
     - for TARGET in $TEST_TARGETS ; do $MAKE $TARGET ; done
 
 aarch64-macos-15-build:
@@ -44,6 +45,7 @@ aarch64-macos-15-build:
         --cross-prefix-i386=i686-elf-
         --cross-prefix-x86_64=x86_64-elf-
         --disable-plugins
+    TEST_BINARIES: qemu-system-aarch64 qemu-system-i386 qemu-system-x86_64
     TEST_TARGETS: check-unit run-tcg-tests-aarch64-softmmu run-tcg-tests-i386-softmmu run-tcg-tests-x86_64-softmmu
 
 aarch64-macos-26-build:
@@ -60,4 +62,5 @@ aarch64-macos-26-build:
         --cross-prefix-i386=i686-elf-
         --cross-prefix-x86_64=x86_64-elf-
         --disable-plugins
+    TEST_BINARIES: qemu-system-aarch64 qemu-system-i386 qemu-system-x86_64
     TEST_TARGETS: check-unit run-tcg-tests-aarch64-softmmu run-tcg-tests-i386-softmmu run-tcg-tests-x86_64-softmmu
Signature · 1 line
2.47.3
Reviewed-by on v1 2/3
#4 lore raw

Re: [PATCH 2/3] gitlab: work around the inability to build targets for MacOS

Quoted 32 lines · Alex Bennée

Unfortunately a previous fix to ensure .ninja-goals was set for the TCG tests broken the ability to run check-functional-FOO. As we have now reverted we need a solution for the MacOS gitlab run. The simplest is to add an explicit make invocation to build the signed binaries before we run the tests.

---
 .gitlab-ci.d/macos.yml | 3 +++
 1 file changed, 3 insertions(+)
.gitlab-ci.d/macos.yml +2 -0
index f61750a3f4a..8366b4ad564 100644
@@ -29,6 +29,7 @@
     - cd build
     - ../configure --enable-werror $CONFIGURE_ARGS || { cat config.log meson-logs/meson-log.txt; exit 1; }
     - $MAKE -j$(sysctl -n hw.ncpu)
+    - for TARGET in $TEST_BINARIES ; do $MAKE $TARGET ; done
     - for TARGET in $TEST_TARGETS ; do $MAKE $TARGET ; done
 
 aarch64-macos-15-build:
@@ -44,6 +45,7 @@ aarch64-macos-15-build:
         --cross-prefix-i386=i686-elf-
         --cross-prefix-x86_64=x86_64-elf-
         --disable-plugins
+    TEST_BINARIES: qemu-system-aarch64 qemu-system-i386 qemu-system-x86_64
     TEST_TARGETS: check-unit run-tcg-tests-aarch64-softmmu run-tcg-tests-i386-softmmu run-tcg-tests-x86_64-softmmu
 
 aarch64-macos-26-build:

.gitlab-ci.d/macos.yml aarch64-macos-26-build: · line 66

Quoted 5 lines
.gitlab-ci.d/macos.yml +1 -0
@@ -60,4 +62,5 @@ aarch64-macos-26-build:
         --cross-prefix-i386=i686-elf-
         --cross-prefix-x86_64=x86_64-elf-
         --disable-plugins
+    TEST_BINARIES: qemu-system-aarch64 qemu-system-i386 qemu-system-x86_64
     TEST_TARGETS: check-unit run-tcg-tests-aarch64-softmmu run-tcg-tests-i386-softmmu run-tcg-tests-x86_64-softmmu

Could make all be enough?

#5 lore raw

Re: [PATCH 2/3] gitlab: work around the inability to build targets for MacOS

Quoted 31 lines · Pierrick Bouvier
Quoted 30 lines · Alex Bennée

Unfortunately a previous fix to ensure .ninja-goals was set for the TCG tests broken the ability to run check-functional-FOO. As we have now reverted we need a solution for the MacOS gitlab run. The simplest is to add an explicit make invocation to build the signed binaries before we run the tests.

---
 .gitlab-ci.d/macos.yml | 3 +++
 1 file changed, 3 insertions(+)
.gitlab-ci.d/macos.yml +2 -0
index f61750a3f4a..8366b4ad564 100644
@@ -29,6 +29,7 @@
     - cd build
     - ../configure --enable-werror $CONFIGURE_ARGS || { cat config.log meson-logs/meson-log.txt; exit 1; }
     - $MAKE -j$(sysctl -n hw.ncpu)
+    - for TARGET in $TEST_BINARIES ; do $MAKE $TARGET ; done
     - for TARGET in $TEST_TARGETS ; do $MAKE $TARGET ; done
 
 aarch64-macos-15-build:
@@ -44,6 +45,7 @@ aarch64-macos-15-build:
         --cross-prefix-i386=i686-elf-
         --cross-prefix-x86_64=x86_64-elf-
         --disable-plugins
+    TEST_BINARIES: qemu-system-aarch64 qemu-system-i386 qemu-system-x86_64
     TEST_TARGETS: check-unit run-tcg-tests-aarch64-softmmu run-tcg-tests-i386-softmmu run-tcg-tests-x86_64-softmmu
 
Quoted 9 lines

.gitlab-ci.d/macos.yml aarch64-macos-26-build: · line 66

Quoted 7 lines
.gitlab-ci.d/macos.yml +1 -0
 aarch64-macos-26-build:
@@ -60,4 +62,5 @@ aarch64-macos-26-build:
         --cross-prefix-i386=i686-elf-
         --cross-prefix-x86_64=x86_64-elf-
         --disable-plugins
+    TEST_BINARIES: qemu-system-aarch64 qemu-system-i386 qemu-system-x86_64
     TEST_TARGETS: check-unit run-tcg-tests-aarch64-softmmu run-tcg-tests-i386-softmmu run-tcg-tests-x86_64-softmmu

Could make all be enough?

No - not without the goal having the signed binaries in them.

Quoted 2 lines
Signature · 2 lines
Alex Bennée
Virtualisation Tech Lead @ Linaro
#6 lore raw

Re: [PATCH 2/3] gitlab: work around the inability to build targets for MacOS

Quoted 43 lines · Alex Bennée
Quoted 31 lines · Pierrick Bouvier
Quoted 30 lines · Alex Bennée

Unfortunately a previous fix to ensure .ninja-goals was set for the TCG tests broken the ability to run check-functional-FOO. As we have now reverted we need a solution for the MacOS gitlab run. The simplest is to add an explicit make invocation to build the signed binaries before we run the tests.

---
 .gitlab-ci.d/macos.yml | 3 +++
 1 file changed, 3 insertions(+)
.gitlab-ci.d/macos.yml +2 -0
index f61750a3f4a..8366b4ad564 100644
@@ -29,6 +29,7 @@
     - cd build
     - ../configure --enable-werror $CONFIGURE_ARGS || { cat config.log meson-logs/meson-log.txt; exit 1; }
     - $MAKE -j$(sysctl -n hw.ncpu)
+    - for TARGET in $TEST_BINARIES ; do $MAKE $TARGET ; done
     - for TARGET in $TEST_TARGETS ; do $MAKE $TARGET ; done
 
 aarch64-macos-15-build:
@@ -44,6 +45,7 @@ aarch64-macos-15-build:
         --cross-prefix-i386=i686-elf-
         --cross-prefix-x86_64=x86_64-elf-
         --disable-plugins
+    TEST_BINARIES: qemu-system-aarch64 qemu-system-i386 qemu-system-x86_64
     TEST_TARGETS: check-unit run-tcg-tests-aarch64-softmmu run-tcg-tests-i386-softmmu run-tcg-tests-x86_64-softmmu
 
Quoted 9 lines

.gitlab-ci.d/macos.yml aarch64-macos-26-build: · line 66

Quoted 7 lines
.gitlab-ci.d/macos.yml +1 -0
 aarch64-macos-26-build:
@@ -60,4 +62,5 @@ aarch64-macos-26-build:
         --cross-prefix-i386=i686-elf-
         --cross-prefix-x86_64=x86_64-elf-
         --disable-plugins
+    TEST_BINARIES: qemu-system-aarch64 qemu-system-i386 qemu-system-x86_64
     TEST_TARGETS: check-unit run-tcg-tests-aarch64-softmmu run-tcg-tests-i386-softmmu run-tcg-tests-x86_64-softmmu

Could make all be enough?

Quoted 2 lines

No - not without the goal having the signed binaries in them.

Which comes back to my initial (unanswered question), why do we need signed binaries for running tcg tests?
Signed is only for HVF access.

Quoted 3 lines
Quoted 2 lines
#7 lore raw

Re: [PATCH 2/3] gitlab: work around the inability to build targets for MacOS

Quoted 44 lines · Pierrick Bouvier
Quoted 43 lines · Alex Bennée
Quoted 40 lines · Pierrick Bouvier
Quoted 32 lines · Alex Bennée

Unfortunately a previous fix to ensure .ninja-goals was set for the TCG tests broken the ability to run check-functional-FOO. As we have now reverted we need a solution for the MacOS gitlab run. The simplest is to add an explicit make invocation to build the signed binaries before we run the tests.

---
 .gitlab-ci.d/macos.yml | 3 +++
 1 file changed, 3 insertions(+)
.gitlab-ci.d/macos.yml +2 -0
index f61750a3f4a..8366b4ad564 100644
@@ -29,6 +29,7 @@
     - cd build
     - ../configure --enable-werror $CONFIGURE_ARGS || { cat config.log meson-logs/meson-log.txt; exit 1; }
     - $MAKE -j$(sysctl -n hw.ncpu)
+    - for TARGET in $TEST_BINARIES ; do $MAKE $TARGET ; done
     - for TARGET in $TEST_TARGETS ; do $MAKE $TARGET ; done
 
 aarch64-macos-15-build:
@@ -44,6 +45,7 @@ aarch64-macos-15-build:
         --cross-prefix-i386=i686-elf-
         --cross-prefix-x86_64=x86_64-elf-
         --disable-plugins
+    TEST_BINARIES: qemu-system-aarch64 qemu-system-i386 qemu-system-x86_64
     TEST_TARGETS: check-unit run-tcg-tests-aarch64-softmmu run-tcg-tests-i386-softmmu run-tcg-tests-x86_64-softmmu
 
 aarch64-macos-26-build:

.gitlab-ci.d/macos.yml aarch64-macos-26-build: · line 66

Quoted 5 lines
.gitlab-ci.d/macos.yml +1 -0
@@ -60,4 +62,5 @@ aarch64-macos-26-build:
         --cross-prefix-i386=i686-elf-
         --cross-prefix-x86_64=x86_64-elf-
         --disable-plugins
+    TEST_BINARIES: qemu-system-aarch64 qemu-system-i386 qemu-system-x86_64
     TEST_TARGETS: check-unit run-tcg-tests-aarch64-softmmu run-tcg-tests-i386-softmmu run-tcg-tests-x86_64-softmmu

Could make all be enough?

Quoted 6 lines
Quoted 2 lines

No - not without the goal having the signed binaries in them.

Which comes back to my initial (unanswered question), why do we need signed binaries for running tcg tests?
Signed is only for HVF access.

Because it exposes a bug in our build system: [email protected]

Ideally we should build the final product - whatever it may be - from make all. However I suspect we can't achieve that given the circular Makefile dependency until check-tcg is integrated into meson.

I will review you suggested path forwards tomorrow.

Quoted 4 lines
Quoted 4 lines
Quoted 3 lines
Signature · 2 lines
Alex Bennée
Virtualisation Tech Lead @ Linaro
#8 lore raw

Re: [PATCH 2/3] gitlab: work around the inability to build targets for MacOS

Quoted 53 lines · Alex Bennée
Quoted 44 lines · Pierrick Bouvier
Quoted 43 lines · Alex Bennée
Quoted 40 lines · Pierrick Bouvier
Quoted 32 lines · Alex Bennée

Unfortunately a previous fix to ensure .ninja-goals was set for the TCG tests broken the ability to run check-functional-FOO. As we have now reverted we need a solution for the MacOS gitlab run. The simplest is to add an explicit make invocation to build the signed binaries before we run the tests.

---
 .gitlab-ci.d/macos.yml | 3 +++
 1 file changed, 3 insertions(+)
.gitlab-ci.d/macos.yml +2 -0
index f61750a3f4a..8366b4ad564 100644
@@ -29,6 +29,7 @@
     - cd build
     - ../configure --enable-werror $CONFIGURE_ARGS || { cat config.log meson-logs/meson-log.txt; exit 1; }
     - $MAKE -j$(sysctl -n hw.ncpu)
+    - for TARGET in $TEST_BINARIES ; do $MAKE $TARGET ; done
     - for TARGET in $TEST_TARGETS ; do $MAKE $TARGET ; done
 
 aarch64-macos-15-build:
@@ -44,6 +45,7 @@ aarch64-macos-15-build:
         --cross-prefix-i386=i686-elf-
         --cross-prefix-x86_64=x86_64-elf-
         --disable-plugins
+    TEST_BINARIES: qemu-system-aarch64 qemu-system-i386 qemu-system-x86_64
     TEST_TARGETS: check-unit run-tcg-tests-aarch64-softmmu run-tcg-tests-i386-softmmu run-tcg-tests-x86_64-softmmu
 
 aarch64-macos-26-build:

.gitlab-ci.d/macos.yml aarch64-macos-26-build: · line 66

Quoted 5 lines
.gitlab-ci.d/macos.yml +1 -0
@@ -60,4 +62,5 @@ aarch64-macos-26-build:
         --cross-prefix-i386=i686-elf-
         --cross-prefix-x86_64=x86_64-elf-
         --disable-plugins
+    TEST_BINARIES: qemu-system-aarch64 qemu-system-i386 qemu-system-x86_64
     TEST_TARGETS: check-unit run-tcg-tests-aarch64-softmmu run-tcg-tests-i386-softmmu run-tcg-tests-x86_64-softmmu

Could make all be enough?

Quoted 6 lines
Quoted 2 lines

No - not without the goal having the signed binaries in them.

Which comes back to my initial (unanswered question), why do we need signed binaries for running tcg tests?
Signed is only for HVF access.

Quoted 8 lines

Because it exposes a bug in our build system: [email protected]

Ideally we should build the final product - whatever it may be - from make all. However I suspect we can't achieve that given the circular Makefile dependency until check-tcg is integrated into meson.

I will review you suggested path forwards tomorrow.

Thanks for the link.
Maybe we could always build the signed binaries on macos?

Quoted 5 lines
Quoted 4 lines
Quoted 4 lines
Quoted 3 lines
#9 lore raw

PATCH 3/3 configure: use debian-all-test-cross for mipsel tcg tests

In reply to Alex Bennée

Although we have had the mips compilers in all-test-cross for a while we had been surviving using the mipsel cross compiler image. However when that was removed we missed updating the container to use.

Fixes 366bb88e785 (buildsys: Remove MIPS cross containers)

Message-ID: <[email protected]>

---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
configure +1 -1
index e138d83bc9f..1ceb4d7ecc4 100755
@@ -1430,7 +1430,7 @@ probe_target_compiler() {
         container_image=debian-all-test-cross
         container_cross_prefix=aarch64-linux-gnu-
         ;;
-      alpha|hppa|m68k|mips|riscv64|sh4|sparc64)
+      alpha|hppa|m68k|mips|mipsel|riscv64|sh4|sparc64)
         container_image=debian-all-test-cross
         ;;
       mips64)
Signature · 1 line
2.47.3
Reviewed-by on v1 3/3
#10 lore raw

Re: [PATCH 3/3] configure: use debian-all-test-cross for mipsel tcg tests

Quoted 4 lines · Alex Bennée

Although we have had the mips compilers in all-test-cross for a while we had been surviving using the mipsel cross compiler image. However when that was removed we missed updating the container to use.

Quoted 9 lines
Fixes 366bb88e785 (buildsys: Remove MIPS cross containers)

Message-ID: <[email protected]>

---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Tested-by on the v1 series
#11 lore raw
In reply to Alex Bennée
Quoted 18 lines · Alex Bennée

The last testing/next which enabled MacOS broke check-functional-FOO (which isn't directly called in GitLab CI). Revert the offending commit and replace with a more hacky workaround in the gitlab invocation itself.

Also include a fix to select the right docker fallback for building mips things.

Please review.

Alex.

Alex Bennée (3):
Revert "Makefile: include tests/Makefile.include before ninja
calculation"
gitlab: work around the inability to build targets for MacOS
configure: use debian-all-test-cross for mipsel tcg tests

Quoted 5 lines
 configure              | 2 +-
 Makefile               | 4 ++--
 .gitlab-ci.d/macos.yml | 3 +++
 3 files changed, 6 insertions(+), 3 deletions(-)

host at least

What is the expectation wrt the MacOS builds? I'm not getting any runners (probably to the feature not being available for normal accounts), but no other problems seem to show up.