[Qemu-devel] [PATCH 0/3] tests: trivial enhancements for OOB

Peter Xu posted 3 patches 7 years, 7 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20180321065506.21091-1-peterx@redhat.com
Test checkpatch passed
Test docker-build@min-glib passed
Test docker-mingw@fedora passed
Test docker-quick@centos6 failed
Test s390x passed
tests/Makefile.include                  |  1 +
tests/qapi-schema/doc-good.out          |  4 ++--
tests/qapi-schema/ident-with-escape.out |  2 +-
tests/qapi-schema/indented-expr.out     |  4 ++--
tests/qapi-schema/oob-test.err          |  0
tests/qapi-schema/oob-test.exit         |  1 +
tests/qapi-schema/oob-test.json         |  2 ++
tests/qapi-schema/oob-test.out          |  6 ++++++
tests/qapi-schema/qapi-schema-test.out  | 18 +++++++++---------
tests/qapi-schema/test-qapi.py          |  4 ++--
tests/qmp-test.c                        |  8 +++++++-
11 files changed, 33 insertions(+), 17 deletions(-)
create mode 100644 tests/qapi-schema/oob-test.err
create mode 100644 tests/qapi-schema/oob-test.exit
create mode 100644 tests/qapi-schema/oob-test.json
create mode 100644 tests/qapi-schema/oob-test.out
[Qemu-devel] [PATCH 0/3] tests: trivial enhancements for OOB
Posted by Peter Xu 7 years, 7 months ago
First two patches add OOB detection for current qapi-schema tests
(which I missed in the OOB series but pointed out by Eric Blake).  The
3rd patch addressed one suggestion from Eric too here:

http://lists.gnu.org/archive/html/qemu-devel/2018-03/msg03177.html

I tried to batch the commands in a single string buffer but it's not
that easy - because currently qtest_async_qmp() (and finally,
qmp_fd_sendv()) does not really support multiple qobjects in a single
command buffer.  Let's put that aside.  After all even calling
qtest_async_qmp() many times would be really fast, since we are
basically filling things to the write buffer very quickly (I believe
that's much faster than the IO really flushed to the receiver side).

But, adding the "id" field and check that would be far easier, that's
what I did in that last patch.

It's fine even for 2.12, but I'll let people decide.

Please review, thanks.

Peter Xu (3):
  tests: let qapi-schema tests detect oob
  tests: add oob-test for qapi-schema
  tests: more strict command batching test

 tests/Makefile.include                  |  1 +
 tests/qapi-schema/doc-good.out          |  4 ++--
 tests/qapi-schema/ident-with-escape.out |  2 +-
 tests/qapi-schema/indented-expr.out     |  4 ++--
 tests/qapi-schema/oob-test.err          |  0
 tests/qapi-schema/oob-test.exit         |  1 +
 tests/qapi-schema/oob-test.json         |  2 ++
 tests/qapi-schema/oob-test.out          |  6 ++++++
 tests/qapi-schema/qapi-schema-test.out  | 18 +++++++++---------
 tests/qapi-schema/test-qapi.py          |  4 ++--
 tests/qmp-test.c                        |  8 +++++++-
 11 files changed, 33 insertions(+), 17 deletions(-)
 create mode 100644 tests/qapi-schema/oob-test.err
 create mode 100644 tests/qapi-schema/oob-test.exit
 create mode 100644 tests/qapi-schema/oob-test.json
 create mode 100644 tests/qapi-schema/oob-test.out

-- 
2.14.3


Re: [Qemu-devel] [PATCH 0/3] tests: trivial enhancements for OOB
Posted by Eric Blake 7 years, 7 months ago
On 03/21/2018 01:55 AM, Peter Xu wrote:
> First two patches add OOB detection for current qapi-schema tests
> (which I missed in the OOB series but pointed out by Eric Blake).  The
> 3rd patch addressed one suggestion from Eric too here:
> 
> http://lists.gnu.org/archive/html/qemu-devel/2018-03/msg03177.html
> 
> I tried to batch the commands in a single string buffer but it's not
> that easy - because currently qtest_async_qmp() (and finally,
> qmp_fd_sendv()) does not really support multiple qobjects in a single
> command buffer.  Let's put that aside.  After all even calling
> qtest_async_qmp() many times would be really fast, since we are
> basically filling things to the write buffer very quickly (I believe
> that's much faster than the IO really flushed to the receiver side).
> 
> But, adding the "id" field and check that would be far easier, that's
> what I did in that last patch.
> 
> It's fine even for 2.12, but I'll let people decide.

I consider added testsuite coverage of a new feature to be a bug fix 
(the feature was incomplete if the testsuite doesn't prevent regressions 
in the feature) and safe for freeze (the testsuite changes don't impact 
the main binary, so they can't break anything), so I'm happy to queue 
this through my qapi tree for 2.12 once it is reviewed.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org