Thanks for reporting that glitch with busybox. I installed the attached to work around it.
From e77940b44f8804ca7b59606af2f9318d5bc954e2 Mon Sep 17 00:00:00 2001
From: Paul Eggert <egg...@cs.ucla.edu>
Date: Sun, 27 Apr 2025 13:28:20 -0700
Subject: [PATCH] tests: port to Busybox od

Problem reported by Xinjian Ma (Bug#78084).
* tests/reference: Skip this test if od does not support -An -tx1
as POSIX requires. Also, omit an unnecessary use of tr, since
the $(...) already does that.
---
 tests/reference | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/reference b/tests/reference
index add962e..2b36648 100755
--- a/tests/reference
+++ b/tests/reference
@@ -28,6 +28,8 @@
 
 . "${srcdir=.}/init.sh"; path_prepend_ ..
 
+od -An -tx1 </dev/null || skip_ "od does not support -An and -tx1"
+
 fail=0
 
 cat <<EOF > exp || framework_failure_
@@ -40,10 +42,8 @@ zzzzzzzzzzz: 1f 8b 08 00 00 00 00 00 00 03 ab aa 82 03 00 55 97 5b a7 0b 00 00 0
 EOF
 
 # Ensure that compressing these simple strings always produces the same bytes.
-# If using "od" is not portable enough, consider using this:
-# perl -ne 'printf "%02x ", ord($_) for split //'
 for i in '' a b c yyy zzzzzzzzzzz; do
-  echo $i: $(printf %s "$i" | gzip | od -An -tx1 | tr -d '\n')
+  echo $i: $(printf %s "$i" | gzip | od -An -tx1)
 done > out || framework_failure_
 
 compare exp out || fail=1
-- 
2.48.1

Reply via email to