@samitouri / QOSamiQemu / commits / 8fb3075916

tests/functional/riscv64: sifive_u: Fix kernel command line

Build the complete kernel command line before adding it to the QEMU arguments. This ensures the panic, noreboot and rootwait options are passed to the guest. Fixes: 7db162fa0138 ("tests/functional: Test SPI-SD adapter without SD card connected") Signed-off-by: Bin Meng <bin.meng@processmission.com> Reviewed-by: Chao Liu <chao.liu@processmission.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com> Message-ID: <20260713120245.781959-1-bin.meng@processmission.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>

Bin Meng committed Jul 13, 2026 at 20:02 UTC 8fb307591625731060d399aca42373c02c7cb040
1 file changed +3 -3
tests/functional/riscv64/test_sifive_u.py
+3 -3
@@ -35,9 +35,6 @@ class SifiveU(LinuxKernelTest):
35 kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
36 'earlycon=sbi console=ttySIF0 '
37 'root=/dev/mmcblk0 ')
38 - self.vm.add_args('-kernel', kernel_path,
39 - '-append', kernel_command_line,
40 - '-no-reboot')
38 if connect_card:
39 kernel_command_line += 'panic=-1 noreboot rootwait '
40 self.vm.add_args('-drive', f'file={rootfs_path},if=sd,format=raw')
@@ -46,6 +43,9 @@ class SifiveU(LinuxKernelTest):
43 kernel_command_line += 'panic=0 noreboot '
44 pattern = 'Cannot open root device "mmcblk0" or unknown-block(0,0)'
45
46 + self.vm.add_args('-kernel', kernel_path,
47 + '-append', kernel_command_line,
48 + '-no-reboot')
49 self.vm.launch()
50 self.wait_for_console_pattern(pattern)
51