tests: cross-build for arm64 and actually run it - #290
Merged
Conversation
The release has published an arm64 archive since 0.3.0 and nothing had ever executed one. CI builds it on a native arm64 runner and ships it, so a binary that was broken on that architecture would reach a user before anyone ran it; the checks so far went as far as the ELF header and the linked libraries. make test-arm64 cross-compiles the multicall binary and runs it under qemu user-mode emulation against a prefixed tree: useradd with a home and a supplementary group, chpasswd producing a SHA-512 hash, chage computing its dates, gpasswd adding a member, usermod renaming across files, userdel -r, and pwck reading back what the others wrote. Eighteen assertions, all passing on the current tree. Emulation is enough for what actually differs across architectures -- integer widths, struct layouts, and the crypt and PAM FFI boundaries -- and it needs no arm64 machine and no binfmt handler on the host, which rootless Docker cannot register anyway. The cross toolchain is installed by the target rather than baked into the image: it is 32 packages, and every other job would carry them for a check that runs occasionally. Also confirmed the published 0.4.0 arm64 archive runs, by the same route.
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.
The release has published an arm64 archive since 0.3.0 and nothing had ever
executed one. CI builds it on a native arm64 runner and ships it, so a binary
broken on that architecture would reach a user before anyone ran it. My checks
until now went as far as the ELF header and the linked libraries — which says
the file is arm64, not that it works.
make test-arm64cross-compiles the multicall binary and runs it under qemuuser-mode emulation against a prefixed tree:
Emulation is enough for what actually differs across architectures — integer
widths, struct layouts, and the
cryptand PAM FFI boundaries — and it needsneither an arm64 machine nor a binfmt handler on the host, which rootless
Docker cannot register anyway.
The cross toolchain is installed by the target rather than baked into the
image: it is 32 packages, and every other job would carry them for a check that
runs occasionally.
I also confirmed the published 0.4.0 arm64 archive runs, by the same route:
--versionand all fifteen applets.