From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:48749) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gomfo-0004SK-N1 for qemu-devel@nongnu.org; Wed, 30 Jan 2019 05:00:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gomfn-0005Dj-N1 for qemu-devel@nongnu.org; Wed, 30 Jan 2019 05:00:48 -0500 Received: from mx1.redhat.com ([209.132.183.28]:38254) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gomfn-0005CI-H7 for qemu-devel@nongnu.org; Wed, 30 Jan 2019 05:00:47 -0500 Date: Wed, 30 Jan 2019 10:00:34 +0000 From: Daniel =?utf-8?B?UC4gQmVycmFuZ8Op?= Message-ID: <20190130100034.GC15904@redhat.com> Reply-To: Daniel =?utf-8?B?UC4gQmVycmFuZ8Op?= References: <20190130031427.13129-1-jasowang@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20190130031427.13129-1-jasowang@redhat.com> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH V2] test-filter-mirror: pass UNIX domain socket through fd List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jason Wang Cc: qemu-devel@nongnu.org, Peter Maydell , Li Zhijian , Peter Xu , "Dr . David Alan Gilbert" , Zhang Chen , Markus Armbruster 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. >=20 > Fixing this by passing pre-connected socket created by socketpair() to > qemu through fd. >=20 > Cc: Peter Maydell > Cc: Li Zhijian > Cc: Peter Xu > Cc: Dr. David Alan Gilbert > Cc: Zhang Chen > Cc: Markus Armbruster > Cc: Daniel P. Berrange > Signed-off-by: Jason Wang > --- > 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=C3=A9 Regards, Daniel --=20 |: https://berrange.com -o- https://www.flickr.com/photos/dberran= ge :| |: https://libvirt.org -o- https://fstop138.berrange.c= om :| |: https://entangle-photo.org -o- https://www.instagram.com/dberran= ge :|