diff options
Diffstat (limited to 'gnu/packages/patches')
4 files changed, 112 insertions, 61 deletions
diff --git a/gnu/packages/patches/qemu-disable-aarch64-migration-test.patch b/gnu/packages/patches/qemu-disable-aarch64-migration-test.patch deleted file mode 100644 index bf60ed23bb..0000000000 --- a/gnu/packages/patches/qemu-disable-aarch64-migration-test.patch +++ /dev/null @@ -1,13 +0,0 @@ -Disable the qtest-aarch64/migration-test, which sometimes fail non-deterministically. -See: https://gitlab.com/qemu-project/qemu/-/issues/1230. - ---- qemu-7.1.0/tests/qtest/meson.build.old 1969-12-31 19:00:01.000000000 -0500 -+++ qemu-7.1.0/tests/qtest/meson.build 2022-09-26 11:11:05.434209797 -0400 -@@ -219,7 +219,6 @@ - ['arm-cpu-features', - 'numa-test', - 'boot-serial-test', -- 'migration-test', - 'bcm2835-dma-test'] - - qtests_s390x = \ diff --git a/gnu/packages/patches/qemu-disable-bios-tables-test.patch b/gnu/packages/patches/qemu-disable-bios-tables-test.patch index 39b7b0b53c..ba89b91099 100644 --- a/gnu/packages/patches/qemu-disable-bios-tables-test.patch +++ b/gnu/packages/patches/qemu-disable-bios-tables-test.patch @@ -1,18 +1,17 @@ The bios-tables-test may fail; disable it (see: https://gitlab.com/qemu-project/qemu/-/issues/1098) diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build -index f096cf3ecd..82f6e1ffeb 100644 +index 2f0d3ef080..e3c33a86b5 100644 --- a/tests/qtest/meson.build +++ b/tests/qtest/meson.build -@@ -1,7 +1,6 @@ +@@ -1,6 +1,5 @@ slow_qtests = { - 'ahci-test' : 60, 'aspeed_smc-test': 360, -- 'bios-tables-test' : 120, - 'boot-serial-test' : 60, - 'migration-test' : 150, - 'npcm7xx_pwm-test': 150, -@@ -82,9 +81,6 @@ qtests_i386 = \ +- 'bios-tables-test' : 910, + 'cdrom-test' : 610, + 'device-introspect-test' : 720, + 'migration-test' : 480, +@@ -86,9 +85,6 @@ qtests_i386 = \ config_all_devices.has_key('CONFIG_Q35') and \ config_all_devices.has_key('CONFIG_VIRTIO_PCI') and \ slirp.found() ? ['virtio-net-failover'] : []) + \ @@ -22,15 +21,25 @@ index f096cf3ecd..82f6e1ffeb 100644 qtests_pci + \ qtests_cxl + \ ['fdc-test', -@@ -213,7 +209,6 @@ qtests_arm = \ +@@ -235,7 +231,6 @@ qtests_arm = \ # TODO: once aarch64 TCG is fixed on ARM 32 bit host, make bios-tables-test unconditional qtests_aarch64 = \ - (cpu != 'arm' and unpack_edk2_blobs ? ['bios-tables-test'] : []) + \ - (config_all.has_key('CONFIG_TCG') and config_all_devices.has_key('CONFIG_TPM_TIS_SYSBUS') ? \ + (config_all_accel.has_key('CONFIG_TCG') and config_all_devices.has_key('CONFIG_TPM_TIS_SYSBUS') ? \ ['tpm-tis-device-test', 'tpm-tis-device-swtpm-test'] : []) + \ (config_all_devices.has_key('CONFIG_XLNX_ZYNQMP_ARM') ? ['xlnx-can-test', 'fuzz-xlnx-dp-test'] : []) + \ -@@ -304,7 +299,6 @@ if gnutls.found() +@@ -260,9 +255,6 @@ qtests_s390x = \ + qtests_riscv32 = \ + (config_all_devices.has_key('CONFIG_SIFIVE_E_AON') ? ['sifive-e-aon-watchdog-test'] : []) + +-qtests_riscv64 = \ +- (unpack_edk2_blobs ? ['bios-tables-test'] : []) +- + qos_test_ss = ss.source_set() + qos_test_ss.add( + 'ac97-test.c', +@@ -328,7 +320,6 @@ if gnutls.found() endif qtests = { diff --git a/gnu/packages/patches/qemu-disable-migration-test.patch b/gnu/packages/patches/qemu-disable-migration-test.patch new file mode 100644 index 0000000000..2a30d26f55 --- /dev/null +++ b/gnu/packages/patches/qemu-disable-migration-test.patch @@ -0,0 +1,57 @@ +diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build +index e3c33a86b5..a3bbf9c841 100644 +--- a/tests/qtest/meson.build ++++ b/tests/qtest/meson.build +@@ -2,7 +2,6 @@ slow_qtests = { + 'aspeed_smc-test': 360, + 'cdrom-test' : 610, + 'device-introspect-test' : 720, +- 'migration-test' : 480, + 'npcm7xx_pwm-test': 300, + 'npcm7xx_watchdog_timer-test': 120, + 'qom-test' : 900, +@@ -100,7 +99,6 @@ qtests_i386 = \ + 'cpu-plug-test', + 'q35-test', + 'vmgenid-test', +- 'migration-test', + 'test-x86-cpuid-compat', + 'numa-test' + ] +@@ -173,7 +171,7 @@ qtests_ppc64 = \ + (slirp.found() ? ['pxe-test'] : []) + \ + (config_all_devices.has_key('CONFIG_USB_UHCI') ? ['usb-hcd-uhci-test'] : []) + \ + (config_all_devices.has_key('CONFIG_USB_XHCI_NEC') ? ['usb-hcd-xhci-test'] : []) + \ +- qtests_pci + ['migration-test', 'numa-test', 'cpu-plug-test', 'drive_del-test'] ++ qtests_pci + ['numa-test', 'cpu-plug-test', 'drive_del-test'] + + qtests_sh4 = (config_all_devices.has_key('CONFIG_ISA_TESTDEV') ? ['endianness-test'] : []) + qtests_sh4eb = (config_all_devices.has_key('CONFIG_ISA_TESTDEV') ? ['endianness-test'] : []) +@@ -240,8 +238,7 @@ qtests_aarch64 = \ + config_all_devices.has_key('CONFIG_TPM_TIS_I2C') ? ['tpm-tis-i2c-test'] : []) + \ + ['arm-cpu-features', + 'numa-test', +- 'boot-serial-test', +- 'migration-test'] ++ 'boot-serial-test'] + + qtests_s390x = \ + qtests_filter + \ +@@ -249,8 +246,7 @@ qtests_s390x = \ + 'drive_del-test', + 'device-plug-test', + 'virtio-ccw-test', +- 'cpu-plug-test', +- 'migration-test'] ++ 'cpu-plug-test'] + + qtests_riscv32 = \ + (config_all_devices.has_key('CONFIG_SIFIVE_E_AON') ? ['sifive-e-aon-watchdog-test'] : []) +@@ -324,7 +320,6 @@ qtests = { + 'dbus-vmstate-test': files('migration-helpers.c') + dbus_vmstate1, + 'erst-test': files('erst-test.c'), + 'ivshmem-test': [rt, '../../contrib/ivshmem-server/ivshmem-server.c'], +- 'migration-test': migration_files, + 'pxe-test': files('boot-sector.c'), + 'qos-test': [chardev, io, qos_test_ss.apply({}).sources()], + 'tpm-crb-swtpm-test': [io, tpmemu_files], diff --git a/gnu/packages/patches/qemu-fix-agent-paths.patch b/gnu/packages/patches/qemu-fix-agent-paths.patch index 0c29890206..91572fb664 100644 --- a/gnu/packages/patches/qemu-fix-agent-paths.patch +++ b/gnu/packages/patches/qemu-fix-agent-paths.patch @@ -4,19 +4,20 @@ after the patch from the Nix package: https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/virtualization/qemu/fix-qemu-ga.patch diff --git a/qga/commands-posix.c b/qga/commands-posix.c +index 6e3c15f539..eaef900b6e 100644 --- a/qga/commands-posix.c +++ b/qga/commands-posix.c -@@ -84,6 +84,7 @@ static void ga_wait_child(pid_t pid, int *status, Error **errp) - void qmp_guest_shutdown(bool has_mode, const char *mode, Error **errp) +@@ -216,6 +216,7 @@ out: + void qmp_guest_shutdown(const char *mode, Error **errp) { const char *shutdown_flag; + const char *command; Error *local_err = NULL; - pid_t pid; - int status; -@@ -101,10 +102,13 @@ void qmp_guest_shutdown(bool has_mode, const char *mode, Error **errp) + + #ifdef CONFIG_SOLARIS +@@ -235,16 +236,24 @@ void qmp_guest_shutdown(const char *mode, Error **errp) slog("guest-shutdown called, mode: %s", mode); - if (!has_mode || strcmp(mode, "powerdown") == 0) { + if (!mode || strcmp(mode, "powerdown") == 0) { shutdown_flag = powerdown_flag; + command = "shutdown"; } else if (strcmp(mode, "halt") == 0) { @@ -28,38 +29,35 @@ diff --git a/qga/commands-posix.c b/qga/commands-posix.c } else { error_setg(errp, "mode is invalid (valid values are: halt|powerdown|reboot"); -@@ -123,6 +127,11 @@ void qmp_guest_shutdown(bool has_mode, const char *mode, Error **errp) - execl("/sbin/shutdown", "shutdown", shutdown_flag, "-g0", "-y", - "hypervisor initiated shutdown", (char *)NULL); - #else -+ /* try Guix’s shutdown/halt/reboot first */ -+ char *path = g_strdup_printf("/run/current-system/profile/sbin/%s", command); -+ execl(path, command, (char *)NULL); -+ g_free(path); + return; + } + ++ /* Try Guix’s shutdown/halt/reboot first. */ ++ char *path = g_strdup_printf("/run/current-system/profile/sbin/%s", command); ++ execl(path, command, (char *) NULL); ++ g_free(path); + - execl("/sbin/shutdown", "shutdown", "-h", shutdown_flag, "+0", - "hypervisor initiated shutdown", (char *)NULL); - #endif -@@ -159,10 +168,12 @@ void qmp_guest_set_time(bool has_time, int64_t time_ns, Error **errp) + const char *argv[] = {"/sbin/shutdown", + #ifdef CONFIG_SOLARIS + shutdown_flag, "-g0", "-y", +@@ -269,7 +278,7 @@ void qmp_guest_set_time(bool has_time, int64_t time_ns, Error **errp) + int ret; Error *local_err = NULL; struct timeval tv; - static const char hwclock_path[] = "/sbin/hwclock"; -+ static const char hwclock_path_guix[] = "/run/current-system/profile/sbin/hwclock"; - static int hwclock_available = -1; - - if (hwclock_available < 0) { -- hwclock_available = (access(hwclock_path, X_OK) == 0); -+ hwclock_available = (access(hwclock_path_guix, X_OK) == 0) || -+ (access(hwclock_path, X_OK) == 0); - } - - if (!hwclock_available) { -@@ -208,6 +219,8 @@ void qmp_guest_set_time(bool has_time, int64_t time_ns, Error **errp) +- const char *argv[] = {"/sbin/hwclock", has_time ? "-w" : "-s", NULL}; ++ const char *argv[] = {"/run/current-system/profile/sbin/hwclock", has_time ? "-w" : "-s", NULL}; - /* Use '/sbin/hwclock -w' to set RTC from the system time, - * or '/sbin/hwclock -s' to set the system time from RTC. */ -+ execl(hwclock_path_guix, "hwclock", has_time ? "-w" : "-s", -+ NULL); - execl(hwclock_path, "hwclock", has_time ? "-w" : "-s", NULL); - _exit(EXIT_FAILURE); - } else if (pid < 0) { + /* If user has passed a time, validate and set it. */ + if (has_time) { +@@ -302,6 +311,11 @@ void qmp_guest_set_time(bool has_time, int64_t time_ns, Error **errp) + * hardware clock (RTC). */ + ga_run_command(argv, NULL, "set hardware clock to system time", + &local_err); ++ if (local_err) { ++ argv[0] = "/sbin/hwclock"; ++ ga_run_command(argv, NULL, "set hardware clock to system time", ++ &local_err); ++ } + if (local_err) { + error_propagate(errp, local_err); + return; |