]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
tests: Boot PowerPC using PMU instead of CUDA for power management
authorGlenn Washburn <development@efficientek.com>
Tue, 12 Oct 2021 07:29:50 +0000 (18:29 +1100)
committerDaniel Kiper <daniel.kiper@oracle.com>
Mon, 25 Oct 2021 14:23:34 +0000 (16:23 +0200)
A recent refactoring of CUDA command code has exposed a bug in OpenBIOS [1]
which was causing system powerdown and system reset to fail, thus causing
the QEMU instance to hang. This in turn caused the grub-shell command to
timeout causing it to return an error code when the test actually completed
successfully.

Since it could be a while before the patch fixing this issue in OpenBIOS
filters down to the average distro, switch to PMU to allow powerdowns and
reboots to work as expected.

[1] https://gitlab.com/qemu-project/qemu/-/issues/624

Signed-off-by: Glenn Washburn <development@efficientek.com>
Signed-off-by: Daniel Axtens <dja@axtens.net>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
tests/util/grub-shell.in

index 93e9f5148408aaf29d580930e83e11c373a2b15b..33590baeb13c052abd852b623bb4ec3d35842ba8 100644 (file)
@@ -84,6 +84,7 @@ case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in
        serial_null="-serial null"
        netbootext=elf
        trim=1
+       qemuopts="-M mac99,via=pmu $qemuopts"
        ;;
 
     sparc64-ieee1275)
@@ -231,7 +232,7 @@ for option in "$@"; do
        qemu=qemu-system-ppc64
        serial_port=ieee1275/hvterm
        serial_null=
-       qemuopts="$qemuopts -M pseries -no-reboot"
+       qemuopts="$(echo $qemuopts | sed -E 's/-M [^ ]+//') -M pseries -no-reboot"
        trim=1
        pseries=y
            ;;