[PATCH v2 2/4] kconfig: tests: Provide defconfig outfile for savedefconfig

From: Nicolas Schier

Date: Tue Sep 29 2026 - 04:08:20 EST


Let kconfig test framework's 'savedefconfig' forward the requested
output 'defconfig' filename to 'conf'.

The original implementation was calling 'conf' with '--savedefconfig'
but missed the mandatory filename for the defconfig output file.

While at it, honour the 'dot_config' argument which points to the input
config file.

Fixes: 022a4bf6b59d ("kconfig: tests: add framework for Kconfig unit testing")
Reviewed-by: Julian Braha <julianbraha@xxxxxxxxx>
Signed-off-by: Nicolas Schier <n.schier@xxxxxxxxx>
---
scripts/kconfig/tests/conftest.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/scripts/kconfig/tests/conftest.py b/scripts/kconfig/tests/conftest.py
index de8e555cd951..b2539e51e2a6 100644
--- a/scripts/kconfig/tests/conftest.py
+++ b/scripts/kconfig/tests/conftest.py
@@ -235,7 +235,8 @@ class Conf:
dot_config: .config file for input
returncode: exit status of the Kconfig executable
"""
- return self._run_conf('--savedefconfig', out_file='defconfig')
+ return self._run_conf('--savedefconfig={}'.format(out_file),
+ dot_config=dot_config, out_file='defconfig')

def listnewconfig(self, dot_config=None):
"""Run listnewconfig.

--
2.55.0