On Sun, May 24, 2026 at 4:44 AM Paulo Duarte <[email protected]> wrote:
>
> The main aarch64 test suite boots gnumach via u-boot running under
> QEMU, which uses `fdt mknod` to inject the multiboot,module DTB
> nodes documented in aarch64/BOOTING.  That exercises the kernel's
> DTB reader through a real bootloader.  Add a second, smaller path
> that exercises the same kernel code directly via QEMU's `-device
> guest-loader` — which synthesises the same /chosen/multiboot,module
> nodes without a bootloader in between.
>
> Why have both:
>
>   * **Fault isolation.**  If the main u-boot tests start failing,
>     the dedicated test tells us whether it's u-boot/boot.scr/FAT
>     image generation breaking or the kernel itself.  Without this
>     test, a regression in our scripting machinery looks identical
>     to a kernel regression and we'd have to debug from scratch.
>
>   * **Lower-dependency smoke test.**  The dedicated test needs only
>     qemu-system-aarch64.  No u-boot, no mkimage, no mkfs.vfat.
>     If the u-boot infrastructure breaks for environmental reasons
>     (qemu version, u-boot defconfig change in nixpkgs), the
>     dedicated test still validates the kernel.

Was this written by an LLM? What other parts of the patch descriptions
are written by you vs an LLM?

>
>   * **Documentation by example.**  Shows the bare-metal Bugaev path
>     concretely: this is what an embedded board with u-boot's
>     `fdt mknod` ends up handing the kernel; here's the qemu
>     equivalent that skips the bootloader.
>
> test-multiboot-module-aarch64 reuses the test-hello module (its
> only job is "kernel boots, runs the module, prints
> TEST_SUCCESS_MARKER") so the test cost is just the runner script
> + a Makefrag.am entry, not a new test source.
>
> The runner template lives in tests/run-multiboot-module-qemu.sh.template
> rather than extending tests/run-qemu.sh.template — guest-loader's
> bootargs= parameter needs eval-based shell quoting to thread
> '${host-port}' / '$(...)' fragments verbatim to the boot-script
> parser, and that machinery shouldn't pollute the main runner that
> every other test uses.
>
> Gated on HOST_aarch64 in tests/Makefrag.am; no effect on x86
> builds.  Adds one to the aarch64 test count: 11 standard u-boot
> tests + 1 multiboot-module test = 12, matching x86's 12.

Reply via email to