X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=test%2Ftrace%2Ftest-trace.sh;h=746793c83bc38a3ddb68c24d8613fa921a340804;hb=806f86bd826e7a0fbefd4f34c550df400905992a;hp=3e8651ed60151b4aeea5541cf834d2b2868c184d;hpb=2c3dc792b6df16970077c0d64085e29f1f85d4c8;p=oweals%2Fu-boot.git diff --git a/test/trace/test-trace.sh b/test/trace/test-trace.sh index 3e8651ed60..746793c83b 100755 --- a/test/trace/test-trace.sh +++ b/test/trace/test-trace.sh @@ -45,7 +45,9 @@ check_results() { # between calls 2 and 3, where tracing is paused. # This code gets the sign of the difference between each number and # its predecessor. - counts="$(tr -d , <${tmp} | awk '/traced function calls/ { diff = $1 - upto; upto = $1; printf "%d ", diff < 0 ? -1 : (diff > 0 ? 1 : 0)}')" + counts="$(tr -d ',\r' <${tmp} | awk \ + '/traced function calls/ { diff = $1 - upto; upto = $1; \ + printf "%d ", diff < 0 ? -1 : (diff > 0 ? 1 : 0)}')" if [ "${counts}" != "1 1 0 1 " ]; then fail "trace collection error: ${counts}"