summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorVeronika Molnarova <vmolnaro@redhat.com>2024-02-15 14:02:28 +0300
committerNamhyung Kim <namhyung@kernel.org>2024-02-16 22:49:22 +0300
commitc8eb2a9ff8b30957d90c941cb4f0caac705ceffb (patch)
tree57de414c49740fa837914376d4ef3f791a7c8615 /tools
parente3425864a9e4dfad7bfb2de62b61fb4f72629aa6 (diff)
downloadlinux-c8eb2a9ff8b30957d90c941cb4f0caac705ceffb.tar.xz
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
Diffstat (limited to 'tools')
-rwxr-xr-xtools/perf/tests/shell/perftool-testsuite_probe.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/tools/perf/tests/shell/perftool-testsuite_probe.sh b/tools/perf/tests/shell/perftool-testsuite_probe.sh
new file mode 100755
index 000000000000..a0fec33a0358
--- /dev/null
+++ b/tools/perf/tests/shell/perftool-testsuite_probe.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+# perftool-testsuite_probe
+# SPDX-License-Identifier: GPL-2.0
+
+test -d "$(dirname "$0")/base_probe" || exit 2
+cd "$(dirname "$0")/base_probe" || exit 2
+status=0
+
+PERFSUITE_RUN_DIR=$(mktemp -d /tmp/"$(basename "$0" .sh)".XXX)
+export PERFSUITE_RUN_DIR
+
+for testcase in setup.sh test_*; do # skip setup.sh if not present or not executable
+ test -x "$testcase" || continue
+ ./"$testcase"
+ (( status += $? ))
+done
+
+if ! [ "$PERFTEST_KEEP_LOGS" = "y" ]; then
+ rm -rf "$PERFSUITE_RUN_DIR"
+fi
+
+test $status -ne 0 && exit 1
+exit 0