[PATCH v7 7/7] perf test: Fix relative path for 'stderr-whitelist.txt'

Jakub Brnak
2026-04-16T11:14:46Z

The test scripts for 'perf report' profiles were failing to locate
the 'stderr-whitelist.txt' file.

The path was specified simply as "stderr-whitelist.txt", which relies on
the current working directory when the script runs.

This patch updates the path to use the relative directory variable
'$DIR_PATH' (which points to the current directory of the test script),
ensuring the correct file is found regardless of the current working
directory.

Signed-off-by: Jakub Brnak <jbrnak@redhat.com>
---
tools/perf/tests/shell/base_report/test_basic.sh | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/perf/tests/shell/base_report/test_basic.sh b/tools/perf/tests/shell/base_report/test_basic.sh
index 0dfe7e5fd1ca..b42726655d20 100755
--- a/tools/perf/tests/shell/base_report/test_basic.sh
+++ b/tools/perf/tests/shell/base_report/test_basic.sh
@@ -240,7 +240,7 @@ PERF_EXIT_CODE=$?
"# Overhead Latency Command" < $LOGS_DIR/latency_default.log
CHECK_EXIT_CODE=$?
"$DIR_PATH/../common/check_errors_whitelisted.pl" \
- "stderr-whitelist.txt" < $LOGS_DIR/latency_default.err
+ "$DIR_PATH/stderr-whitelist.txt" < $LOGS_DIR/latency_default.err
(( CHECK_EXIT_CODE += $? ))

print_results $PERF_EXIT_CODE $CHECK_EXIT_CODE "default report for latency profile"
@@ -255,7 +255,7 @@ PERF_EXIT_CODE=$?
"# Latency Overhead Command" < $LOGS_DIR/latency_latency.log
CHECK_EXIT_CODE=$?
"$DIR_PATH/../common/check_errors_whitelisted.pl" \
- "stderr-whitelist.txt" < $LOGS_DIR/latency_latency.err
+ "$DIR_PATH/stderr-whitelist.txt" < $LOGS_DIR/latency_latency.err
(( CHECK_EXIT_CODE += $? ))

print_results $PERF_EXIT_CODE $CHECK_EXIT_CODE "latency report for latency profile"
@@ -271,7 +271,7 @@ PERF_EXIT_CODE=$?
< $LOGS_DIR/parallelism_hierarchy.log
CHECK_EXIT_CODE=$?
"$DIR_PATH/../common/check_errors_whitelisted.pl" \
- "stderr-whitelist.txt" < $LOGS_DIR/parallelism_hierarchy.err
+ "$DIR_PATH/stderr-whitelist.txt" < $LOGS_DIR/parallelism_hierarchy.err
(( CHECK_EXIT_CODE += $? ))

print_results $PERF_EXIT_CODE $CHECK_EXIT_CODE "parallelism histogram"
--
2.52.0