Skip to content

Commit adc1284

Browse files
committed
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>
1 parent 804490c commit adc1284

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

tools/perf/tests/shell/data_type_profiling.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@
44

55
set -e
66

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-
127
# The logic below follows the same line as the annotate test, but looks for a
138
# data type profiling manifestation
149

@@ -42,6 +37,11 @@ test_basic_annotate() {
4237

4338
case "x${runtime}" in
4439
"xRust")
40+
if ! perf check feature -q rust
41+
then
42+
echo "Skip: code_with_type workload not built in 'perf test'"
43+
return
44+
fi
4545
index=0 ;;
4646

4747
"xC")

0 commit comments

Comments
 (0)