- Rebase to QEMU 10.1.0 [RHEL-105035] - Resolves: RHEL-105035 (Rebase qemu-kvm to QEMU 10.1.0)
366 lines
13 KiB
Diff
366 lines
13 KiB
Diff
From 0f4d74ce6ff137291962909aaebc1dbf3dd27508 Mon Sep 17 00:00:00 2001
|
|
From: Miroslav Rezanina <mrezanin@redhat.com>
|
|
Date: Wed, 2 Sep 2020 09:39:41 +0200
|
|
Subject: Enable make check
|
|
|
|
Fixing tests after device disabling and machine types changes and enabling
|
|
make check run during build.
|
|
|
|
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
|
---
|
|
Rebase notes (9.1.0):
|
|
- Disable fdc-test
|
|
- Use q35 machine type for new pvpanic test
|
|
|
|
Rebase notes (10.0.0 rc0)
|
|
- Disable mem_addr_space functional test
|
|
- Updated removal of q35 test (upstream change)
|
|
|
|
Rebase notes (10.0.0):
|
|
- Add riscv changes
|
|
|
|
Rebase notes (10.1.0 rc0):
|
|
- Comment out unused code
|
|
---
|
|
.distro/qemu-kvm.spec.template | 4 +--
|
|
tests/functional/meson.build | 2 +-
|
|
tests/functional/test_aarch64_tcg_plugins.py | 4 +--
|
|
tests/qemu-iotests/meson.build | 34 ++++++++++----------
|
|
tests/qemu-iotests/testenv.py | 3 ++
|
|
tests/qtest/bios-tables-test.c | 10 ++++++
|
|
tests/qtest/fuzz-e1000e-test.c | 2 +-
|
|
tests/qtest/fuzz-virtio-scsi-test.c | 2 +-
|
|
tests/qtest/intel-hda-test.c | 2 +-
|
|
tests/qtest/libqos/meson.build | 2 +-
|
|
tests/qtest/lpc-ich9-test.c | 2 +-
|
|
tests/qtest/machine-none-test.c | 2 +-
|
|
tests/qtest/meson.build | 1 -
|
|
tests/qtest/pvpanic-test.c | 2 +-
|
|
tests/qtest/riscv-csr-test.c | 4 +++
|
|
tests/qtest/virtio-net-failover.c | 1 +
|
|
16 files changed, 47 insertions(+), 30 deletions(-)
|
|
|
|
diff --git a/tests/functional/meson.build b/tests/functional/meson.build
|
|
index 311c6f1806..c7f9051c90 100644
|
|
--- a/tests/functional/meson.build
|
|
+++ b/tests/functional/meson.build
|
|
@@ -319,7 +319,7 @@ tests_sparc64_system_thorough = [
|
|
|
|
tests_x86_64_system_quick = [
|
|
'cpu_queries',
|
|
- 'mem_addr_space',
|
|
+# 'mem_addr_space',
|
|
'migration',
|
|
'pc_cpu_hotplug_props',
|
|
'virtio_version',
|
|
diff --git a/tests/functional/test_aarch64_tcg_plugins.py b/tests/functional/test_aarch64_tcg_plugins.py
|
|
index cb7e9298fb..9efa826b01 100755
|
|
--- a/tests/functional/test_aarch64_tcg_plugins.py
|
|
+++ b/tests/functional/test_aarch64_tcg_plugins.py
|
|
@@ -64,7 +64,7 @@ class PluginKernelNormal(PluginKernelBase):
|
|
|
|
def test_aarch64_virt_insn(self):
|
|
self.set_machine('virt')
|
|
- self.cpu='cortex-a53'
|
|
+ self.cpu='cortex-a57'
|
|
kernel_path = self.ASSET_KERNEL.fetch()
|
|
kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
|
|
'console=ttyAMA0')
|
|
@@ -90,7 +90,7 @@ def test_aarch64_virt_insn(self):
|
|
|
|
def test_aarch64_virt_insn_icount(self):
|
|
self.set_machine('virt')
|
|
- self.cpu='cortex-a53'
|
|
+ self.cpu='cortex-a57'
|
|
kernel_path = self.ASSET_KERNEL.fetch()
|
|
kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE +
|
|
'console=ttyAMA0')
|
|
diff --git a/tests/qemu-iotests/meson.build b/tests/qemu-iotests/meson.build
|
|
index fad340ad59..3c0d5241f6 100644
|
|
--- a/tests/qemu-iotests/meson.build
|
|
+++ b/tests/qemu-iotests/meson.build
|
|
@@ -51,21 +51,21 @@ foreach format, speed: qemu_iotests_formats
|
|
check: true,
|
|
)
|
|
|
|
- foreach item: rc.stdout().strip().split()
|
|
- args = [qemu_iotests_check_cmd,
|
|
- '-tap', '-' + format, item,
|
|
- '--source-dir', meson.current_source_dir(),
|
|
- '--build-dir', meson.current_build_dir()]
|
|
- # Some individual tests take as long as 45 seconds
|
|
- # Bump the timeout to 3 minutes for some headroom
|
|
- # on slow machines to minimize spurious failures
|
|
- test('io-' + format + '-' + item,
|
|
- python,
|
|
- args: args,
|
|
- depends: qemu_iotests_binaries,
|
|
- env: qemu_iotests_env,
|
|
- protocol: 'tap',
|
|
- timeout: 180,
|
|
- suite: suites)
|
|
- endforeach
|
|
+# foreach item: rc.stdout().strip().split()
|
|
+# args = [qemu_iotests_check_cmd,
|
|
+# '-tap', '-' + format, item,
|
|
+# '--source-dir', meson.current_source_dir(),
|
|
+# '--build-dir', meson.current_build_dir()]
|
|
+# # Some individual tests take as long as 45 seconds
|
|
+# # Bump the timeout to 3 minutes for some headroom
|
|
+# # on slow machines to minimize spurious failures
|
|
+# test('io-' + format + '-' + item,
|
|
+# python,
|
|
+# args: args,
|
|
+# depends: qemu_iotests_binaries,
|
|
+# env: qemu_iotests_env,
|
|
+# protocol: 'tap',
|
|
+# timeout: 180,
|
|
+# suite: suites)
|
|
+# endforeach
|
|
endforeach
|
|
diff --git a/tests/qemu-iotests/testenv.py b/tests/qemu-iotests/testenv.py
|
|
index 6326e46b7b..bc849ae9cf 100644
|
|
--- a/tests/qemu-iotests/testenv.py
|
|
+++ b/tests/qemu-iotests/testenv.py
|
|
@@ -252,6 +252,9 @@ def __init__(self, source_dir: str, build_dir: str,
|
|
if self.qemu_prog.endswith(f'qemu-system-{suffix}'):
|
|
self.qemu_options += f' -machine {machine}'
|
|
|
|
+ if self.qemu_prog.endswith('qemu-system-x86_64'):
|
|
+ self.qemu_options += ' -cpu Nehalem'
|
|
+
|
|
# QEMU_DEFAULT_MACHINE
|
|
self.qemu_default_machine = get_default_machine(self.qemu_prog)
|
|
|
|
diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c
|
|
index e7e6926c81..386196edc8 100644
|
|
--- a/tests/qtest/bios-tables-test.c
|
|
+++ b/tests/qtest/bios-tables-test.c
|
|
@@ -1755,6 +1755,7 @@ static void test_acpi_microvm_ioapic2_tcg(void)
|
|
free_test_data(&data);
|
|
}
|
|
|
|
+#if 0 /* Disabled for Red Hat Enterprise Linux */
|
|
static void test_acpi_riscv64_virt_tcg_numamem(void)
|
|
{
|
|
test_data data = {
|
|
@@ -1780,6 +1781,7 @@ static void test_acpi_riscv64_virt_tcg_numamem(void)
|
|
&data);
|
|
free_test_data(&data);
|
|
}
|
|
+#endif /* disabled for RHEL */
|
|
|
|
static void test_acpi_aarch64_virt_tcg_numamem(void)
|
|
{
|
|
@@ -1856,6 +1858,7 @@ static void test_acpi_aarch64_virt_tcg_acpi_spcr(void)
|
|
free_test_data(&data);
|
|
}
|
|
|
|
+#if 0 /* Disabled for Red Hat Enterprise Linux */
|
|
static void test_acpi_riscv64_virt_tcg_acpi_spcr(void)
|
|
{
|
|
test_data data = {
|
|
@@ -1874,6 +1877,7 @@ static void test_acpi_riscv64_virt_tcg_acpi_spcr(void)
|
|
"-machine spcr=off", &data);
|
|
free_test_data(&data);
|
|
}
|
|
+#endif
|
|
|
|
static void test_acpi_tcg_acpi_hmat(const char *machine, const char *arch)
|
|
{
|
|
@@ -2171,6 +2175,7 @@ static void test_acpi_microvm_acpi_erst(void)
|
|
}
|
|
#endif /* CONFIG_POSIX */
|
|
|
|
+#if 0 /* Disabled for Red Hat Enterprise Linux */
|
|
static void test_acpi_riscv64_virt_tcg(void)
|
|
{
|
|
test_data data = {
|
|
@@ -2192,6 +2197,7 @@ static void test_acpi_riscv64_virt_tcg(void)
|
|
test_acpi_one("-cpu rva22s64 ", &data);
|
|
free_test_data(&data);
|
|
}
|
|
+#endif /* disabled for RHEL */
|
|
|
|
static void test_acpi_aarch64_virt_tcg(void)
|
|
{
|
|
@@ -2526,6 +2532,7 @@ static void test_acpi_aarch64_virt_oem_fields(void)
|
|
g_free(args);
|
|
}
|
|
|
|
+#if 0 /* Disabled for Red Hat Enterprise Linux */
|
|
#define LOONGARCH64_INIT_TEST_DATA(data) \
|
|
test_data data = { \
|
|
.machine = "virt", \
|
|
@@ -2594,6 +2601,7 @@ static void test_acpi_loongarch64_virt_oem_fields(void)
|
|
free_test_data(&data);
|
|
g_free(args);
|
|
}
|
|
+#endif
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
@@ -2769,6 +2777,7 @@ int main(int argc, char *argv[])
|
|
qtest_add_func("acpi/virt/viot", test_acpi_aarch64_virt_viot);
|
|
}
|
|
}
|
|
+#if 0 /* Disabled for Red Hat Enterprise Linux */
|
|
} else if (strcmp(arch, "riscv64") == 0) {
|
|
if (has_tcg && qtest_has_device("virtio-blk-pci")) {
|
|
qtest_add_func("acpi/virt", test_acpi_riscv64_virt_tcg);
|
|
@@ -2788,6 +2797,7 @@ int main(int argc, char *argv[])
|
|
qtest_add_func("acpi/virt/oem-fields",
|
|
test_acpi_loongarch64_virt_oem_fields);
|
|
}
|
|
+#endif /* disabled for RHEL */
|
|
}
|
|
ret = g_test_run();
|
|
boot_sector_cleanup(disk);
|
|
diff --git a/tests/qtest/fuzz-e1000e-test.c b/tests/qtest/fuzz-e1000e-test.c
|
|
index 5052883fb6..8242190170 100644
|
|
--- a/tests/qtest/fuzz-e1000e-test.c
|
|
+++ b/tests/qtest/fuzz-e1000e-test.c
|
|
@@ -17,7 +17,7 @@ static void test_lp1879531_eth_get_rss_ex_dst_addr(void)
|
|
{
|
|
QTestState *s;
|
|
|
|
- s = qtest_init("-nographic -monitor none -serial none -M pc-q35-5.0");
|
|
+ s = qtest_init("-nographic -monitor none -serial none -M pc-q35-rhel9.4.0");
|
|
|
|
qtest_outl(s, 0xcf8, 0x80001010);
|
|
qtest_outl(s, 0xcfc, 0xe1020000);
|
|
diff --git a/tests/qtest/fuzz-virtio-scsi-test.c b/tests/qtest/fuzz-virtio-scsi-test.c
|
|
index e37b48b2cc..9f1965b530 100644
|
|
--- a/tests/qtest/fuzz-virtio-scsi-test.c
|
|
+++ b/tests/qtest/fuzz-virtio-scsi-test.c
|
|
@@ -19,7 +19,7 @@ static void test_mmio_oob_from_memory_region_cache(void)
|
|
{
|
|
QTestState *s;
|
|
|
|
- s = qtest_init("-M pc-q35-5.2 -m 512M "
|
|
+ s = qtest_init("-M pc-q35-rhel9.4.0 -m 512M "
|
|
"-device virtio-scsi,num_queues=8,addr=03.0 ");
|
|
|
|
qtest_outl(s, 0xcf8, 0x80001811);
|
|
diff --git a/tests/qtest/intel-hda-test.c b/tests/qtest/intel-hda-test.c
|
|
index 663bb6c485..2efc43e3f7 100644
|
|
--- a/tests/qtest/intel-hda-test.c
|
|
+++ b/tests/qtest/intel-hda-test.c
|
|
@@ -42,7 +42,7 @@ static void test_issue542_ich6(void)
|
|
{
|
|
QTestState *s;
|
|
|
|
- s = qtest_init("-nographic -nodefaults -M pc-q35-6.2 "
|
|
+ s = qtest_init("-nographic -nodefaults -M pc-q35-rhel9.0.0 "
|
|
AUDIODEV
|
|
"-device intel-hda,id=" HDA_ID CODEC_DEVICES);
|
|
|
|
diff --git a/tests/qtest/libqos/meson.build b/tests/qtest/libqos/meson.build
|
|
index 1ddaf7b095..1cb403e90d 100644
|
|
--- a/tests/qtest/libqos/meson.build
|
|
+++ b/tests/qtest/libqos/meson.build
|
|
@@ -43,7 +43,7 @@ libqos_srcs = files(
|
|
'virtio-rng.c',
|
|
'virtio-scsi.c',
|
|
'virtio-serial.c',
|
|
- 'virtio-iommu.c',
|
|
+# 'virtio-iommu.c',
|
|
'virtio-gpio.c',
|
|
'virtio-scmi.c',
|
|
'generic-pcihost.c',
|
|
diff --git a/tests/qtest/lpc-ich9-test.c b/tests/qtest/lpc-ich9-test.c
|
|
index 8ac95b89f7..0e118b76eb 100644
|
|
--- a/tests/qtest/lpc-ich9-test.c
|
|
+++ b/tests/qtest/lpc-ich9-test.c
|
|
@@ -15,7 +15,7 @@ static void test_lp1878642_pci_bus_get_irq_level_assert(void)
|
|
{
|
|
QTestState *s;
|
|
|
|
- s = qtest_init("-M pc-q35-5.0 "
|
|
+ s = qtest_init("-M pc-q35-rhel9.4.0 "
|
|
"-nographic -monitor none -serial none");
|
|
|
|
qtest_outl(s, 0xcf8, 0x8000f840); /* PMBASE */
|
|
diff --git a/tests/qtest/machine-none-test.c b/tests/qtest/machine-none-test.c
|
|
index b6a87d27ed..423ba12159 100644
|
|
--- a/tests/qtest/machine-none-test.c
|
|
+++ b/tests/qtest/machine-none-test.c
|
|
@@ -49,7 +49,7 @@ static struct arch2cpu cpus_map[] = {
|
|
{ "xtensa", "dc233c" },
|
|
{ "xtensaeb", "fsf" },
|
|
{ "hppa", "hppa" },
|
|
- { "riscv64", "rv64" },
|
|
+ { "riscv64", "max" },
|
|
{ "riscv32", "rv32" },
|
|
{ "rx", "rx62n" },
|
|
{ "loongarch64", "la464"},
|
|
diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build
|
|
index b96aa06084..ef44ffaf78 100644
|
|
--- a/tests/qtest/meson.build
|
|
+++ b/tests/qtest/meson.build
|
|
@@ -91,7 +91,6 @@ qtests_i386 = \
|
|
(config_all_devices.has_key('CONFIG_LSI_SCSI_PCI') ? ['fuzz-lsi53c895a-test'] : []) + \
|
|
(config_all_devices.has_key('CONFIG_VIRTIO_SCSI') ? ['fuzz-virtio-scsi-test'] : []) + \
|
|
(config_all_devices.has_key('CONFIG_VIRTIO_BALLOON') ? ['virtio-balloon-test'] : []) + \
|
|
- (config_all_devices.has_key('CONFIG_Q35') ? ['q35-test'] : []) + \
|
|
(config_all_devices.has_key('CONFIG_SB16') ? ['fuzz-sb16-test'] : []) + \
|
|
(config_all_devices.has_key('CONFIG_SDHCI_PCI') ? ['fuzz-sdcard-test'] : []) + \
|
|
(config_all_devices.has_key('CONFIG_ESP_PCI') ? ['am53c974-test'] : []) + \
|
|
diff --git a/tests/qtest/pvpanic-test.c b/tests/qtest/pvpanic-test.c
|
|
index 094c56b0cd..338f94dcd9 100644
|
|
--- a/tests/qtest/pvpanic-test.c
|
|
+++ b/tests/qtest/pvpanic-test.c
|
|
@@ -65,7 +65,7 @@ static void test_pvshutdown(void)
|
|
QDict *response, *data;
|
|
QTestState *qts;
|
|
|
|
- qts = qtest_init("-device pvpanic");
|
|
+ qts = qtest_init("-M q35 -device pvpanic");
|
|
|
|
val = qtest_inb(qts, 0x505);
|
|
g_assert_cmpuint(val, ==, PVPANIC_EVENTS);
|
|
diff --git a/tests/qtest/riscv-csr-test.c b/tests/qtest/riscv-csr-test.c
|
|
index ff5c29e6c6..cc3b08a976 100644
|
|
--- a/tests/qtest/riscv-csr-test.c
|
|
+++ b/tests/qtest/riscv-csr-test.c
|
|
@@ -20,6 +20,7 @@
|
|
#define CSR_MVENDORID 0xf11
|
|
#define CSR_MISELECT 0x350
|
|
|
|
+#if 0 /* Disabled for Red Hat Enterprise Linux */
|
|
static void run_test_csr(void)
|
|
{
|
|
uint64_t res;
|
|
@@ -45,12 +46,15 @@ static void run_test_csr(void)
|
|
|
|
qtest_quit(qts);
|
|
}
|
|
+#endif /* disabled for RHEL */
|
|
|
|
int main(int argc, char **argv)
|
|
{
|
|
g_test_init(&argc, &argv, NULL);
|
|
|
|
+#if 0 /* Disabled for Red Hat Enterprise Linux */
|
|
qtest_add_func("/cpu/csr", run_test_csr);
|
|
+#endif /* disabled for RHEL */
|
|
|
|
return g_test_run();
|
|
}
|
|
diff --git a/tests/qtest/virtio-net-failover.c b/tests/qtest/virtio-net-failover.c
|
|
index 5baf81c3e6..aa87bf5698 100644
|
|
--- a/tests/qtest/virtio-net-failover.c
|
|
+++ b/tests/qtest/virtio-net-failover.c
|
|
@@ -27,6 +27,7 @@
|
|
#define PCI_SEL_BASE 0x0010
|
|
|
|
#define BASE_MACHINE "-M q35 -nodefaults " \
|
|
+ "-global ICH9-LPC.acpi-pci-hotplug-with-bridge-support=on " \
|
|
"-device pcie-root-port,id=root0,addr=0x1,bus=pcie.0,chassis=1 " \
|
|
"-device pcie-root-port,id=root1,addr=0x2,bus=pcie.0,chassis=2 "
|
|
|
|
--
|
|
2.39.3
|
|
|