summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPeter Maydell2016-08-04 11:24:27 +0200
committerPeter Maydell2016-08-04 11:24:27 +0200
commit09704e6ded83fa0bec14baf32f800f6512156ca0 (patch)
tree72647b9a6c3b35984749926c21a9d2c17e86b3ee /tests
parentMerge remote-tracking branch 'remotes/kraxel/tags/pull-vnc-20160803-1' into s... (diff)
parentutil: Fix assertion in iov_copy() upon zero 'bytes' and non-zero 'offset' (diff)
downloadqemu-09704e6ded83fa0bec14baf32f800f6512156ca0.tar.gz
qemu-09704e6ded83fa0bec14baf32f800f6512156ca0.tar.xz
qemu-09704e6ded83fa0bec14baf32f800f6512156ca0.zip
Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging
* xsetbv fix (x86 targets TCG) * remove unused functions * qht segfault and memory leak fixes * NBD fixes * Fix for non-power-of-2 discard granularity * Memory hotplug fixes * Migration regressions * IOAPIC fixes and (disabled by default) EOI register support * Various other small fixes # gpg: Signature made Wed 03 Aug 2016 18:01:05 BST # gpg: using RSA key 0xBFFBD25F78C7AE83 # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1 # Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83 * remotes/bonzini/tags/for-upstream: (25 commits) util: Fix assertion in iov_copy() upon zero 'bytes' and non-zero 'offset' qdev: Fix use after free in qdev_init_nofail error path Reorganize help output of '-display' option x86: ioapic: add support for explicit EOI x86: ioapic: ignore level irq during processing apic: fix broken migration for kvm-apic fw_cfg: Make base type "fw_cfg" abstract block: Cater to iscsi with non-power-of-2 discard osdep: Document differences in rounding macros nbd: Limit nbdflags to 16 bits nbd: Fix bad flag detection on server i2c: fix migration regression introduced by broadcast support mptsas: really fix migration compatibility qdist: return "(empty)" instead of NULL when printing an empty dist qdist: use g_renew and g_new instead of g_realloc and g_malloc. qdist: fix memory leak during binning target-i386: fix typo in xsetbv implementation qht: do not segfault when gathering stats from an uninitialized qht util: Drop inet_listen() util: drop unix_nonblocking_connect() ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/test-qdist.c10
-rw-r--r--tests/test-qht.c4
2 files changed, 12 insertions, 2 deletions
diff --git a/tests/test-qdist.c b/tests/test-qdist.c
index 0298986ac9..9541ce31eb 100644
--- a/tests/test-qdist.c
+++ b/tests/test-qdist.c
@@ -360,10 +360,16 @@ static void test_none(void)
g_assert(isnan(qdist_xmax(&dist)));
pr = qdist_pr_plain(&dist, 0);
- g_assert(pr == NULL);
+ g_assert_cmpstr(pr, ==, "(empty)");
+ g_free(pr);
pr = qdist_pr_plain(&dist, 2);
- g_assert(pr == NULL);
+ g_assert_cmpstr(pr, ==, "(empty)");
+ g_free(pr);
+
+ pr = qdist_pr(&dist, 0, QDIST_PR_BORDER);
+ g_assert_cmpstr(pr, ==, "(empty)");
+ g_free(pr);
qdist_destroy(&dist);
}
diff --git a/tests/test-qht.c b/tests/test-qht.c
index f1d628371d..46a64b6731 100644
--- a/tests/test-qht.c
+++ b/tests/test-qht.c
@@ -95,8 +95,12 @@ static void iter_check(unsigned int count)
static void qht_do_test(unsigned int mode, size_t init_entries)
{
+ /* under KVM we might fetch stats from an uninitialized qht */
+ check_n(0);
+
qht_init(&ht, 0, mode);
+ check_n(0);
insert(0, N);
check(0, N, true);
check_n(N);