[PATCH 5/5] ktest.pl: Always display BUILD_DIR and OUTPUT_DIR at the start of tests
From: Steven Rostedt
Date: Fri Jul 18 2025 - 16:21:31 EST
From: Steven Rostedt <rostedt@xxxxxxxxxxx>
As ktest.pl can run in various different directories, to make sure the
test is running in the proper directory with the proper source and proper
destination directory, display the content of BUILD_DIR and OUTPUT_DIR at
the start of every test.
This can be helpful for the test runner to stop the test if a test is
running in the wrong location instead of finding out after the test has
completed.
Signed-off-by: Steven Rostedt <rostedt@xxxxxxxxxxx>
---
tools/testing/ktest/ktest.pl | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl
index b2971430d7e4..c460838dfd6f 100755
--- a/tools/testing/ktest/ktest.pl
+++ b/tools/testing/ktest/ktest.pl
@@ -4539,6 +4539,10 @@ for (my $i = 1; $i <= $opt{"NUM_TESTS"}; $i++) {
doprint "RUNNING TEST $i of $opt{NUM_TESTS}$name with option $test_type $run_type$installme\n\n";
+ # Always show which build directory and output directory is being used
+ doprint "BUILD_DIR=$builddir\n";
+ doprint "OUTPUT_DIR=$outputdir\n\n";
+
if (defined($pre_test)) {
my $ret = run_command $pre_test;
if (!$ret && defined($pre_test_die) &&
--
2.47.2