kit

kit
git clone https://git.ryansepassi.com/git/kit.git
Log | Files | Refs | README

commit c1d79e86efb0844b9fac75978738700a21f1fd50
parent d153bd1b92682fae6eb8430662304e079f183e34
Author: Ryan Sepassi <rsepassi@gmail.com>
Date:   Mon,  1 Jun 2026 17:14:39 -0700

test: accept aa64 as an alias for aarch64 in exec/image helpers

The rt/bounce corpora pass the short canonical token aa64, while the
provisioning path uses the long aarch64. Add aa64 to every arch case arm in
exec_target.sh and test_images.sh so both forms map to the arm64
platform/image/runner.

Diffstat:
Mtest/lib/exec_target.sh | 31++++++++++++++++---------------
Mtest/lib/test_images.sh | 12+++++++-----
2 files changed, 23 insertions(+), 20 deletions(-)

diff --git a/test/lib/exec_target.sh b/test/lib/exec_target.sh @@ -24,7 +24,8 @@ # exec_target_supported TAG # Returns 0 if some runner is available for tag on this host. # -# Recognized tags: <arch>-<os> where arch is aarch64/x64/rv64 and os +# Recognized tags: <arch>-<os> where arch is aa64/x64/rv64 (the long form +# aarch64 is accepted as an alias for aa64) and os # is linux/macos. linux tags map to podman --platform strings and an # optional user-mode qemu binary. macos tags require a Darwin host whose # native arch matches; Mach-O cannot be loaded by the Linux kernel and @@ -85,10 +86,10 @@ _exec_target_os() { _exec_target_platform() { case "$(_exec_target_arch "$1")" in - aarch64) echo "linux/arm64" ;; - x64) echo "linux/amd64" ;; - rv64) echo "linux/riscv64" ;; - *) echo "" ;; + aa64|aarch64) echo "linux/arm64" ;; + x64) echo "linux/amd64" ;; + rv64) echo "linux/riscv64" ;; + *) echo "" ;; esac } @@ -151,10 +152,10 @@ _exec_target_native() { _exec_target_arch_matches_host() { local arch="$1" host_arch="$2" case "$arch" in - aarch64) [ "$host_arch" = "aarch64" ] || [ "$host_arch" = "arm64" ] ;; - x64) [ "$host_arch" = "x86_64" ] || [ "$host_arch" = "amd64" ] ;; - rv64) [ "$host_arch" = "riscv64" ] ;; - *) return 1 ;; + aa64|aarch64) [ "$host_arch" = "aarch64" ] || [ "$host_arch" = "arm64" ] ;; + x64) [ "$host_arch" = "x86_64" ] || [ "$host_arch" = "amd64" ] ;; + rv64) [ "$host_arch" = "riscv64" ] ;; + *) return 1 ;; esac } @@ -164,17 +165,17 @@ _exec_target_arch_matches_host() { # lookup (~30 s) on every `podman run` even when the local image matches. _exec_target_podman_native() { case "$(_exec_target_arch "$1")" in - aarch64) [ "${is_aarch64:-0}" -eq 1 ] ;; - x64) [ "$(uname -m 2>/dev/null)" = "x86_64" ] || \ - [ "$(uname -m 2>/dev/null)" = "amd64" ] ;; - rv64) [ "$(uname -m 2>/dev/null)" = "riscv64" ] ;; - *) return 1 ;; + aa64|aarch64) [ "${is_aarch64:-0}" -eq 1 ] ;; + x64) [ "$(uname -m 2>/dev/null)" = "x86_64" ] || \ + [ "$(uname -m 2>/dev/null)" = "amd64" ] ;; + rv64) [ "$(uname -m 2>/dev/null)" = "riscv64" ] ;; + *) return 1 ;; esac } _exec_target_qemu() { case "$(_exec_target_arch "$1")" in - aarch64) [ "${have_qemu:-0}" -eq 1 ] && echo "${QEMU_BIN:-}" ;; + aa64|aarch64) [ "${have_qemu:-0}" -eq 1 ] && echo "${QEMU_BIN:-}" ;; x64) # No qemu-user fallback for x64 in current harnesses. echo "" ;; rv64) # qemu-riscv64 user-mode is the easiest way to exec diff --git a/test/lib/test_images.sh b/test/lib/test_images.sh @@ -27,13 +27,15 @@ : "${RUN_X64_IMAGE:=docker.io/library/alpine@sha256:4d889c14e7d5a73929ab00be2ef8ff22437e7cbc545931e52554a7b00e123d8b}" : "${RUN_RV64_IMAGE:=docker.io/library/alpine@sha256:667d07bf2f6239f094f64b5682c8ffbe24c9f3139b1fb854f85caf931a3d7439}" -# arch token ("aarch64"/"x64"/"rv64") -> pinned image reference. +# arch token ("aa64"/"aarch64"/"x64"/"rv64") -> pinned image reference. Both the +# short canonical token (aa64, used by the rt/bounce corpora) and the long form +# (aarch64, used by the provisioning path) map to the arm64 image. cfree_test_image_for_arch() { case "$1" in - aarch64) printf '%s' "$RUN_AARCH64_IMAGE" ;; - x64) printf '%s' "$RUN_X64_IMAGE" ;; - rv64) printf '%s' "$RUN_RV64_IMAGE" ;; - *) printf '' ;; + aa64|aarch64) printf '%s' "$RUN_AARCH64_IMAGE" ;; + x64) printf '%s' "$RUN_X64_IMAGE" ;; + rv64) printf '%s' "$RUN_RV64_IMAGE" ;; + *) printf '' ;; esac }