From: "Michael S. Tsirkin" <mst@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
"Eduardo Habkost" <ehabkost@redhat.com>,
"Don Slutz" <dslutz@verizon.com>,
"Anthony Liguori" <aliguori@amazon.com>,
=?UTF-8?q?Andreas=20F=C3=A4rber?= <afaerber@suse.de>
Subject: [Qemu-devel] [PULL 10/10] qdev: Add test of qdev_prop_check_global
Date: Thu, 5 Jun 2014 20:17:42 +0300 [thread overview]
Message-ID: <1401986505-12359-11-git-send-email-mst@redhat.com> (raw)
In-Reply-To: <1401986505-12359-1-git-send-email-mst@redhat.com>
From: Don Slutz <dslutz@verizon.com>
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>
---
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
next prev parent reply other threads:[~2014-06-05 17:17 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-05 17:17 [Qemu-devel] [PULL 00/10] pc,pci,virtio,qdev fixes, tests Michael S. Tsirkin
2014-06-05 17:17 ` [Qemu-devel] [PULL 01/10] serial-pci: Set prog interface field of pci config to 16550 compatible Michael S. Tsirkin
2014-06-05 17:17 ` [Qemu-devel] [PULL 02/10] SMBIOS: Fix endian-ness when populating multi-byte fields Michael S. Tsirkin
2014-06-05 17:17 ` [Qemu-devel] [PULL 03/10] SMBIOS: Update Type 0 struct generator for machines >= 2.1 Michael S. Tsirkin
2014-06-05 17:17 ` [Qemu-devel] [PULL 04/10] SMBIOS: Fix type 17 field sizes Michael S. Tsirkin
2014-06-05 17:17 ` [Qemu-devel] [PULL 05/10] pcie_host: Turn pcie_host_init() into an instance_init Michael S. Tsirkin
2014-06-05 17:17 ` [Qemu-devel] [PULL 06/10] virtio-balloon: return empty data when no stats are available Michael S. Tsirkin
2014-06-05 17:17 ` [Qemu-devel] [PULL 07/10] tests: rename acpi-test to bios-tables-test Michael S. Tsirkin
2014-06-05 17:17 ` [Qemu-devel] [PULL 08/10] tests: add smbios testing Michael S. Tsirkin
2014-06-05 17:17 ` [Qemu-devel] [PULL 09/10] qdev: Display warning about unused -global Michael S. Tsirkin
2014-06-05 17:17 ` Michael S. Tsirkin [this message]
2014-06-09 12:19 ` [Qemu-devel] [PULL 10/10] qdev: Add test of qdev_prop_check_global Peter Maydell
2014-06-09 13:10 ` Michael S. Tsirkin
2014-06-09 22:53 ` Eduardo Habkost
2014-06-05 21:40 ` [Qemu-devel] [PULL 00/10] pc,pci,virtio,qdev fixes, tests Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1401986505-12359-11-git-send-email-mst@redhat.com \
--to=mst@redhat.com \
--cc=afaerber@suse.de \
--cc=aliguori@amazon.com \
--cc=dslutz@verizon.com \
--cc=ehabkost@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).