diff options
| author | Shivang Upadhyay <shivangu@linux.ibm.com> | 2026-06-30 16:05:08 +0530 |
|---|---|---|
| committer | Harsh Prateek Bora <harshpb@linux.ibm.com> | 2026-07-03 10:07:21 +0530 |
| commit | f9d05801eb4acd6402d73cb25d498a2419920cf9 (patch) | |
| tree | 53fb6e575e1588c58a0041024f88679c7165c023 | |
| parent | 55db0113c38997c9c969c8260adb18c6d2982929 (diff) | |
| download | qemu-f9d05801eb4acd6402d73cb25d498a2419920cf9.tar.gz qemu-f9d05801eb4acd6402d73cb25d498a2419920cf9.zip | |
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>
| -rwxr-xr-x | tests/functional/ppc64/test_powernv.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/functional/ppc64/test_powernv.py b/tests/functional/ppc64/test_powernv.py index 0ea6c93e42..b5b2f0d158 100755 --- a/tests/functional/ppc64/test_powernv.py +++ b/tests/functional/ppc64/test_powernv.py @@ -27,6 +27,11 @@ class PowernvMachine(LinuxKernelTest): 'buildroot/qemu_ppc64le_powernv8-2025.02/rootfs.ext2'), 'aee2192b692077c4bde31cb56ce474424b358f17cec323d5c94af3970c9aada2') + # testdtb for power11, which contains string "hello world" in command line + ASSET_SAMPLE_DTB = Asset( + ('https://github.com/roz3x/qemu/raw/refs/heads/sample-dtb/qemu-powernv11.dtb'), + 'ea1271516264eea1eb58a067a99d0c2ca9528be8dc7d4e46bb2d5ae0d42fc568') + def do_test_linux_boot(self, command_line = KERNEL_COMMON_COMMAND_LINE): self.require_accelerator("tcg") kernel_path = self.ASSET_KERNEL.fetch() @@ -104,6 +109,20 @@ class PowernvMachine(LinuxKernelTest): # Device detection output driven by udev probing is sometimes cut off # from console output, suspect S14silence-console init script. + def test_ppc64_powernv_external_dtb(self): + self.set_machine('powernv11') + self.require_accelerator("tcg") + + kernel_path = self.ASSET_KERNEL.fetch() + sample_dtb_path = self.ASSET_SAMPLE_DTB.fetch() + self.vm.set_console() + self.vm.add_args('-kernel', kernel_path, + '-dtb', sample_dtb_path) + self.vm.launch() + + # check if custom dtb is reflected or not + wait_for_console_pattern(self, "Kernel command line: hello world", self.panic_message) + def test_powernv8(self): self.set_machine('powernv8') self.do_test_ppc64_powernv('P8') |
