perf tests task_analyzer: Print command that failed instead of just "perf"

Instead of printing "perf command failed" everytime, print the exact
command that run earlier

Signed-off-by: Aditya Gupta <adityag@linux.ibm.com>
Acked-by: Hagen Paul Pfeifer <hagen@jauu.net>
Cc: Disha Goel <disgoel@linux.vnet.ibm.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: John Garry <john.g.garry@oracle.com>
Cc: Madhavan Srinivasan <maddy@linux.ibm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Ravi Bangoria <ravi.bangoria@amd.com>
Cc: linuxppc-dev@lists.ozlabs.org
Link: https://lore.kernel.org/r/20230613164145.50488-17-atrajeev@linux.vnet.ibm.com
Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
Signed-off-by: Kajol Jain <kjain@linux.ibm.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
Aditya Gupta 2023-06-13 22:11:44 +05:30 коммит произвёл Arnaldo Carvalho de Melo
Родитель 5c4396efb5
Коммит b8e55fde9f
1 изменённых файлов: 12 добавлений и 12 удалений

Просмотреть файл

@ -53,14 +53,14 @@ prepare_perf_data() {
test_basic() {
out="$tmpdir/perf.out"
perf script report task-analyzer > "$out"
check_exec_0 "perf"
check_exec_0 "perf script report task-analyzer"
find_str_or_fail "Comm" "$out" "${FUNCNAME[0]}"
}
test_ns_rename(){
out="$tmpdir/perf.out"
perf script report task-analyzer --ns --rename-comms-by-tids 0:random > "$out"
check_exec_0 "perf"
check_exec_0 "perf script report task-analyzer --ns --rename-comms-by-tids 0:random"
find_str_or_fail "Comm" "$out" "${FUNCNAME[0]}"
}
@ -68,7 +68,7 @@ test_ms_filtertasks_highlight(){
out="$tmpdir/perf.out"
perf script report task-analyzer --ms --filter-tasks perf --highlight-tasks perf \
> "$out"
check_exec_0 "perf"
check_exec_0 "perf script report task-analyzer --ms --filter-tasks perf --highlight-tasks perf"
find_str_or_fail "Comm" "$out" "${FUNCNAME[0]}"
}
@ -76,61 +76,61 @@ test_extended_times_timelimit_limittasks() {
out="$tmpdir/perf.out"
perf script report task-analyzer --extended-times --time-limit :99999 \
--limit-to-tasks perf > "$out"
check_exec_0 "perf"
check_exec_0 "perf script report task-analyzer --extended-times --time-limit :99999 --limit-to-tasks perf"
find_str_or_fail "Out-Out" "$out" "${FUNCNAME[0]}"
}
test_summary() {
out="$tmpdir/perf.out"
perf script report task-analyzer --summary > "$out"
check_exec_0 "perf"
check_exec_0 "perf script report task-analyzer --summary"
find_str_or_fail "Summary" "$out" "${FUNCNAME[0]}"
}
test_summaryextended() {
out="$tmpdir/perf.out"
perf script report task-analyzer --summary-extended > "$out"
check_exec_0 "perf"
check_exec_0 "perf script report task-analyzer --summary-extended"
find_str_or_fail "Inter Task Times" "$out" "${FUNCNAME[0]}"
}
test_summaryonly() {
out="$tmpdir/perf.out"
perf script report task-analyzer --summary-only > "$out"
check_exec_0 "perf"
check_exec_0 "perf script report task-analyzer --summary-only"
find_str_or_fail "Summary" "$out" "${FUNCNAME[0]}"
}
test_extended_times_summary_ns() {
out="$tmpdir/perf.out"
perf script report task-analyzer --extended-times --summary --ns > "$out"
check_exec_0 "perf"
check_exec_0 "perf script report task-analyzer --extended-times --summary --ns"
find_str_or_fail "Out-Out" "$out" "${FUNCNAME[0]}"
find_str_or_fail "Summary" "$out" "${FUNCNAME[0]}"
}
test_csv() {
perf script report task-analyzer --csv csv > /dev/null
check_exec_0 "perf"
check_exec_0 "perf script report task-analyzer --csv csv"
find_str_or_fail "Comm;" csv "${FUNCNAME[0]}"
}
test_csv_extended_times() {
perf script report task-analyzer --csv csv --extended-times > /dev/null
check_exec_0 "perf"
check_exec_0 "perf script report task-analyzer --csv csv --extended-times"
find_str_or_fail "Out-Out;" csv "${FUNCNAME[0]}"
}
test_csvsummary() {
perf script report task-analyzer --csv-summary csvsummary > /dev/null
check_exec_0 "perf"
check_exec_0 "perf script report task-analyzer --csv-summary csvsummary"
find_str_or_fail "Comm;" csvsummary "${FUNCNAME[0]}"
}
test_csvsummary_extended() {
perf script report task-analyzer --csv-summary csvsummary --summary-extended \
>/dev/null
check_exec_0 "perf"
check_exec_0 "perf script report task-analyzer --csv-summary csvsummary --summary-extended"
find_str_or_fail "Out-Out;" csvsummary "${FUNCNAME[0]}"
}