From 89e2f207805338cd61f403b6144a82b808a2236d Mon Sep 17 00:00:00 2001 From: Piotr Kubaj Date: Fri, 18 Sep 2026 12:48:07 +0200 Subject: [PATCH] tests/od: fix two tests on big-endian hosts test_suppress_duplicates and test_od_options_after_filename dump multi-byte units (-x, -O, -t x2) and compare the result against little-endian expected output without selecting a byte order. They fail on big-endian hosts, where od correctly defaults to the native order: expected: " 1c68 fdbb\n" actual: " 681c bbfd\n" Pass --endian=little like the other tests in this file do. In test_od_options_after_filename the option goes after the file name, in keeping with what that test exercises. Found on FreeBSD/powerpc64. --- tests/by-util/test_od.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/by-util/test_od.rs b/tests/by-util/test_od.rs index 6da0c4964e0..8be3893c487 100644 --- a/tests/by-util/test_od.rs +++ b/tests/by-util/test_od.rs @@ -580,6 +580,7 @@ fn test_suppress_duplicates() { .arg("-w4") .arg("-O") .arg("-x") + .arg("--endian=little") .run_piped_stdin(&input[..]) .success() .stdout_only(expected_output); @@ -1272,6 +1273,7 @@ fn test_od_options_after_filename() { .arg("-An") .arg("-t") .arg("x2") + .arg("--endian=little") .succeeds() .stdout_only(" 1c68 fdbb\n"); }