diff options
Diffstat (limited to 'tools/perf/tests/shell/test_uprobe_from_different_cu.sh')
-rwxr-xr-x | tools/perf/tests/shell/test_uprobe_from_different_cu.sh | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/perf/tests/shell/test_uprobe_from_different_cu.sh b/tools/perf/tests/shell/test_uprobe_from_different_cu.sh index 319f36ebb9a4..7adf9755d6de 100755 --- a/tools/perf/tests/shell/test_uprobe_from_different_cu.sh +++ b/tools/perf/tests/shell/test_uprobe_from_different_cu.sh @@ -4,6 +4,12 @@ set -e +# shellcheck source=lib/probe.sh +. "$(dirname $0)"/lib/probe.sh + +skip_if_no_perf_probe || exit 2 +[ "$(id -u)" == 0 ] || exit 2 + # skip if there's no gcc if ! [ -x "$(command -v gcc)" ]; then echo "failed: no gcc compiler" @@ -77,7 +83,7 @@ gcc -g -Og -flto -c ${temp_dir}/testfile-foo.c -o ${temp_dir}/testfile-foo.o gcc -g -Og -c ${temp_dir}/testfile-main.c -o ${temp_dir}/testfile-main.o gcc -g -Og -o ${temp_dir}/testfile ${temp_dir}/testfile-foo.o ${temp_dir}/testfile-main.o -perf probe -x ${temp_dir}/testfile --funcs foo +perf probe -x ${temp_dir}/testfile --funcs foo | grep "foo" perf probe -x ${temp_dir}/testfile foo cleanup |