[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 11/56] tests: qtest: print device_add error before failing test
From: |
Michael S. Tsirkin |
Subject: |
[PULL 11/56] tests: qtest: print device_add error before failing test |
Date: |
Mon, 30 Jan 2023 15:20:06 -0500 |
From: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20230112140312.3096331-2-imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
tests/qtest/libqtest.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tests/qtest/libqtest.c b/tests/qtest/libqtest.c
index 6b2216cb20..d658222a19 100644
--- a/tests/qtest/libqtest.c
+++ b/tests/qtest/libqtest.c
@@ -1435,6 +1435,10 @@ void qtest_qmp_device_add_qdict(QTestState *qts, const
char *drv,
resp = qtest_qmp(qts, "{'execute': 'device_add', 'arguments': %p}", args);
g_assert(resp);
g_assert(!qdict_haskey(resp, "event")); /* We don't expect any events */
+ if (qdict_haskey(resp, "error")) {
+ fprintf(stderr, "error: %s\n",
+ qdict_get_str(qdict_get_qdict(resp, "error"), "desc"));
+ }
g_assert(!qdict_haskey(resp, "error"));
qobject_unref(resp);
}
--
MST
- [PULL 15/56] tests: acpi: update expected blobs, (continued)
- [PULL 15/56] tests: acpi: update expected blobs, Michael S. Tsirkin, 2023/01/30
- [PULL 17/56] pci_bridge: remove whitespace, Michael S. Tsirkin, 2023/01/30
- [PULL 16/56] tests: acpi: cleanup use_uefi argument usage, Michael S. Tsirkin, 2023/01/30
- [PULL 20/56] pcihp: piix4: do not call acpi_pcihp_reset() when ACPI PCI hotplug is disabled, Michael S. Tsirkin, 2023/01/30
- [PULL 01/56] shpc: disallow unplug when power indicator is blinking, Michael S. Tsirkin, 2023/01/30
- [PULL 18/56] x86: acpi: pcihp: clean up duplicate bridge_in_acpi assignment, Michael S. Tsirkin, 2023/01/30
- [PULL 19/56] pci: acpi hotplug: rename x-native-hotplug to x-do-not-expose-native-hotplug-cap, Michael S. Tsirkin, 2023/01/30
- [PULL 24/56] tests: acpi: extend bridge tests with hotplugged bridges, Michael S. Tsirkin, 2023/01/30
- [PULL 22/56] x86: pcihp: fix invalid AML PCNT calls to hotplugged bridges, Michael S. Tsirkin, 2023/01/30
- [PULL 23/56] tests: boot_sector_test: avoid crashing if status is not available yet, Michael S. Tsirkin, 2023/01/30
- [PULL 11/56] tests: qtest: print device_add error before failing test,
Michael S. Tsirkin <=
- [PULL 28/56] pcihp: drop pcihp_bridge_en dependency when composing PCNT method, Michael S. Tsirkin, 2023/01/30
- [PULL 27/56] tests: acpi: whitelist DSDT before refactoring acpi based PCI hotplug machinery, Michael S. Tsirkin, 2023/01/30
- [PULL 29/56] tests: acpi: update expected blobs, Michael S. Tsirkin, 2023/01/30
- [PULL 21/56] pci: acpihp: assign BSEL only to coldplugged bridges, Michael S. Tsirkin, 2023/01/30
- [PULL 30/56] tests: acpi: whitelist DSDT before refactoring acpi based PCI hotplug machinery, Michael S. Tsirkin, 2023/01/30
- [PULL 31/56] pcihp: compose PCNT callchain right before its user _GPE._E01, Michael S. Tsirkin, 2023/01/30
- [PULL 33/56] tests: acpi: update expected blobs, Michael S. Tsirkin, 2023/01/30
- [PULL 38/56] pci: acpi: wire up AcpiDevAmlIf interface to generic bridge, Michael S. Tsirkin, 2023/01/30
- [PULL 35/56] tests: acpi: add endpoint devices to bridges, Michael S. Tsirkin, 2023/01/30
- [PULL 26/56] tests: acpi: add reboot cycle to bridge test, Michael S. Tsirkin, 2023/01/30