[for-next][PATCH 2/9] ktest: Resolve LOG_FILE in test option context
From: Steven Rostedt
Date: Mon Mar 16 2026 - 14:41:55 EST
From: =?UTF-8?q?Ricardo=20B=2E=20Marli=C3=A8re?= <rbm@xxxxxxxx>
LOG_FILE is expanded immediately after the config file is parsed with
eval_option(..., -1). That uses the default context, not the same option
resolution path used for tests. If LOG_FILE depends on options that are
finalized per test, it can be resolved from stale values before the first
test starts.
Resolve LOG_FILE through set_test_option("LOG_FILE", 1) instead so it uses
the same expansion rules as the rest of the test options.
Cc: John Hawley <warthog9@xxxxxxxxxxxxxx>
Cc: Andrea Righi <arighi@xxxxxxxxxx>
Cc: Marcos Paulo de Souza <mpdesouza@xxxxxxxx>
Cc: Matthieu Baerts <matttbe@xxxxxxxxxx>
Cc: Fernando Fernandez Mancera <fmancera@xxxxxxx>
Cc: Pedro Falcato <pfalcato@xxxxxxx>
Link: https://patch.msgid.link/20260307-ktest-fixes-v1-2-565d412f4925@xxxxxxxx
Signed-off-by: Ricardo B. Marlière <rbm@xxxxxxxx>
Signed-off-by: Steven Rostedt <rostedt@xxxxxxxxxxx>
---
tools/testing/ktest/ktest.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl
index f48ee64c69da..b7a1c8c617e0 100755
--- a/tools/testing/ktest/ktest.pl
+++ b/tools/testing/ktest/ktest.pl
@@ -4391,7 +4391,7 @@ EOF
read_config $ktest_config;
if (defined($opt{"LOG_FILE"})) {
- $opt{"LOG_FILE"} = eval_option("LOG_FILE", $opt{"LOG_FILE"}, -1);
+ $opt{"LOG_FILE"} = set_test_option("LOG_FILE", 1);
}
# Append any configs entered in manually to the config file.
--
2.51.0