test: pass the drop-motion and install.sh signature tests on Apple silicon

Vanilla's Math.sin is HotSpot's intrinsic, which rounds one of the drop
test's throws a bit lower on AArch64 than on x86-64; a vanilla 26.3 run
on an M-series Mac gives the AArch64 value. The install.sh fixture only
holds the Linux x86-64 archive and ran the cases with /usr/bin's
OpenSSL, LibreSSL on macOS: a fake uname picks that archive, and the
cases get the OpenSSL 3 the script checked for.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Ian WorleyandClaude Opus 5.5 committed 2026-11-05 16:41:36 -06:00
1 parent 6d99e14ff0
commit b27965b4ca
2 files changed
+16 -2

No files matched your search

+7 -1
View File
@@ -120,7 +120,13 @@ mod drop_motion_tests {
[
-4627867408251048793,
4597245257657090048,
4597448471913462163,
// Vanilla's `Math.sin` is HotSpot's intrinsic, which rounds this
// one a bit lower on AArch64 than on x86-64 (`jmath`).
if cfg!(target_arch = "aarch64") {
4597448471913462162
} else {
4597448471913462163
},
],
),
(
+9 -1
View File
@@ -67,6 +67,12 @@ esac
if [ -n "$out" ]; then cp "$src" "$out"; else cat "$src"; fi
CURL
chmod +x "$W/fake/curl"
# The fake uname: install.sh picks the Linux x86-64 archive, the one these releases hold, on any machine.
cat > "$W/fake/uname" <<'UNAME'
#!/bin/sh
case "$1" in -m) echo x86_64 ;; *) echo Linux ;; esac
UNAME
chmod +x "$W/fake/uname"
# install.sh with the throwaway public key in place of the release key.
with_key() { # dir -> prints path of the patched copy
@@ -86,7 +92,9 @@ edit() { # sed-expression file
sed "$1" "$2" > "$2.tmp" && mv "$2.tmp" "$2"
}
mkdir -p "$W/home"
P=/usr/bin:/bin
# The cases get the OpenSSL 3 checked above, wherever it is: macOS's /usr/bin has LibreSSL.
mkdir "$W/ssl"; ln -s "$(command -v openssl)" "$W/ssl/openssl"
P=$W/ssl:/usr/bin:/bin
# 1. Good signature, a Nightly: SHA256SUMS.v2.sig signed for the version its title names.
NIGHTLY=nightly-2026-11-03-0c02067