public inbox for linux-perf-users@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] perf test data_type_profiling.sh: Skip just the Rust tests if code_with_type workload is missing
@ 2026-02-11 12:54 Arnaldo Carvalho de Melo
  2026-02-12 21:27 ` Ian Rogers
  0 siblings, 1 reply; 2+ messages in thread
From: Arnaldo Carvalho de Melo @ 2026-02-11 12:54 UTC (permalink / raw)
  To: Namhyung Kim
  Cc: Dmitrii Dolgov, Miguel Ojeda, Adrian Hunter, Ian Rogers,
	James Clark, Jiri Olsa, Linux Kernel Mailing List,
	linux-perf-users

Namhyung suggested skipping only the rust tests when the code_with_type
'perf test' workload is not built into perf, do it so that we can
continue to test the C based workloads:

With rust:

  root@number:/# perf test -vv "data type"
   83: perf data type profiling tests:
  --- start ---
  test child forked, pid 2645245
  Basic Rust perf annotate test
  Basic annotate test [Success]
  Pipe Rust perf annotate test
  Pipe annotate test [Success]
  Basic C perf annotate test
  Basic annotate test [Success]
  Pipe C perf annotate test
  Pipe annotate test [Success]
  ---- end(0) ----
   83: perf data type profiling tests                                  : Ok
  root@number:/#

Without:

  root@number:/# perf test "data type"
   83: perf data type profiling tests                                  : Ok
  root@number:/# perf test -vv "data type"
   83: perf data type profiling tests:
  --- start ---
  test child forked, pid 2634759
  Basic Rust perf annotate test
  Skip: code_with_type workload not built in 'perf test'
  Pipe Rust perf annotate test
  Skip: code_with_type workload not built in 'perf test'
  Basic C perf annotate test
  Basic annotate test [Success]
  Pipe C perf annotate test
  Pipe annotate test [Success]
  ---- end(0) ----
   83: perf data type profiling tests                                  : Ok
  root@number:/#

Suggested-by: Namhyung Kim <namhyung@kernel.org>
Cc: Dmitrii Dolgov <9erthalion6@gmail.com>
Cc: Miguel Ojeda <ojeda@kernel.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/tests/shell/data_type_profiling.sh | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/tools/perf/tests/shell/data_type_profiling.sh b/tools/perf/tests/shell/data_type_profiling.sh
index 3ef72a10850d0734..2a7f8f7c42d094a2 100755
--- a/tools/perf/tests/shell/data_type_profiling.sh
+++ b/tools/perf/tests/shell/data_type_profiling.sh
@@ -4,11 +4,6 @@
 
 set -e
 
-if ! perf test --list-workloads | grep -qw code_with_type ; then
-	echo "Skip: code_with_type workload not built in 'perf test'"
-	exit 2
-fi
-
 # The logic below follows the same line as the annotate test, but looks for a
 # data type profiling manifestation
 
@@ -42,6 +37,11 @@ test_basic_annotate() {
 
   case "x${runtime}" in
     "xRust")
+    if ! perf check feature -q rust
+    then
+      echo "Skip: code_with_type workload not built in 'perf test'"
+      return
+    fi
     index=0 ;;
 
     "xC")
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/1] perf test data_type_profiling.sh: Skip just the Rust tests if code_with_type workload is missing
  2026-02-11 12:54 [PATCH 1/1] perf test data_type_profiling.sh: Skip just the Rust tests if code_with_type workload is missing Arnaldo Carvalho de Melo
@ 2026-02-12 21:27 ` Ian Rogers
  0 siblings, 0 replies; 2+ messages in thread
From: Ian Rogers @ 2026-02-12 21:27 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Namhyung Kim, Dmitrii Dolgov, Miguel Ojeda, Adrian Hunter,
	James Clark, Jiri Olsa, Linux Kernel Mailing List,
	linux-perf-users

On Wed, Feb 11, 2026 at 4:54 AM Arnaldo Carvalho de Melo
<acme@kernel.org> wrote:
>
> Namhyung suggested skipping only the rust tests when the code_with_type
> 'perf test' workload is not built into perf, do it so that we can
> continue to test the C based workloads:
>
> With rust:
>
>   root@number:/# perf test -vv "data type"
>    83: perf data type profiling tests:
>   --- start ---
>   test child forked, pid 2645245
>   Basic Rust perf annotate test
>   Basic annotate test [Success]
>   Pipe Rust perf annotate test
>   Pipe annotate test [Success]
>   Basic C perf annotate test
>   Basic annotate test [Success]
>   Pipe C perf annotate test
>   Pipe annotate test [Success]
>   ---- end(0) ----
>    83: perf data type profiling tests                                  : Ok
>   root@number:/#
>
> Without:
>
>   root@number:/# perf test "data type"
>    83: perf data type profiling tests                                  : Ok
>   root@number:/# perf test -vv "data type"
>    83: perf data type profiling tests:
>   --- start ---
>   test child forked, pid 2634759
>   Basic Rust perf annotate test
>   Skip: code_with_type workload not built in 'perf test'
>   Pipe Rust perf annotate test
>   Skip: code_with_type workload not built in 'perf test'
>   Basic C perf annotate test
>   Basic annotate test [Success]
>   Pipe C perf annotate test
>   Pipe annotate test [Success]
>   ---- end(0) ----
>    83: perf data type profiling tests                                  : Ok
>   root@number:/#
>
> Suggested-by: Namhyung Kim <namhyung@kernel.org>
> Cc: Dmitrii Dolgov <9erthalion6@gmail.com>
> Cc: Miguel Ojeda <ojeda@kernel.org>
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

Reviewed-by: Ian Rogers <irogers@google.com>

Thanks,
Ian

> ---
>  tools/perf/tests/shell/data_type_profiling.sh | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/tools/perf/tests/shell/data_type_profiling.sh b/tools/perf/tests/shell/data_type_profiling.sh
> index 3ef72a10850d0734..2a7f8f7c42d094a2 100755
> --- a/tools/perf/tests/shell/data_type_profiling.sh
> +++ b/tools/perf/tests/shell/data_type_profiling.sh
> @@ -4,11 +4,6 @@
>
>  set -e
>
> -if ! perf test --list-workloads | grep -qw code_with_type ; then
> -       echo "Skip: code_with_type workload not built in 'perf test'"
> -       exit 2
> -fi
> -
>  # The logic below follows the same line as the annotate test, but looks for a
>  # data type profiling manifestation
>
> @@ -42,6 +37,11 @@ test_basic_annotate() {
>
>    case "x${runtime}" in
>      "xRust")
> +    if ! perf check feature -q rust
> +    then
> +      echo "Skip: code_with_type workload not built in 'perf test'"
> +      return
> +    fi
>      index=0 ;;
>
>      "xC")
> --
> 2.53.0
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-02-12 21:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-11 12:54 [PATCH 1/1] perf test data_type_profiling.sh: Skip just the Rust tests if code_with_type workload is missing Arnaldo Carvalho de Melo
2026-02-12 21:27 ` Ian Rogers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox