diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2020-09-30 11:40:38 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2020-09-30 11:40:38 +0100 |
commit | cbba3dc6ea3fc9aa66e9f9eb41051536e3ad7cd0 (patch) | |
tree | 34126633223c7a7d71d82a879ddd11dda943c208 /tests | |
parent | e344ffe73bd77e7067099155cfd8bf42b07ed631 (diff) | |
parent | 42803552319a5481e90e93382d74a7336dfab496 (diff) | |
download | qemu-cbba3dc6ea3fc9aa66e9f9eb41051536e3ad7cd0.zip qemu-cbba3dc6ea3fc9aa66e9f9eb41051536e3ad7cd0.tar.gz qemu-cbba3dc6ea3fc9aa66e9f9eb41051536e3ad7cd0.tar.bz2 |
Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging
acpi: unit test
This just adds a unit test for previously merged functionality.
A bit unusual, but we have a contribitor under a deadline,
let's be nice and merge the unit test right away - does no harm.
Hopefully this won't be a beginning of a trend ...
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
# gpg: Signature made Wed 30 Sep 2020 09:13:13 BST
# gpg: using RSA key 5D09FD0871C8F85B94CA8A0D281F0DB8D28D5469
# gpg: issuer "mst@redhat.com"
# gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" [full]
# gpg: aka "Michael S. Tsirkin <mst@redhat.com>" [full]
# Primary key fingerprint: 0270 606B 6F3C DF3D 0B17 0970 C350 3912 AFBE 8E67
# Subkey fingerprint: 5D09 FD08 71C8 F85B 94CA 8A0D 281F 0DB8 D28D 5469
* remotes/mst/tags/for_upstream:
tests/acpi: add DSDT.hpbrroot DSDT table blob to test global i440fx hotplug
tests/acpi: unit test exercising global pci hotplug off for i440fx
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/data/acpi/pc/DSDT.hpbrroot | bin | 0 -> 3079 bytes | |||
-rw-r--r-- | tests/qtest/bios-tables-test.c | 17 |
2 files changed, 17 insertions, 0 deletions
diff --git a/tests/data/acpi/pc/DSDT.hpbrroot b/tests/data/acpi/pc/DSDT.hpbrroot Binary files differnew file mode 100644 index 0000000..36b0a8f --- /dev/null +++ b/tests/data/acpi/pc/DSDT.hpbrroot diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index 3c09b84..b514b70 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c @@ -770,6 +770,21 @@ static void test_acpi_piix4_no_bridge_hotplug(void) free_test_data(&data); } +static void test_acpi_piix4_no_acpi_pci_hotplug(void) +{ + test_data data; + + memset(&data, 0, sizeof(data)); + data.machine = MACHINE_PC; + data.variant = ".hpbrroot"; + data.required_struct_types = base_required_struct_types; + data.required_struct_types_len = ARRAY_SIZE(base_required_struct_types); + test_acpi_one("-global PIIX4_PM.acpi-root-pci-hotplug=off " + "-global PIIX4_PM.acpi-pci-hotplug-with-bridge-support=off " + "-device pci-bridge,chassis_nr=1", &data); + free_test_data(&data); +} + static void test_acpi_q35_tcg(void) { test_data data; @@ -1192,6 +1207,8 @@ int main(int argc, char *argv[]) test_acpi_piix4_no_root_hotplug); qtest_add_func("acpi/piix4/pci-hotplug/no_bridge_hotplug", test_acpi_piix4_no_bridge_hotplug); + qtest_add_func("acpi/piix4/pci-hotplug/off", + test_acpi_piix4_no_acpi_pci_hotplug); qtest_add_func("acpi/q35", test_acpi_q35_tcg); qtest_add_func("acpi/q35/bridge", test_acpi_q35_tcg_bridge); qtest_add_func("acpi/q35/mmio64", test_acpi_q35_tcg_mmio64); |