[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 10/10] qdev: Add test of qdev_prop_check_global
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL 10/10] qdev: Add test of qdev_prop_check_global |
Date: |
Thu, 5 Jun 2014 20:17:42 +0300 |
From: Don Slutz <address@hidden>
This will generate a warning from "make check":
...
GTESTER tests/test-qdev-global-props
Warning: "-global dynamic-prop-type-bad.prop3=103" not used
GTESTER tests/check-qom-interface
...
If the warning is not generated, the test will fail.
Signed-off-by: Don Slutz <address@hidden>
Acked-by: Michael S. Tsirkin <address@hidden>
---
tests/test-qdev-global-props.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tests/test-qdev-global-props.c b/tests/test-qdev-global-props.c
index e4ad173..2bef04c 100644
--- a/tests/test-qdev-global-props.c
+++ b/tests/test-qdev-global-props.c
@@ -150,8 +150,10 @@ static void test_dynamic_globalprop(void)
static GlobalProperty props[] = {
{ TYPE_DYNAMIC_PROPS, "prop1", "101" },
{ TYPE_DYNAMIC_PROPS, "prop2", "102" },
+ { TYPE_DYNAMIC_PROPS"-bad", "prop3", "103", true },
{}
};
+ int all_used;
qdev_prop_register_global_list(props);
@@ -160,6 +162,8 @@ static void test_dynamic_globalprop(void)
g_assert_cmpuint(mt->prop1, ==, 101);
g_assert_cmpuint(mt->prop2, ==, 102);
+ all_used = qdev_prop_check_global();
+ g_assert_cmpuint(all_used, ==, 1);
}
int main(int argc, char **argv)
--
MST
- [Qemu-devel] [PULL 00/10] pc,pci,virtio,qdev fixes, tests, Michael S. Tsirkin, 2014/06/05
- [Qemu-devel] [PULL 02/10] SMBIOS: Fix endian-ness when populating multi-byte fields, Michael S. Tsirkin, 2014/06/05
- [Qemu-devel] [PULL 01/10] serial-pci: Set prog interface field of pci config to 16550 compatible, Michael S. Tsirkin, 2014/06/05
- [Qemu-devel] [PULL 03/10] SMBIOS: Update Type 0 struct generator for machines >= 2.1, Michael S. Tsirkin, 2014/06/05
- [Qemu-devel] [PULL 04/10] SMBIOS: Fix type 17 field sizes, Michael S. Tsirkin, 2014/06/05
- [Qemu-devel] [PULL 05/10] pcie_host: Turn pcie_host_init() into an instance_init, Michael S. Tsirkin, 2014/06/05
- [Qemu-devel] [PULL 06/10] virtio-balloon: return empty data when no stats are available, Michael S. Tsirkin, 2014/06/05
- [Qemu-devel] [PULL 07/10] tests: rename acpi-test to bios-tables-test, Michael S. Tsirkin, 2014/06/05
- [Qemu-devel] [PULL 09/10] qdev: Display warning about unused -global, Michael S. Tsirkin, 2014/06/05
- [Qemu-devel] [PULL 10/10] qdev: Add test of qdev_prop_check_global,
Michael S. Tsirkin <=
- [Qemu-devel] [PULL 08/10] tests: add smbios testing, Michael S. Tsirkin, 2014/06/05
- Re: [Qemu-devel] [PULL 00/10] pc,pci,virtio,qdev fixes, tests, Peter Maydell, 2014/06/05