From dab7db87865555fd481b8bdc6cdcee93bbba7db3 Mon Sep 17 00:00:00 2001 From: jacobly0 Date: Sun, 1 May 2022 18:10:56 +0200 Subject: [PATCH] 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. --- test/suites/profiling.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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}" } -- 2.47.2