ppc/pnv: add test to verify external DTB is honored
Test boots a powernv11 machine, using a custom dtb. Custom dtb has the following bootargs. chosen { bootargs = "hello world"; }; Test Checks whether above bootargs make it to kernel's command line. Reviewed-by: Aditya Gupta <adityag@linux.ibm.com> Signed-off-by: Shivang Upadhyay <shivangu@linux.ibm.com> Link: https://lore.kernel.org/qemu-devel/20260630103508.254000-3-shivangu@linux.ibm.com Signed-off-by: Harsh Prateek Bora <harshpb@linux.ibm.com>
Shivang Upadhyay committed
Jun 30, 2026 at 16:05 UTC
f9d05801eb4acd6402d73cb25d498a2419920cf9
1 file changed
+19
tests/functional/ppc64/test_powernv.py
+19
@@ -27,6 +27,11 @@ class PowernvMachine(LinuxKernelTest):
27
'buildroot/qemu_ppc64le_powernv8-2025.02/rootfs.ext2'),
28
'aee2192b692077c4bde31cb56ce474424b358f17cec323d5c94af3970c9aada2')
29
30
+ # testdtb for power11, which contains string "hello world" in command line
31
+ ASSET_SAMPLE_DTB = Asset(
32
+ ('https://github.com/roz3x/qemu/raw/refs/heads/sample-dtb/qemu-powernv11.dtb'),
33
+ 'ea1271516264eea1eb58a067a99d0c2ca9528be8dc7d4e46bb2d5ae0d42fc568')
34
+
35
def do_test_linux_boot(self, command_line = KERNEL_COMMON_COMMAND_LINE):
36
self.require_accelerator("tcg")
37
kernel_path = self.ASSET_KERNEL.fetch()
@@ -104,6 +109,20 @@ class PowernvMachine(LinuxKernelTest):
109
# Device detection output driven by udev probing is sometimes cut off
110
# from console output, suspect S14silence-console init script.
111
112
+ def test_ppc64_powernv_external_dtb(self):
113
+ self.set_machine('powernv11')
114
+ self.require_accelerator("tcg")
115
+
116
+ kernel_path = self.ASSET_KERNEL.fetch()
117
+ sample_dtb_path = self.ASSET_SAMPLE_DTB.fetch()
118
+ self.vm.set_console()
119
+ self.vm.add_args('-kernel', kernel_path,
120
+ '-dtb', sample_dtb_path)
121
+ self.vm.launch()
122
+
123
+ # check if custom dtb is reflected or not
124
+ wait_for_console_pattern(self, "Kernel command line: hello world", self.panic_message)
125
+
126
def test_powernv8(self):
127
self.set_machine('powernv8')
128
self.do_test_ppc64_powernv('P8')