Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

perf test data_type_profiling.sh: Skip just the Rust tests if code_with_type workload is missing

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>

+5 -5
+5 -5
tools/perf/tests/shell/data_type_profiling.sh
··· 4 4 5 5 set -e 6 6 7 - if ! perf test --list-workloads | grep -qw code_with_type ; then 8 - echo "Skip: code_with_type workload not built in 'perf test'" 9 - exit 2 10 - fi 11 - 12 7 # The logic below follows the same line as the annotate test, but looks for a 13 8 # data type profiling manifestation 14 9 ··· 37 42 38 43 case "x${runtime}" in 39 44 "xRust") 45 + if ! perf check feature -q rust 46 + then 47 + echo "Skip: code_with_type workload not built in 'perf test'" 48 + return 49 + fi 40 50 index=0 ;; 41 51 42 52 "xC")