aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDon Slutz <dslutz@verizon.com>2014-05-05 14:03:07 -0400
committerMichael S. Tsirkin <mst@redhat.com>2014-06-05 19:20:38 +0300
commit711e2f1e9ecad845e142fdddbbf1e8037bce902b (patch)
tree117c9cf88ac59cafc20f747e6c3e1e1adfda4cad /tests
parent9f9260a3be3b7fbd0006a58773abdb164bf9f220 (diff)
downloadqemu-711e2f1e9ecad845e142fdddbbf1e8037bce902b.zip
qemu-711e2f1e9ecad845e142fdddbbf1e8037bce902b.tar.gz
qemu-711e2f1e9ecad845e142fdddbbf1e8037bce902b.tar.bz2
qdev: Add test of qdev_prop_check_global
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 <dslutz@verizon.com> Acked-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/test-qdev-global-props.c4
1 files changed, 4 insertions, 0 deletions
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)