On Wed, Jan 30, 2019 at 11:14:27AM +0800, Jason Wang wrote:
> The tests tries to let qemu server mode to process the connection
> which turns out to be racy after commit 8258292e18c3 ("monitor: Remove
> "x-oob", offer capability "oob" unconditionally"). This is because the
> filter may try to mirror the packets before UNIX socket object is
> ready (connected was set to true) from the view of qemu. In this case
> the packet will be dropped silently.
> 
> Fixing this by passing pre-connected socket created by socketpair() to
> qemu through fd.
> 
> Cc: Peter Maydell <peter.mayd...@linaro.org>
> Cc: Li Zhijian <lizhij...@cn.fujitsu.com>
> Cc: Peter Xu <pet...@redhat.com>
> Cc: Dr. David Alan Gilbert <dgilb...@redhat.com>
> Cc: Zhang Chen <zhangc...@gmail.com>
> Cc: Markus Armbruster <arm...@redhat.com>
> Cc: Daniel P. Berrange <berra...@redhat.com>
> Signed-off-by: Jason Wang <jasow...@redhat.com>
> ---
> Changes from v1:
> - close the socket pairs in the end of test
> ---
>  tests/test-filter-mirror.c | 22 ++++++++++------------
>  1 file changed, 10 insertions(+), 12 deletions(-)

Reviewed-by: Daniel P. Berrangé <berra...@redhat.com>


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

Reply via email to