aboutsummaryrefslogtreecommitdiffhomepage
path: root/cmd
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-11-08 19:43:13 +0900
committerOphestra <cat@gensokyo.uk>2026-11-08 19:43:13 +0900
commit8b1127f6eb5aca0b59f0031f2a8dedf736c82d46 (patch)
treebd06229db6912f7660883cb80799d00096587353 /cmd
parent8e27edf2b7b4265e20fec14bc608ea8fc5e51914 (diff)
cmd/hakurei/testsuite: format expected ldd output
This message is different between the musl and glibc implementations. This change assumes the non-Rosa test suite uses glibc, since it is only ran on the Gitea actions runner. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/hakurei/testsuite/main.go2
-rw-r--r--cmd/hakurei/testsuite/prefix.go6
-rw-r--r--cmd/hakurei/testsuite/prefix_rosa.go6
3 files changed, 13 insertions, 1 deletions
diff --git a/cmd/hakurei/testsuite/main.go b/cmd/hakurei/testsuite/main.go
index bb83aac0..eb3eafc4 100644
--- a/cmd/hakurei/testsuite/main.go
+++ b/cmd/hakurei/testsuite/main.go
@@ -192,7 +192,7 @@ func main() {
pathname := prefix.Append("bin", name)
testsuite.AssertOutput(
"validating "+pathname.String()+" static linking",
- "", "\tnot a dynamic executable\n",
+ "", lddMessage(name),
)(testsuite.MustOutput(
ctx, nil, nil, hst.ExitFailure,
"validate "+pathname.String()+" static linking",
diff --git a/cmd/hakurei/testsuite/prefix.go b/cmd/hakurei/testsuite/prefix.go
index 03cf6fd7..5fef7c8f 100644
--- a/cmd/hakurei/testsuite/prefix.go
+++ b/cmd/hakurei/testsuite/prefix.go
@@ -6,3 +6,9 @@ import "hakurei.app/fhs"
// prefix is the hakurei installation prefix.
var prefix = fhs.AbsUsr.Append("local")
+
+// lddMessage returns the string written to stderr by glibc while validating
+// hakurei.
+func lddMessage(_ string) string {
+ return "\tnot a dynamic executable\n"
+}
diff --git a/cmd/hakurei/testsuite/prefix_rosa.go b/cmd/hakurei/testsuite/prefix_rosa.go
index 4a00367f..dda93178 100644
--- a/cmd/hakurei/testsuite/prefix_rosa.go
+++ b/cmd/hakurei/testsuite/prefix_rosa.go
@@ -6,3 +6,9 @@ import "hakurei.app/check"
// prefix is the hakurei installation prefix on Rosa OS.
var prefix = check.MustAbs("/system")
+
+// lddMessage returns the string written to stderr by musl while validating
+// hakurei on Rosa OS.
+func lddMessage(name string) string {
+ return "ldd: /system/bin/" + name + ": Not a valid dynamic program\n"
+}