mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 02:24:24 +02:00
perf test shell lock_contention: Extra debug diagnostics
In test_record_concurrent, as stderr is sent to /dev/null, error messages are hidden. Change this to gather the error messages and dump them on failure. Some minor sh->bash changes to add some more diagnostics in trap_cleanup. Reviewed-by: James Clark <james.clark@linaro.org> Signed-off-by: Ian Rogers <irogers@google.com> Acked-by: Namhyung Kim <namhyung@kernel.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Athira Rajeev <atrajeev@linux.ibm.com> Cc: Blake Jones <blakejones@google.com> Cc: Chun-Tse Shao <ctshao@google.com> Cc: Collin Funk <collin.funk1@gmail.com> Cc: Howard Chu <howardchu95@gmail.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jan Polensky <japo@linux.ibm.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Li Huafei <lihuafei1@huawei.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Nam Cao <namcao@linutronix.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Steinar H. Gunderson <sesse@google.com> Cc: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/r/20250821163820.1132977-5-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
2354479026
commit
8b93f8933d
|
|
@ -7,14 +7,17 @@ set -e
|
|||
err=0
|
||||
perfdata=$(mktemp /tmp/__perf_test.perf.data.XXXXX)
|
||||
result=$(mktemp /tmp/__perf_test.result.XXXXX)
|
||||
errout=$(mktemp /tmp/__perf_test.errout.XXXXX)
|
||||
|
||||
cleanup() {
|
||||
rm -f ${perfdata}
|
||||
rm -f ${result}
|
||||
rm -f ${errout}
|
||||
trap - EXIT TERM INT
|
||||
}
|
||||
|
||||
trap_cleanup() {
|
||||
echo "Unexpected signal in ${FUNCNAME[1]}"
|
||||
cleanup
|
||||
exit ${err}
|
||||
}
|
||||
|
|
@ -75,10 +78,12 @@ test_bpf()
|
|||
test_record_concurrent()
|
||||
{
|
||||
echo "Testing perf lock record and perf lock contention at the same time"
|
||||
perf lock record -o- -- perf bench sched messaging -p 2> /dev/null | \
|
||||
perf lock record -o- -- perf bench sched messaging -p 2> ${errout} | \
|
||||
perf lock contention -i- -E 1 -q 2> ${result}
|
||||
if [ "$(cat "${result}" | wc -l)" != "1" ]; then
|
||||
echo "[Fail] Recorded result count is not 1:" "$(cat "${result}" | wc -l)"
|
||||
cat ${errout}
|
||||
cat ${result}
|
||||
err=1
|
||||
exit
|
||||
fi
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user