summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjacobly0 <jacobly0@users.noreply.github.com>2022-05-01 18:10:56 +0200
committerGitHub <noreply@github.com>2022-05-01 18:10:56 +0200
commitdab7db87865555fd481b8bdc6cdcee93bbba7db3 (patch)
tree6374dba0259392157fa2e55706497f3ef9a3c10b
parentf2ff4b90b8767ea0bc2d49162d85d5f08d72f24c (diff)
downloadccache-dab7db87865555fd481b8bdc6cdcee93bbba7db3.tar.gz
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.
-rw-r--r--test/suites/profiling.bash2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/suites/profiling.bash b/test/suites/profiling.bash
index d2bb2be8..f9043b1a 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}"
}