[PATCH 16/17] perf tests task_analyzer: print command on failure

Arnaldo Carvalho de Melo acme at kernel.org
Wed Jun 14 06:07:52 AEST 2023


Em Tue, Jun 13, 2023 at 10:11:44PM +0530, Athira Rajeev escreveu:
> From: Aditya Gupta <adityag at linux.ibm.com>
> 
> Instead of printing "perf command failed" everytime, print the exact
> command that run earlier

Looks like a nice improvement, added the test authors to the CC list on
this message,

Thanks, applied.

- Arnaldo
 
> Signed-off-by: Athira Rajeev <atrajeev at linux.vnet.ibm.com>
> Signed-off-by: Kajol Jain <kjain at linux.ibm.com>
> Signed-off-by: Aditya Gupta <adityag at linux.ibm.com>
> ---
>  tools/perf/tests/shell/test_task_analyzer.sh | 24 ++++++++++----------
>  1 file changed, 12 insertions(+), 12 deletions(-)
> 
> diff --git a/tools/perf/tests/shell/test_task_analyzer.sh b/tools/perf/tests/shell/test_task_analyzer.sh
> index 84ab7e7f57d5..b094eeb3bf66 100755
> --- a/tools/perf/tests/shell/test_task_analyzer.sh
> +++ b/tools/perf/tests/shell/test_task_analyzer.sh
> @@ -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]}"
>  }
>  
> -- 
> 2.39.1
> 

-- 

- Arnaldo


More information about the Linuxppc-dev mailing list