diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2017-06-01 10:58:47 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2017-06-01 10:58:47 +0100 |
commit | 70f31414e71250c6049a46851372ee6ea76f40dd (patch) | |
tree | bc7c663727ae970cd0949b8e361fa8c72f8f862f | |
parent | 0748b3526e8cb78b9cd64208426bfc3d54a72b04 (diff) | |
parent | f892291eee376505cfec8b6cade7ccf952a6d3e0 (diff) |
Merge remote-tracking branch 'remotes/ehabkost/tags/numa-pull-request' into staging
NUMA fixes, 2017-05-30
# gpg: Signature made Tue 30 May 2017 20:10:44 BST
# gpg: using RSA key 0x2807936F984DC5A6
# gpg: Good signature from "Eduardo Habkost <ehabkost@redhat.com>"
# Primary key fingerprint: 5A32 2FD5 ABC4 D3DB ACCF D1AA 2807 936F 984D C5A6
* remotes/ehabkost/tags/numa-pull-request:
numa: Fix format string for "Invalid node" message
numa-test: fix query-cpus leaks
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r-- | numa.c | 3 | ||||
-rw-r--r-- | tests/numa-test.c | 14 |
2 files changed, 10 insertions, 7 deletions
@@ -231,8 +231,7 @@ static void parse_numa_distance(NumaDistOptions *dist, Error **errp) if (src >= MAX_NODES || dst >= MAX_NODES) { error_setg(errp, - "Invalid node %" PRIu16 - ", max possible could be %" PRIu16, + "Invalid node %d, max possible could be %d", MAX(src, dst), MAX_NODES); return; } diff --git a/tests/numa-test.c b/tests/numa-test.c index c3475d6d5e..3f636840b1 100644 --- a/tests/numa-test.c +++ b/tests/numa-test.c @@ -92,7 +92,7 @@ static QList *get_cpus(QDict **resp) *resp = qmp("{ 'execute': 'query-cpus' }"); g_assert(*resp); g_assert(qdict_haskey(*resp, "return")); - return qdict_get_qlist(*resp, "return"); + return qdict_get_qlist(*resp, "return"); } static void test_query_cpus(const void *data) @@ -100,7 +100,7 @@ static void test_query_cpus(const void *data) char *cli; QDict *resp; QList *cpus; - const QObject *e; + QObject *e; cli = make_cli(data, "-smp 8 -numa node,cpus=0-3 -numa node,cpus=4-7"); qtest_start(cli); @@ -124,6 +124,7 @@ static void test_query_cpus(const void *data) } else { g_assert_cmpint(node, ==, 1); } + qobject_decref(e); } QDECREF(resp); @@ -136,7 +137,7 @@ static void pc_numa_cpu(const void *data) char *cli; QDict *resp; QList *cpus; - const QObject *e; + QObject *e; cli = make_cli(data, "-cpu pentium -smp 8,sockets=2,cores=2,threads=2 " "-numa node,nodeid=0 -numa node,nodeid=1 " @@ -176,6 +177,7 @@ static void pc_numa_cpu(const void *data) } else { g_assert(false); } + qobject_decref(e); } QDECREF(resp); @@ -188,7 +190,7 @@ static void spapr_numa_cpu(const void *data) char *cli; QDict *resp; QList *cpus; - const QObject *e; + QObject *e; cli = make_cli(data, "-smp 4,cores=4 " "-numa node,nodeid=0 -numa node,nodeid=1 " @@ -220,6 +222,7 @@ static void spapr_numa_cpu(const void *data) } else { g_assert(false); } + qobject_decref(e); } QDECREF(resp); @@ -232,7 +235,7 @@ static void aarch64_numa_cpu(const void *data) char *cli; QDict *resp; QList *cpus; - const QObject *e; + QObject *e; cli = make_cli(data, "-smp 2 " "-numa node,nodeid=0 -numa node,nodeid=1 " @@ -262,6 +265,7 @@ static void aarch64_numa_cpu(const void *data) } else { g_assert(false); } + qobject_decref(e); } QDECREF(resp); |