diff options
author | Thomas Weißschuh <thomas.weissschuh@linutronix.de> | 2024-11-11 06:29:19 +0100 |
---|---|---|
committer | Shuah Khan <skhan@linuxfoundation.org> | 2024-11-19 15:26:30 -0700 |
commit | 0a1111d4cbaf45100e30ebd98d1e1a175b8ce22d (patch) | |
tree | 3cccf0960ecf2d873cb058ec69ec0dd00e07a14b | |
parent | d28252440428d37076de166c3d576a5d2f4a53e8 (diff) |
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>
-rw-r--r-- | tools/testing/kunit/kunit_kernel.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/testing/kunit/kunit_kernel.py b/tools/testing/kunit/kunit_kernel.py index 61931c4926fd..e76d7894b6c5 100644 --- a/tools/testing/kunit/kunit_kernel.py +++ b/tools/testing/kunit/kunit_kernel.py @@ -105,7 +105,9 @@ class LinuxSourceTreeOperationsQemu(LinuxSourceTreeOperations): self._kconfig = qemu_arch_params.kconfig self._qemu_arch = qemu_arch_params.qemu_arch self._kernel_path = qemu_arch_params.kernel_path - self._kernel_command_line = qemu_arch_params.kernel_command_line + ' kunit_shutdown=reboot' + self._kernel_command_line = qemu_arch_params.kernel_command_line + if 'kunit_shutdown=' not in self._kernel_command_line: + self._kernel_command_line += ' kunit_shutdown=reboot' self._extra_qemu_params = qemu_arch_params.extra_qemu_params self._serial = qemu_arch_params.serial |