Skip to contentSkip to conversation

tests/tcg/s390x: Build tests with debian11

PATCH In review David Hildenbrand 4 participants 5 messages Feb 16, 2022 – Feb 28, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests/tcg/s390x: Build tests with debian11

We need a newer compiler to build upcoming tests that test for z15 features with -march=z15. So let's do it similar to arm64 and powerpc, using an environment based on debian11 to build tests only.

Cc Thomas Huth <[email protected]>
Cc Cornelia Huck <[email protected]>
Cc Richard Henderson <[email protected]>
Cc "Alex Bennée" <[email protected]>
Cc "Philippe Mathieu-Daudé" <[email protected]>
Cc Wainer dos Santos Moschetta <[email protected]>
Cc Beraldo Leal <[email protected]>
Cc David Miller <[email protected]>
---
 .gitlab-ci.d/container-cross.yml                    |  7 +++++++
 tests/docker/Makefile.include                       |  3 ++-
 .../dockerfiles/debian-s390x-test-cross.docker      | 13 +++++++++++++
 tests/tcg/configure.sh                              |  2 +-
 4 files changed, 23 insertions(+), 2 deletions(-)
 create mode 100644 tests/docker/dockerfiles/debian-s390x-test-cross.docker
.gitlab-ci.d/container-cross.yml +7 -0
index a3b5b90552..f8544750ea 100644
@@ -146,6 +146,13 @@ s390x-debian-cross-container:
   variables:
     NAME: debian-s390x-cross
 
+s390x-test-debian-cross-container:
+  extends: .container_job_template
+  stage: containers-layer2
+  needs: ['amd64-debian11-container']
+  variables:
+    NAME: debian-s390x-test-cross
+
 sh4-debian-cross-container:
   extends: .container_job_template
   stage: containers-layer2
tests/docker/Makefile.include +2 -1
index f1a0c5db7a..b77f6088d9 100644
@@ -210,6 +210,7 @@ docker-image-debian-arm64-test-cross: docker-image-debian11
 docker-image-debian-microblaze-cross: docker-image-debian10
 docker-image-debian-nios2-cross: docker-image-debian10
 docker-image-debian-powerpc-test-cross: docker-image-debian11
+docker-image-debian-s390x-test-cross: docker-image-debian11
 
 # These images may be good enough for building tests but not for test builds
 DOCKER_PARTIAL_IMAGES += debian-alpha-cross
@@ -219,7 +220,7 @@ DOCKER_PARTIAL_IMAGES += debian-hppa-cross
 DOCKER_PARTIAL_IMAGES += debian-m68k-cross debian-mips64-cross
 DOCKER_PARTIAL_IMAGES += debian-microblaze-cross
 DOCKER_PARTIAL_IMAGES += debian-nios2-cross
-DOCKER_PARTIAL_IMAGES += debian-sh4-cross debian-sparc64-cross
+DOCKER_PARTIAL_IMAGES += debian-s390x-test-cross debian-sh4-cross debian-sparc64-cross
 DOCKER_PARTIAL_IMAGES += debian-tricore-cross
 DOCKER_PARTIAL_IMAGES += debian-xtensa-cross
 DOCKER_PARTIAL_IMAGES += fedora-cris-cross
tests/docker/dockerfiles/debian-s390x-test-cross.docker new file +13 -0
new file mode 100644
index 0000000000..26435287b6
@@ -0,0 +1,13 @@
+#
+# Docker s390x cross-compiler target (tests only)
+#
+# This docker target builds on the debian Bullseye base image.
+#
+FROM qemu/debian11
+
+# Add the foreign architecture we want and install dependencies
+RUN dpkg --add-architecture s390x
+RUN apt update && \
+    DEBIAN_FRONTEND=noninteractive eatmydata \
+        apt install -y --no-install-recommends \
+        crossbuild-essential-s390x gcc-10-s390x-linux-gnu
tests/tcg/configure.sh +1 -1
index 763e9b6ad8..3f00f9307f 100755
@@ -185,7 +185,7 @@ for target in $target_list; do
       ;;
     s390x-*)
       container_hosts=x86_64
-      container_image=debian-s390x-cross
+      container_image=debian-s390x-test-cross
       container_cross_cc=s390x-linux-gnu-gcc
       ;;
     sh4-*)
Signature · 1 line
2.34.1
Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · David Hildenbrand

We need a newer compiler to build upcoming tests that test for z15 features with -march=z15. So let's do it similar to arm64 and powerpc, using an environment based on debian11 to build tests only.

Quoted 9 lines
Cc Thomas Huth <[email protected]>
Cc Cornelia Huck <[email protected]>
Cc Richard Henderson <[email protected]>
Cc "Alex Bennée" <[email protected]>
Cc "Philippe Mathieu-Daudé" <[email protected]>
Cc Wainer dos Santos Moschetta <[email protected]>
Cc Beraldo Leal <[email protected]>
Cc David Miller <[email protected]>

for now... I'll update the s390x image on my next posting.

Quoted 79 lines
---
 .gitlab-ci.d/container-cross.yml                    |  7 +++++++
 tests/docker/Makefile.include                       |  3 ++-
 .../dockerfiles/debian-s390x-test-cross.docker      | 13 +++++++++++++
 tests/tcg/configure.sh                              |  2 +-
 4 files changed, 23 insertions(+), 2 deletions(-)
 create mode 100644 tests/docker/dockerfiles/debian-s390x-test-cross.docker
.gitlab-ci.d/container-cross.yml +7 -0
index a3b5b90552..f8544750ea 100644
@@ -146,6 +146,13 @@ s390x-debian-cross-container:
   variables:
     NAME: debian-s390x-cross
 
+s390x-test-debian-cross-container:
+  extends: .container_job_template
+  stage: containers-layer2
+  needs: ['amd64-debian11-container']
+  variables:
+    NAME: debian-s390x-test-cross
+
 sh4-debian-cross-container:
   extends: .container_job_template
   stage: containers-layer2
tests/docker/Makefile.include +2 -1
index f1a0c5db7a..b77f6088d9 100644
@@ -210,6 +210,7 @@ docker-image-debian-arm64-test-cross: docker-image-debian11
 docker-image-debian-microblaze-cross: docker-image-debian10
 docker-image-debian-nios2-cross: docker-image-debian10
 docker-image-debian-powerpc-test-cross: docker-image-debian11
+docker-image-debian-s390x-test-cross: docker-image-debian11
 
 # These images may be good enough for building tests but not for test builds
 DOCKER_PARTIAL_IMAGES += debian-alpha-cross
@@ -219,7 +220,7 @@ DOCKER_PARTIAL_IMAGES += debian-hppa-cross
 DOCKER_PARTIAL_IMAGES += debian-m68k-cross debian-mips64-cross
 DOCKER_PARTIAL_IMAGES += debian-microblaze-cross
 DOCKER_PARTIAL_IMAGES += debian-nios2-cross
-DOCKER_PARTIAL_IMAGES += debian-sh4-cross debian-sparc64-cross
+DOCKER_PARTIAL_IMAGES += debian-s390x-test-cross debian-sh4-cross debian-sparc64-cross
 DOCKER_PARTIAL_IMAGES += debian-tricore-cross
 DOCKER_PARTIAL_IMAGES += debian-xtensa-cross
 DOCKER_PARTIAL_IMAGES += fedora-cris-cross
tests/docker/dockerfiles/debian-s390x-test-cross.docker new file +13 -0
new file mode 100644
index 0000000000..26435287b6
@@ -0,0 +1,13 @@
+#
+# Docker s390x cross-compiler target (tests only)
+#
+# This docker target builds on the debian Bullseye base image.
+#
+FROM qemu/debian11
+
+# Add the foreign architecture we want and install dependencies
+RUN dpkg --add-architecture s390x
+RUN apt update && \
+    DEBIAN_FRONTEND=noninteractive eatmydata \
+        apt install -y --no-install-recommends \
+        crossbuild-essential-s390x gcc-10-s390x-linux-gnu
tests/tcg/configure.sh +1 -1
index 763e9b6ad8..3f00f9307f 100755
@@ -185,7 +185,7 @@ for target in $target_list; do
       ;;
     s390x-*)
       container_hosts=x86_64
-      container_image=debian-s390x-cross
+      container_image=debian-s390x-test-cross
       container_cross_cc=s390x-linux-gnu-gcc
       ;;
     sh4-*)
Signature · 1 line
Alex Bennée
Reviewed-by Philippe Mathieu-Daudé on v1 1/1
#4 lore raw
In reply to David Hildenbrand
Quoted 13 lines · David Hildenbrand

We need a newer compiler to build upcoming tests that test for z15 features with -march=z15. So let's do it similar to arm64 and powerpc, using an environment based on debian11 to build tests only.

Cc Thomas Huth <[email protected]>
Cc Cornelia Huck <[email protected]>
Cc Richard Henderson <[email protected]>
Cc "Alex Bennée" <[email protected]>
Cc "Philippe Mathieu-Daudé" <[email protected]>
Cc Wainer dos Santos Moschetta <[email protected]>
Cc Beraldo Leal <[email protected]>
Cc David Miller <[email protected]>
Quoted 7 lines
---
  .gitlab-ci.d/container-cross.yml                    |  7 +++++++
  tests/docker/Makefile.include                       |  3 ++-
  .../dockerfiles/debian-s390x-test-cross.docker      | 13 +++++++++++++
  tests/tcg/configure.sh                              |  2 +-
  4 files changed, 23 insertions(+), 2 deletions(-)

create mode 100644 tests/docker/dockerfiles/debian-s390x-test-cross.docker

#2 lore raw
In reply to Alex Bennée
Quoted 17 lines · Alex Bennée
Quoted 4 lines · David Hildenbrand

We need a newer compiler to build upcoming tests that test for z15 features with -march=z15. So let's do it similar to arm64 and powerpc, using an environment based on debian11 to build tests only.

Quoted 9 lines
Cc Thomas Huth <[email protected]>
Cc Cornelia Huck <[email protected]>
Cc Richard Henderson <[email protected]>
Cc "Alex Bennée" <[email protected]>
Cc "Philippe Mathieu-Daudé" <[email protected]>
Cc Wainer dos Santos Moschetta <[email protected]>
Cc Beraldo Leal <[email protected]>
Cc David Miller <[email protected]>
Quoted 3 lines

for now... I'll update the s390x image on my next posting.

Ok, I saw that Alex now posted a patch "tests/docker: update debian-s390x-cross with lcitool", so I'll skip this one here for my next s390x pull request.

Thomas

#3 lore raw
Quoted 18 lines · Thomas Huth
Quoted 17 lines · Alex Bennée
Quoted 13 lines · David Hildenbrand

We need a newer compiler to build upcoming tests that test for z15 features with -march=z15. So let's do it similar to arm64 and powerpc, using an environment based on debian11 to build tests only.

Cc Thomas Huth <[email protected]>
Cc Cornelia Huck <[email protected]>
Cc Richard Henderson <[email protected]>
Cc "Alex Bennée" <[email protected]>
Cc "Philippe Mathieu-Daudé" <[email protected]>
Cc Wainer dos Santos Moschetta <[email protected]>
Cc Beraldo Leal <[email protected]>
Cc David Miller <[email protected]>
Quoted 7 lines
Quoted 3 lines

for now... I'll update the s390x image on my next posting.

Ok, I saw that Alex now posted a patch "tests/docker: update debian-s390x-cross with lcitool", so I'll skip this one here for my next s390x pull request.

Yes, makes sense!

Signature · 3 lines
Thanks,

David / dhildenb