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

perf testsuite: Add test case for perf probe

Add new perf probe test case that acts as an entry element in perf test
list. Runs multiple subtests from directory "base_probe", which will be
added in incomming patches and can be expanded without further editing.

Signed-off-by: Veronika Molnarova <vmolnaro@redhat.com>
Signed-off-by: Michael Petlan <mpetlan@redhat.com>
Cc: kjain@linux.ibm.com
Cc: atrajeev@linux.vnet.ibm.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/r/20240215110231.15385-5-mpetlan@redhat.com

authored by

Veronika Molnarova and committed by
Namhyung Kim
c8eb2a9f e3425864

+23
+23
tools/perf/tests/shell/perftool-testsuite_probe.sh
··· 1 + #!/bin/bash 2 + # perftool-testsuite_probe 3 + # SPDX-License-Identifier: GPL-2.0 4 + 5 + test -d "$(dirname "$0")/base_probe" || exit 2 6 + cd "$(dirname "$0")/base_probe" || exit 2 7 + status=0 8 + 9 + PERFSUITE_RUN_DIR=$(mktemp -d /tmp/"$(basename "$0" .sh)".XXX) 10 + export PERFSUITE_RUN_DIR 11 + 12 + for testcase in setup.sh test_*; do # skip setup.sh if not present or not executable 13 + test -x "$testcase" || continue 14 + ./"$testcase" 15 + (( status += $? )) 16 + done 17 + 18 + if ! [ "$PERFTEST_KEEP_LOGS" = "y" ]; then 19 + rm -rf "$PERFSUITE_RUN_DIR" 20 + fi 21 + 22 + test $status -ne 0 && exit 1 23 + exit 0