From: Andrew Cooper Subject: Re: [XTF PATCH v2] xtf-runner: use xl create -Fc directly Date: Tue, 9 Aug 2016 14:11:27 +0100 Message-ID: References: <1470655469-7893-1-git-send-email-wei.liu2@citrix.com> <86aa4c33-61c8-0f3d-0b6b-9a3f285a44a5@citrix.com> <20160808131342.GI32096@citrix.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2235839403188604088==" Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bX7GG-0001kH-RP for xen-devel@lists.xenproject.org; Tue, 09 Aug 2016 13:40:04 +0000 In-Reply-To: <20160808131342.GI32096@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: Wei Liu Cc: Xen-devel , Ian Jackson List-Id: xen-devel@lists.xenproject.org --===============2235839403188604088== Content-Type: multipart/alternative; boundary="------------04DAB5BD26E78F7C430BA876" --------------04DAB5BD26E78F7C430BA876 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit On 08/08/16 14:13, Wei Liu wrote: > On Mon, Aug 08, 2016 at 02:06:37PM +0100, Andrew Cooper wrote: >> On 08/08/16 12:24, Wei Liu wrote: >>> Now that xl create -c is fixed in xen-unstable, there is no need to keep >>> the hack to get guest console output anymore. >>> >>> Use xl create -Fc directly, then wait for the xl process to exit. Print >>> any error as it occurs. >>> >>> Signed-off-by: Wei Liu >> Sadly, now I think about this further, it does re-introduce the >> serialisation problem I was trying specifically trying to avoid. >> > Can you give an example of the race you wanted to avoid? > > I thought with the xenconsole work in place I had solved all races I was > aware of, but maybe I missed something obvious. It isn't a race. I do not want synchronously wait for the taredown of domains to complete, as it adds unnecessary latency when running more than a single test. >> You need to run `xl create -F` so you can sensibly wait on the create >> list to avoid tripping up the leak detection. >> >> However, the guest.communicate() call will wait for the guest process to >> terminate, which includes all output. >> > Is there a problem with that? It makes your "for child in child_list" useless, as all processes have guareteed to exit already. > >> Therefore, I think we still need the `xl create -Fp`, `xl console`, `xl >> unpause` dance, where the create process gets put on the create_list, >> and it is the console process which gets communicated with. >> >> This also has the advantage that it doesn't cause ./xtf-runner to break >> against all non-staging trees. >> > I thought we decided to grep log file for that? Right, but until that happens, this patch constitutes a functional regression. ~Andrew --------------04DAB5BD26E78F7C430BA876 Content-Type: text/html; charset="windows-1252" Content-Transfer-Encoding: 8bit
On 08/08/16 14:13, Wei Liu wrote:
On Mon, Aug 08, 2016 at 02:06:37PM +0100, Andrew Cooper wrote:
On 08/08/16 12:24, Wei Liu wrote:
Now that xl create -c is fixed in xen-unstable, there is no need to keep
the hack to get guest console output anymore.

Use xl create -Fc directly, then wait for the xl process to exit.  Print
any error as it occurs.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Sadly, now I think about this further, it does re-introduce the
serialisation problem I was trying specifically trying to avoid.

Can you give an example of the race you wanted to avoid?

I thought with the xenconsole work in place I had solved all races I was
aware of, but maybe I missed something obvious.

It isn't a race.  I do not want synchronously wait for the taredown of domains to complete, as it adds unnecessary latency when running more than a single test.


      
You need to run `xl create -F` so you can sensibly wait on the create
list to avoid tripping up the leak detection.

However, the guest.communicate() call will wait for the guest process to
terminate, which includes all output.

Is there a problem with that?

It makes your "for child in child_list" useless, as all processes have guareteed to exit already.


Therefore, I think we still need the `xl create -Fp`, `xl console`, `xl
unpause` dance, where the create process gets put on the create_list,
and it is the console process which gets communicated with.

This also has the advantage that it doesn't cause ./xtf-runner to break
against all non-staging trees.

I thought we decided to grep log file for that?

Right, but until that happens, this patch constitutes a functional regression.

~Andrew
--------------04DAB5BD26E78F7C430BA876-- --===============2235839403188604088== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwczovL2xpc3RzLnhlbi5v cmcveGVuLWRldmVsCg== --===============2235839403188604088==--