diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2015-10-23 15:55:50 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2015-10-23 15:55:50 +0100 |
commit | 1e700f4c6cddaf29ce1d205f0f8e8b9255481930 (patch) | |
tree | 1a9c88f0ec27fc95017cda04e701c8016f1a0b08 | |
parent | 147482ae35b896808af68c0051ad86d3aae12979 (diff) | |
parent | b3e9e584fcef49be8ca0c355d11030f0bf6231b0 (diff) |
Merge remote-tracking branch 'remotes/mdroth/tags/qga-pull-2015-10-23-tag' into staging
qemu-ga patch queue
* unbreak qga-test unit test on travis-ci systems by not assuming a
disk-based filesystem must be present
# gpg: Signature made Fri 23 Oct 2015 15:01:47 BST using RSA key ID F108B584
# gpg: Good signature from "Michael Roth <flukshun@gmail.com>"
# gpg: aka "Michael Roth <mdroth@utexas.edu>"
# gpg: aka "Michael Roth <mdroth@linux.vnet.ibm.com>"
* remotes/mdroth/tags/qga-pull-2015-10-23-tag:
tests: test-qga, loosen assumptions about host filesystems
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r-- | tests/test-qga.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/test-qga.c b/tests/test-qga.c index 0531c9f3bc..64738465c5 100644 --- a/tests/test-qga.c +++ b/tests/test-qga.c @@ -273,13 +273,15 @@ static void test_qga_get_fsinfo(gconstpointer fix) g_assert_nonnull(ret); qmp_assert_no_error(ret); - /* check there is at least a fs */ + /* sanity-check the response if there are any filesystems */ list = qdict_get_qlist(ret, "return"); entry = qlist_first(list); - g_assert(qdict_haskey(qobject_to_qdict(entry->value), "name")); - g_assert(qdict_haskey(qobject_to_qdict(entry->value), "mountpoint")); - g_assert(qdict_haskey(qobject_to_qdict(entry->value), "type")); - g_assert(qdict_haskey(qobject_to_qdict(entry->value), "disk")); + if (entry) { + g_assert(qdict_haskey(qobject_to_qdict(entry->value), "name")); + g_assert(qdict_haskey(qobject_to_qdict(entry->value), "mountpoint")); + g_assert(qdict_haskey(qobject_to_qdict(entry->value), "type")); + g_assert(qdict_haskey(qobject_to_qdict(entry->value), "disk")); + } QDECREF(ret); } |