Subject: bug#60339: closed (Re: bug#60339: tests/cp/proc-short-read.sh may fail due to architecture / case sensitivity assumption)

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 26 Dec 2022 17:13:02 +0000

Your bug report

#60339: tests/cp/proc-short-read.sh may fail due to architecture / case sensitivity assumption

which was filed against the coreutils package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
60339: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=60339
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#60339: tests/cp/proc-short-read.sh may fail due to architecture / case sensitivity assumption
From: Paul Eggert <[email-masked]>
To: Zach van Rijn <[email-masked]>
Cc: [email-masked]
Date: Mon, 26 Dec 2022 09:12:48 -0800
List-Id: <debbugs-submit.debbugs.gnu.org>

I installed the fix. [Tt][Hh][Aa][Nn][Kk][Ss][.]

Subject: tests/cp/proc-short-read.sh may fail due to architecture / case sensitivity assumption
From: Zach van Rijn <[email-masked]>
To: [email-masked]
Date: Mon, 26 Dec 2022 08:38:29 -0600
List-Id: <debbugs-submit.debbugs.gnu.org>

The test tests/cp/proc-short-read.sh attempts to remove common
differences in the output of /proc/cpuinfo:

    # adjust varying parts
    sed '/MHz/d; /bogomips/d;' 1 > proc.cp || framework_failure_
    sed '/MHz/d; /bogomips/d;' 2 > proc.cat || framework_failure_

However the string "bogomips" may differ in capitalization across
different architectures [1].

Testing on a big.LITTLE system uncovered this assumption.

    Linux DietPi 5.4.225-odroidxu4 #22.11.1 SMP PREEMPT Wed Nov
    30 10:55:16 UTC 2022 armv7l GNU/Linux

Still present as of 9581c4b59d2e11cd090613cd300a833b4441d2b5.

Proposed patch attached, which aims to be minimally invasive.

References:

[1]: https://git.adelielinux.org/adelie/packages/-/issues/943
diff --git a/tests/cp/proc-short-read.sh b/tests/cp/proc-short-read.sh
index bedb08e06..89dba8d3d 100755
--- a/tests/cp/proc-short-read.sh
+++ b/tests/cp/proc-short-read.sh
@@ -28,8 +28,8 @@ cp $proc_large 1    || fail=1
 cat $proc_large > 2 || fail=1
 
 # adjust varying parts
-sed '/MHz/d; /bogomips/d;' 1 > proc.cp || framework_failure_
-sed '/MHz/d; /bogomips/d;' 2 > proc.cat || framework_failure_
+sed '/MHz/d; /[Bb][Oo][Gg][Oo][Mm][Ii][Pp][Ss]/d;' 1 > proc.cp || framework_failure_
+sed '/MHz/d; /[Bb][Oo][Gg][Oo][Mm][Ii][Pp][Ss]/d;' 2 > proc.cat || framework_failure_
 
 compare proc.cp proc.cat || fail=1