From bbcd8108b28e2031fccdfde1ecd667b8abc067d8 Mon Sep 17 00:00:00 2001 From: Nicolas De Loof Date: Thu, 13 Aug 2026 11:36:45 +0200 Subject: [PATCH] test: detect containerd image store directly in multi-arch error test The 'builder does not support multi-arch' subtest expects the docker driver to reject multi-platform builds, and skipped itself by checking that buildx lists both linux/amd64 and linux/arm64. That heuristic misses containerd-store hosts without binfmt emulation (plain CI runners): only native platforms are listed even though the driver happily cross-builds, so the build succeeds and the test fails with 'ExitCode was 0 expected 1'. Skip on the containerd image store directly, detected from the daemon's DriverStatus. Signed-off-by: Nicolas De Loof --- pkg/e2e/build_test.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkg/e2e/build_test.go b/pkg/e2e/build_test.go index ef2d09244..d917336ba 100644 --- a/pkg/e2e/build_test.go +++ b/pkg/e2e/build_test.go @@ -410,6 +410,15 @@ func TestBuildPlatformsStandardErrors(t *testing.T) { }) t.Run("builder does not support multi-arch", func(t *testing.T) { + // The docker driver supports multi-platform builds whenever the + // daemon uses the containerd image store, so this error won't occur. + // Detect the store directly: the buildx `Platforms:` heuristic below + // misses it on hosts without binfmt emulation, where only native + // platforms are listed even though cross-building works. + info := c.RunDockerCmd(t, "info", "-f", "{{json .DriverStatus}}") + if strings.Contains(info.Stdout(), "io.containerd.snapshotter.v1") { + t.Skip("docker driver supports multi-platform builds (containerd image store enabled)") + } // Docker Desktop with containerd image store uses the docker driver // but supports multi-platform builds, so this error won't occur. inspect := c.RunDockerCmd(t, "buildx", "inspect", "--bootstrap")