From: jacobly0 Date: Sun, 1 May 2022 16:10:56 +0000 (+0200) Subject: fix: Fix sporadic test.profiling failures (#1056) X-Git-Tag: v4.6.1~28 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dab7db87865555fd481b8bdc6cdcee93bbba7db3;p=thirdparty%2Fccache.git fix: Fix sporadic test.profiling failures (#1056) Using cut, which is always line-based, to remove bytes from a binary file can cause problems if the binary timestamp field happens to contain a newline character, which causes test.profiling to fail <1% of the time. Instead use tail which has a character mode that ignores newlines. --- diff --git a/test/suites/profiling.bash b/test/suites/profiling.bash index d2bb2be87..f9043b1a5 100644 --- a/test/suites/profiling.bash +++ b/test/suites/profiling.bash @@ -2,7 +2,7 @@ normalize_gcno_file() { local from="$1" local to="$2" - cut -b 13- "${from}" >"${to}" + tail -c +13 "${from}" >"${to}" }