Skip to contentSkip to conversation

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

PATCH In review Bin Meng 3 participants 3 messages Jul 13

Subsystems (2)
lore
Share & tools
lore

Bin Meng

author
#0 lore raw

PATCH 1/1 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")

---

 tests/functional/riscv64/test_sifive_u.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
tests/functional/riscv64/test_sifive_u.py +3 -3
index 847f709da1..54a0f9c648 100755
@@ -35,9 +35,6 @@ def do_test_riscv64_sifive_u_mmc_spi(self, connect_card):
         kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
                                'earlycon=sbi console=ttySIF0 '
                                'root=/dev/mmcblk0 ')
-        self.vm.add_args('-kernel', kernel_path,
-                         '-append', kernel_command_line,
-                         '-no-reboot')
         if connect_card:
             kernel_command_line += 'panic=-1 noreboot rootwait '
             self.vm.add_args('-drive', f'file={rootfs_path},if=sd,format=raw')
@@ -46,6 +43,9 @@ def do_test_riscv64_sifive_u_mmc_spi(self, connect_card):
             kernel_command_line += 'panic=0 noreboot '
             pattern = 'Cannot open root device "mmcblk0" or unknown-block(0,0)'
 
+        self.vm.add_args('-kernel', kernel_path,
+                         '-append', kernel_command_line,
+                         '-no-reboot')
         self.vm.launch()
         self.wait_for_console_pattern(pattern)
 

---
base-commit: a759542a2c62f0fd3b65f5a66ad9868201014669
branch: sifive_u

Signature · 1 line
2.53.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 11 lines · Bin Meng

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")

---

  tests/functional/riscv64/test_sifive_u.py | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
Reviewed-by on v1 1/1
#2 lore raw
In reply to Bin Meng
Quoted 6 lines · Bin Meng

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")

Thanks
Chao

Quoted 37 lines

---

 tests/functional/riscv64/test_sifive_u.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
tests/functional/riscv64/test_sifive_u.py +3 -4
index 847f709da1..54a0f9c648 100755
@@ -35,9 +35,6 @@ def do_test_riscv64_sifive_u_mmc_spi(self, connect_card):
         kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
                                'earlycon=sbi console=ttySIF0 '
                                'root=/dev/mmcblk0 ')
-        self.vm.add_args('-kernel', kernel_path,
-                         '-append', kernel_command_line,
-                         '-no-reboot')
         if connect_card:
             kernel_command_line += 'panic=-1 noreboot rootwait '
             self.vm.add_args('-drive', f'file={rootfs_path},if=sd,format=raw')
@@ -46,6 +43,9 @@ def do_test_riscv64_sifive_u_mmc_spi(self, connect_card):
             kernel_command_line += 'panic=0 noreboot '
             pattern = 'Cannot open root device "mmcblk0" or unknown-block(0,0)'
 
+        self.vm.add_args('-kernel', kernel_path,
+                         '-append', kernel_command_line,
+                         '-no-reboot')
         self.vm.launch()
         self.wait_for_console_pattern(pattern)
 
---

base-commit: a759542a2c62f0fd3b65f5a66ad9868201014669
branch: sifive_u

Signature · 1 line
2.53.0