build(pillar): fix make test on macOS M-series with HV=k#5846
Draft
andrewd-zededa wants to merge 1 commit intolf-edge:masterfrom
Draft
build(pillar): fix make test on macOS M-series with HV=k#5846andrewd-zededa wants to merge 1 commit intolf-edge:masterfrom
andrewd-zededa wants to merge 1 commit intolf-edge:masterfrom
Conversation
Contributor
Author
|
The Darwin bypass in build-docker-test-dependencies is not the best, working to remove it. |
eac8749 to
f2f95cc
Compare
Contributor
Author
|
Ok, Darwin bypass removed, top level makefile target comment updated to show macOS make motivated issue |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #5846 +/- ##
==========================================
+ Coverage 19.52% 29.09% +9.56%
==========================================
Files 19 25 +6
Lines 3021 4523 +1502
==========================================
+ Hits 590 1316 +726
- Misses 2310 2947 +637
- Partials 121 260 +139 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
f2f95cc to
5ec76aa
Compare
Contributor
Author
|
Rebased on master |
rene
reviewed
Apr 23, 2026
5ec76aa to
3bef59f
Compare
GNU Make 3.81 (macOS) selects pattern rules by first-match, so pillar-%
wins over %-cache-export-docker-load for the target pillar-cache-export-
docker-load. Add an explicit rule to the top-level Makefile that beats
all pattern rules in every Make version.
Pass --build-yml to linuxkit in pkg/pillar/Makefile so HV=k selects
build-k.yml instead of the default build.yml, and fix the test tag
from kubevirt to k.
Pass --build-arg BUILDARCH=$(ZARCH) when building the test image so
the Dockerfile stage selector (target-${TARGETARCH}-build-${BUILDARCH})
resolves to the native build path instead of the cross-compilation path.
The cross-compiled stages produce a container whose arch differs from
ZARCH, so they can never execute ZARCH test binaries regardless of host.
Master behavior (no BUILDARCH override):
Host ZARCH Stage Image Result
---------- ----- ----------------------- ----- ------
Linux AMD64 amd64 target-amd64-build-amd64 AMD64 pass
macOS ARM64 arm64 target-arm64-build-arm64 ARM64 pass
macOS ARM64 amd64 target-amd64-build-arm64 ARM64 FAIL (AMD64 ELFs in ARM64 container)
Linux AMD64 arm64 target-arm64-build-amd64 AMD64 FAIL (ARM64 ELFs in AMD64 container)
With --build-arg BUILDARCH=$(ZARCH):
Host ZARCH Stage Image Result
---------- ----- ----------------------- ----------- ------
Linux AMD64 amd64 target-amd64-build-amd64 AMD64 pass (same)
macOS ARM64 arm64 target-arm64-build-arm64 ARM64 pass (same)
macOS ARM64 amd64 target-amd64-build-amd64 AMD64/Rosetta pass (fixed)
Linux AMD64 arm64 target-arm64-build-arm64 ARM64/QEMU pass (fixed)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Andrew Durbin <andrewd@zededa.com>
3bef59f to
5c34c87
Compare
Contributor
Author
|
rebased on recent master |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add explicit pillar-cache-export-docker-load rule to the top-level
Makefile to fix GNU Make 3.81 (macOS) selecting the pillar-% pattern
rule over %-cache-export-docker-load via first-match. GNU Make 4.x
(Linux) uses shortest-stem and picks correctly; an explicit rule wins
in all versions.
Also fix pkg/pillar make test for HV=k on macOS ARM64: pass --build-yml
to select the kube build yml, clear cross-compilation env vars so go test
runs natively in the ARM64 container instead of producing AMD64 ELFs that
Rosetta cannot execute.
PR dependencies
None
How to test and validate this PR
make ZARCH=amd64 HV=k testChangelog notes
Fix pillar make test for m series Mac, hv=k ZARCH=amd64
PR Backports
Checklist
And the last but not least:
check them.
Please, check the boxes above after submitting the PR in interactive mode.