perf tools test_task_analyzer.sh: Update to use 'perf check feature'
authorAditya Gupta <adityag@linux.ibm.com>
Wed, 4 Sep 2024 19:01:29 +0000 (00:31 +0530)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 4 Sep 2024 19:19:33 +0000 (16:19 -0300)
Currently we use output of 'perf version --build-options', to check
whether perf was built with libtraceevent support.

Instead, use 'perf check feature libtraceevent' to check for
libtraceevent support.

Reviewed-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
Signed-off-by: Aditya Gupta <adityag@linux.ibm.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Disha Goel <disgoel@linux.vnet.ibm.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kajol Jain <kjain@linux.ibm.com>
Cc: Madhavan Srinivasan <maddy@linux.ibm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/r/20240904190132.415212-5-adityag@linux.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/tests/shell/test_task_analyzer.sh

index cb02bf23e6a5a7f621c48a4d0732a0c4a332fe72..7d76fc63d995a80ff7e57017f2cb79dc320b91ed 100755 (executable)
@@ -55,8 +55,8 @@ find_str_or_fail() {
 
 # check if perf is compiled with libtraceevent support
 skip_no_probe_record_support() {
-       perf version --build-options | grep -q " OFF .* HAVE_LIBTRACEEVENT" && return 2
-       return 0
+       perf check feature -q libtraceevent && return 0
+       return 2
 }
 
 prepare_perf_data() {