Skip to content

Commit

Permalink
fix: Fix sporadic test.profiling failures (ccache#1056)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jacobly0 authored May 1, 2022
1 parent f2ff4b9 commit dab7db8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/suites/profiling.bash
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
normalize_gcno_file() {
local from="$1"
local to="$2"
cut -b 13- "${from}" >"${to}"
tail -c +13 "${from}" >"${to}"
}


Expand Down

0 comments on commit dab7db8

Please sign in to comment.