[PATCH for 10.1-rc2] tests/docker: fix docker-all-test-cross

Alex Bennée posted 1 patch 3 months, 1 week ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20250804104308.250949-1-alex.bennee@linaro.org
Maintainers: "Alex Bennée" <alex.bennee@linaro.org>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Thomas Huth <thuth@redhat.com>
tests/docker/dockerfiles/debian-all-test-cross.docker | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
[PATCH for 10.1-rc2] tests/docker: fix docker-all-test-cross
Posted by Alex Bennée 3 months, 1 week ago
It turns out you can't easily expand an ENV var across multiple steps
in a dockerfile. This meant we silently dropped the architectures we
should have even on amd64 hosts. As the updated AVAILABLE_COMPILERS is
only needed for the following apt install line just merge them.

Fixes: 6da616bb170 (tests/docker: handle host-arch selection for all-test-cross)
Suggested-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/docker/dockerfiles/debian-all-test-cross.docker | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/tests/docker/dockerfiles/debian-all-test-cross.docker b/tests/docker/dockerfiles/debian-all-test-cross.docker
index ef69bbc8a51..420a4e33e60 100644
--- a/tests/docker/dockerfiles/debian-all-test-cross.docker
+++ b/tests/docker/dockerfiles/debian-all-test-cross.docker
@@ -62,9 +62,7 @@ RUN if dpkg-architecture -e amd64; then \
   export AVAILABLE_COMPILERS="${AVAILABLE_COMPILERS} gcc-powerpc64-linux-gnu libc6-dev-ppc64-cross"; \
   export AVAILABLE_COMPILERS="${AVAILABLE_COMPILERS} gcc-sparc64-linux-gnu libc6-dev-sparc64-cross"; \
   fi && \
-  echo "compilers: ${AVAILABLE_COMPILERS}"
-
-RUN DEBIAN_FRONTEND=noninteractive eatmydata \
+  DEBIAN_FRONTEND=noninteractive eatmydata \
         apt install -y --no-install-recommends \
         ${AVAILABLE_COMPILERS} && \
         dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt
-- 
2.47.2


Re: [PATCH for 10.1-rc2] tests/docker: fix docker-all-test-cross
Posted by Manos Pitsidianakis 3 months, 1 week ago
On Mon, Aug 4, 2025 at 1:43 PM Alex Bennée <alex.bennee@linaro.org> wrote:
>
> It turns out you can't easily expand an ENV var across multiple steps
> in a dockerfile. This meant we silently dropped the architectures we
> should have even on amd64 hosts. As the updated AVAILABLE_COMPILERS is
> only needed for the following apt install line just merge them.
>
> Fixes: 6da616bb170 (tests/docker: handle host-arch selection for all-test-cross)
> Suggested-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>  tests/docker/dockerfiles/debian-all-test-cross.docker | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/tests/docker/dockerfiles/debian-all-test-cross.docker b/tests/docker/dockerfiles/debian-all-test-cross.docker
> index ef69bbc8a51..420a4e33e60 100644
> --- a/tests/docker/dockerfiles/debian-all-test-cross.docker
> +++ b/tests/docker/dockerfiles/debian-all-test-cross.docker
> @@ -62,9 +62,7 @@ RUN if dpkg-architecture -e amd64; then \
>    export AVAILABLE_COMPILERS="${AVAILABLE_COMPILERS} gcc-powerpc64-linux-gnu libc6-dev-ppc64-cross"; \
>    export AVAILABLE_COMPILERS="${AVAILABLE_COMPILERS} gcc-sparc64-linux-gnu libc6-dev-sparc64-cross"; \
>    fi && \
> -  echo "compilers: ${AVAILABLE_COMPILERS}"
> -
> -RUN DEBIAN_FRONTEND=noninteractive eatmydata \
> +  DEBIAN_FRONTEND=noninteractive eatmydata \
>          apt install -y --no-install-recommends \
>          ${AVAILABLE_COMPILERS} && \
>          dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt
> --
> 2.47.2
>

Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Re: [PATCH for 10.1-rc2] tests/docker: fix docker-all-test-cross
Posted by Richard Henderson 3 months, 1 week ago
On 8/4/25 20:43, Alex Bennée wrote:
> It turns out you can't easily expand an ENV var across multiple steps
> in a dockerfile. This meant we silently dropped the architectures we
> should have even on amd64 hosts. As the updated AVAILABLE_COMPILERS is
> only needed for the following apt install line just merge them.
> 
> Fixes: 6da616bb170 (tests/docker: handle host-arch selection for all-test-cross)
> Suggested-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>   tests/docker/dockerfiles/debian-all-test-cross.docker | 4 +---
>   1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/tests/docker/dockerfiles/debian-all-test-cross.docker b/tests/docker/dockerfiles/debian-all-test-cross.docker
> index ef69bbc8a51..420a4e33e60 100644
> --- a/tests/docker/dockerfiles/debian-all-test-cross.docker
> +++ b/tests/docker/dockerfiles/debian-all-test-cross.docker
> @@ -62,9 +62,7 @@ RUN if dpkg-architecture -e amd64; then \
>     export AVAILABLE_COMPILERS="${AVAILABLE_COMPILERS} gcc-powerpc64-linux-gnu libc6-dev-ppc64-cross"; \
>     export AVAILABLE_COMPILERS="${AVAILABLE_COMPILERS} gcc-sparc64-linux-gnu libc6-dev-sparc64-cross"; \
>     fi && \
> -  echo "compilers: ${AVAILABLE_COMPILERS}"
> -
> -RUN DEBIAN_FRONTEND=noninteractive eatmydata \
> +  DEBIAN_FRONTEND=noninteractive eatmydata \
>           apt install -y --no-install-recommends \
>           ${AVAILABLE_COMPILERS} && \
>           dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~