From: Bernhard Voelker Date: Thu, 16 Oct 2014 10:23:04 +0000 (+0200) Subject: tests: avoid false failure when comparing /proc files X-Git-Tag: v8.24~194 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f1466d180bee2daf682d49215247f00e400d5bae;p=thirdparty%2Fcoreutils.git tests: avoid false failure when comparing /proc files At least the MHz number in /proc/cpuinfo may change, thus leading to a false positive failure when comparing the expected against the actual output file. Use an invariant file instead: /proc/version. * tests/misc/head-c.sh: s/cpuinfo/version/ --- diff --git a/tests/misc/head-c.sh b/tests/misc/head-c.sh index 807e965446..1015c22952 100755 --- a/tests/misc/head-c.sh +++ b/tests/misc/head-c.sh @@ -44,7 +44,7 @@ esac # Make sure it works on funny files in /proc and /sys. -for file in /proc/cpuinfo /sys/kernel/profiling; do +for file in /proc/version /sys/kernel/profiling; do if test -r $file; then cp -f $file copy && head -c -1 copy > exp1 || framework_failure_