Skip to content

Commit e408049

Browse files
ahunter6acmel
authored andcommitted
perf test: test_intel_pt.sh: Fix return checking again
count_result() does not always reset ret=0 which means the value can spill into the next test result. Fix by explicitly setting it to zero between tests. Committer testing: # perf test "Miscellaneous Intel PT testing" 110: Miscellaneous Intel PT testing : Ok # Tested as well with: # perf test -v "Miscellaneous Intel PT testing" Fixes: fd9b45e ("perf test: test_intel_pt.sh: Fix return checking") Tested-by: Arnaldo Carvalho de Melo <[email protected]> Signed-off-by: Adrian Hunter <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Ian Rogers <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Namhyung Kim <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent e552b7b commit e408049

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

tools/perf/tests/shell/test_intel_pt.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -265,13 +265,12 @@ count_result()
265265
return
266266
fi
267267
err_cnt=$((err_cnt + 1))
268-
ret=0
269268
}
270269

271270
ret=0
272-
test_system_wide_side_band || ret=$? ; count_result $ret
273-
test_per_thread "" "" || ret=$? ; count_result $ret
274-
test_per_thread "k" "(incl. kernel) " || ret=$? ; count_result $ret
271+
test_system_wide_side_band || ret=$? ; count_result $ret ; ret=0
272+
test_per_thread "" "" || ret=$? ; count_result $ret ; ret=0
273+
test_per_thread "k" "(incl. kernel) " || ret=$? ; count_result $ret ; ret=0
275274

276275
cleanup
277276

0 commit comments

Comments
 (0)