mbox series

[for-3.2,00/10] vhost: preparation for qgraph conversion of vhost-user-test

Message ID 20181115143124.19234-1-pbonzini@redhat.com
Headers show
Series vhost: preparation for qgraph conversion of vhost-user-test | expand

Message

Paolo Bonzini Nov. 15, 2018, 2:31 p.m. UTC
The vhost-user-test is one of the most complex qtests in the tree,
and converting it to qgraph poses some unique challenges.  This series
addresses them in a way that does not depend on the qgraph conversion
itself, but prepares for it.

First of all, vhost-user-test is slow and that is a pain when debugging
it. :) So patches 1 and 2 fix this bug.

Second, qgraph will be able to test vhost-user-test on pSeries and ARM
virt (with virtio-mmio) machine types.  Patches 3 and 4 prepares for this
by compiling vhost-net even on TCG-only targets, and by supporting
wrong-endianness vnet headers.  Patches 5 and 6 instead make the test
more robust, so that it can run on those machines too.

Third, vhost-user-test is a bit strange in that it has more global state
than other tests (in particular a GMainLoop, but also a directory in /tmp
and some weird uses of global_qtest).  Patches 7 to 10 thus remove this
global state already, which simplifies the code and also will reduce
the diff for the qgraph conversion.

Please review and ack!  Thanks,

Paolo

Paolo Bonzini (10):
  vhost-user-test: use g_cond_broadcast
  vhost-user-test: signal data_cond when s->rings changes
  vhost-net: compile it for all targets
  vhost-user: support cross-endian vnet headers
  vhost-user-test: support VHOST_USER_PROTOCOL_F_CROSS_ENDIAN
  vhost-user-test: skip if there is no memory at address 0
  vhost-user-test: reduce usage of global_qtest
  vhost-user-test: create a main loop per TestServer
  vhost-user-test: small changes to init_hugepagefs
  vhost-user-test: create a temporary directory per TestServer

 configure               |  13 +--
 include/exec/poison.h   |   1 -
 net/net.c               |   2 +-
 net/vhost-user.c        |  13 +++
 tests/Makefile.include  |   5 +-
 tests/vhost-user-test.c | 234 ++++++++++++++++++++++------------------
 6 files changed, 147 insertions(+), 121 deletions(-)

Comments

no-reply@patchew.org Nov. 16, 2018, 12:43 a.m. UTC | #1
Hi,

This series seems to have some coding style problems. See output below for
more information:

Message-id: 20181115143124.19234-1-pbonzini@redhat.com
Type: series
Subject: [Qemu-devel] [PATCH for-3.2 00/10] vhost: preparation for qgraph conversion of vhost-user-test

=== TEST SCRIPT BEGIN ===
#!/bin/bash

BASE=base
n=1
total=$(git log --oneline $BASE.. | wc -l)
failed=0

git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram

commits="$(git log --format=%H --reverse $BASE..)"
for c in $commits; do
    echo "Checking PATCH $n/$total: $(git log -n 1 --format=%s $c)..."
    if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then
        failed=1
        echo
    fi
    n=$((n+1))
done

exit $failed
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
Switched to a new branch 'test'
d7a4ddd vhost-user-test: create a temporary directory per TestServer
0671cab vhost-user-test: small changes to init_hugepagefs
2afa43f vhost-user-test: create a main loop per TestServer
49ae390 vhost-user-test: reduce usage of global_qtest
2732f0b vhost-user-test: skip if there is no memory at address 0
b792e50 vhost-user-test: support VHOST_USER_PROTOCOL_F_CROSS_ENDIAN
b82ba2f vhost-user: support cross-endian vnet headers
48b61f6 vhost-net: compile it for all targets
8e327b5 vhost-user-test: signal data_cond when s->rings changes
4e3260e vhost-user-test: use g_cond_broadcast

=== OUTPUT BEGIN ===
Checking PATCH 1/10: vhost-user-test: use g_cond_broadcast...
Checking PATCH 2/10: vhost-user-test: signal data_cond when s->rings changes...
Checking PATCH 3/10: vhost-net: compile it for all targets...
Checking PATCH 4/10: vhost-user: support cross-endian vnet headers...
Checking PATCH 5/10: vhost-user-test: support VHOST_USER_PROTOCOL_F_CROSS_ENDIAN...
Checking PATCH 6/10: vhost-user-test: skip if there is no memory at address 0...
Checking PATCH 7/10: vhost-user-test: reduce usage of global_qtest...
WARNING: line over 80 characters
#21: FILE: tests/vhost-user-test.c:190:
+static void init_virtio_dev(QTestState *qts, TestServer *s, uint32_t features_mask)

WARNING: line over 80 characters
#54: FILE: tests/vhost-user-test.c:296:
+            uint32_t a = qtest_readb(qts, s->memory.regions[i].guest_phys_addr + j);

total: 0 errors, 2 warnings, 132 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
Checking PATCH 8/10: vhost-user-test: create a main loop per TestServer...
ERROR: space prohibited between function name and open parenthesis '('
#50: FILE: tests/vhost-user-test.c:551:
+        g_main_context_iteration (NULL, TRUE);

total: 1 errors, 0 warnings, 82 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

Checking PATCH 9/10: vhost-user-test: small changes to init_hugepagefs...
Checking PATCH 10/10: vhost-user-test: create a temporary directory per TestServer...
=== OUTPUT END ===

Test command exited with code: 1


---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@redhat.com