[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v7 11/11] tests: functional tests for QMP comman
From: |
Igor Mammedov |
Subject: |
Re: [Qemu-devel] [PATCH v7 11/11] tests: functional tests for QMP command set-numa-node |
Date: |
Thu, 17 May 2018 13:27:16 +0200 |
On Thu, 17 May 2018 10:01:34 +0200
Igor Mammedov <address@hidden> wrote:
> On Wed, 16 May 2018 19:12:30 -0300
> Eduardo Habkost <address@hidden> wrote:
>
> > On Fri, May 04, 2018 at 10:37:49AM +0200, Igor Mammedov wrote:
> > > * start QEMU with 2 unmapped cpus,
> > > * while in preconfig state
> > > * add 2 numa nodes
> > > * assign cpus to them
> > > * exit preconfig and in running state check that cpus
> > > are mapped correctly.
> > >
> > > Signed-off-by: Igor Mammedov <address@hidden>
> > > ---
> > > v6:
> > > * replace 'cont' with 'exit-preconfig' command
> > > v5:
> > > * s/qobject_to_qdict(/qobject_to(QDict,/
> > > * s/-preconfig/--preconfig/
> > > v4:
> > > * drop duplicate is_err() and reuse qmp_rsp_is_err() wich is moved
> > > to generic file libqtest.c. (Eric Blake <address@hidden>)
> > >
> > > FIXUP! tests: functional tests for QMP command set-numa-node
> > > ---
> > > tests/libqtest.h | 9 ++++++++
> > > tests/libqtest.c | 7 +++++++
> > > tests/numa-test.c | 61
> > > +++++++++++++++++++++++++++++++++++++++++++++++++++++++
> > > tests/qmp-test.c | 7 -------
> > > 4 files changed, 77 insertions(+), 7 deletions(-)
> > >
> > > diff --git a/tests/libqtest.h b/tests/libqtest.h
> > > index cbe8df4..ac52872 100644
> > > --- a/tests/libqtest.h
> > > +++ b/tests/libqtest.h
> > > @@ -972,4 +972,13 @@ void qtest_qmp_device_add(const char *driver, const
> > > char *id, const char *fmt,
> > > */
> > > void qtest_qmp_device_del(const char *id);
> > >
> > > +/**
> > > + * qmp_rsp_is_err:
> > > + * @rsp: QMP response to check for error
> > > + *
> > > + * Test @rsp for error and discard @rsp.
> > > + * Returns 'true' if there is error in @rsp and 'false' otherwise.
> > > + */
> > > +bool qmp_rsp_is_err(QDict *rsp);
> > > +
> > > #endif
> > > diff --git a/tests/libqtest.c b/tests/libqtest.c
> > > index 6f33a37..33426d5 100644
> > > --- a/tests/libqtest.c
> > > +++ b/tests/libqtest.c
> > > @@ -1098,3 +1098,10 @@ void qtest_qmp_device_del(const char *id)
> > > QDECREF(response1);
> > > QDECREF(response2);
> > > }
> > > +
> > > +bool qmp_rsp_is_err(QDict *rsp)
> > > +{
> > > + QDict *error = qdict_get_qdict(rsp, "error");
> > > + QDECREF(rsp);
> >
> >
> > Oops:
> >
> > tests/libqtest.c: In function ‘qmp_rsp_is_err’:
> > tests/libqtest.c:1105:5: error: implicit declaration of function
> > ‘QDECREF’ [-Werror=implicit-function-declaration]
> > QDECREF(rsp);
> > ^
> > tests/libqtest.c:1105:5: error: nested extern declaration of ‘QDECREF’
> > [-Werror=nested-externs]
> >
> > I've fixed this on numa-next, replaced QDECREF with object_unref.
> I guess QDECREF was removed while patch were sitting on the list.
change affected 8th and 11th patches make the last depended on 8th.
I'll post rebased v8 8,11th patches here so it would still bisectable
and include into 8th Eric's request for negative exit-preconfig testcase (+3LOC)
Re: [Qemu-devel] [PATCH v7 00/11] enable numa configuration before machine_init() from QMP, Eduardo Habkost, 2018/05/16
Re: [Qemu-devel] [PATCH v7 00/11] enable numa configuration before machine_init() from QMP, Igor Mammedov, 2018/05/30