Skip to content

Commit 0a1111d

Browse files
t-8chshuahkh
authored andcommitted
kunit: tool: Allow overriding the shutdown mode from qemu config
Not all platforms support machine reboot. If it a proper reboot is not supported the machine will hang. Allow the QEMU configuration to override the necessary shutdown mode for the specific system under test. Link: https://lore.kernel.org/r/20241111-kunit-loongarch-v2-2-7676eb5f2da3@linutronix.de Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Reviewed-by: David Gow <davidgow@google.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
1 parent d282524 commit 0a1111d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tools/testing/kunit/kunit_kernel.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,9 @@ def __init__(self, qemu_arch_params: qemu_config.QemuArchParams, cross_compile:
105105
self._kconfig = qemu_arch_params.kconfig
106106
self._qemu_arch = qemu_arch_params.qemu_arch
107107
self._kernel_path = qemu_arch_params.kernel_path
108-
self._kernel_command_line = qemu_arch_params.kernel_command_line + ' kunit_shutdown=reboot'
108+
self._kernel_command_line = qemu_arch_params.kernel_command_line
109+
if 'kunit_shutdown=' not in self._kernel_command_line:
110+
self._kernel_command_line += ' kunit_shutdown=reboot'
109111
self._extra_qemu_params = qemu_arch_params.extra_qemu_params
110112
self._serial = qemu_arch_params.serial
111113

0 commit comments

Comments
 (0)