From: Ian Murray Subject: Re: [PATCH] [RFC] Fix RegEx Issues with xendomains for both SXP and JSON outputs of lx list -l Date: Wed, 26 Jun 2013 13:06:49 +0100 (BST) Message-ID: <1372248409.74147.YahooMailNeo@web171305.mail.ir2.yahoo.com> References: <51C22E81.1010902@yahoo.co.uk> <1371717529.84197.YahooMailNeo@web171304.mail.ir2.yahoo.com> <1371726771.98221.YahooMailNeo@web171306.mail.ir2.yahoo.com> <1371729629.55562.YahooMailNeo@web171306.mail.ir2.yahoo.com> <1372153217.22783.201.camel@zakaz.uk.xensource.com> <1372157785.23828.YahooMailNeo@web171306.mail.ir2.yahoo.com> <1372167859.18901.21.camel@zakaz.uk.xensource.com> <1372172137.30818.YahooMailNeo@web171306.mail.ir2.yahoo.com> <1372174756.96009.YahooMailNeo@web171303.mail.ir2.yahoo.com> <1372243851.7337.31.camel@zakaz.uk.xensource.com> Reply-To: Ian Murray Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <1372243851.7337.31.camel@zakaz.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: George Dunlap , "xen-devel@lists.xen.org" , Ian Jackson , David Sutton , Joshua Tuttle List-Id: xen-devel@lists.xenproject.org ----- Original Message ----- > From: Ian Campbell > To: Ian Murray > Cc: David Sutton ; George Dunlap ; Joshua Tuttle ; Ian Jackson ; "xen-devel@lists.xen.org" > Sent: Wednesday, 26 June 2013, 11:50 > Subject: Re: [Xen-devel] [PATCH] [RFC] Fix RegEx Issues with xendomains f= or both SXP and JSON outputs of lx list -l > = > On Tue, 2013-06-25 at 16:39 +0100, Ian Murray wrote: >> = >> = >> = >> = >> = >> = >> >________________________________ >> > From: David Sutton >> >To: Ian Murray = >> >Cc: Ian Campbell ; George Dunlap = > ; Joshua Tuttle ; = > Ian Jackson ; = > "xen-devel@lists.xen.org" = >> >Sent: Tuesday, 25 June 2013, 16:14 >> >Subject: Re: [Xen-devel] [PATCH] [RFC] Fix RegEx Issues with xendomain= s = > for both SXP and JSON outputs of lx list -l >> > = >> > >> > >> >Reply below, >> > >> > >> >On Tue, Jun 25, 2013 at 9:55 AM, Ian Murray = > wrote: >> > >> > >> >>Date: Sat, 22 Jun 2013 13:38:11 +0100 >> >>Message-Id: = > <1371904691-9842-1-git-send-email-murrayie@yahoo.co.uk> >> >> >> >> >> >> >> >>>>=A0 As was suggested by David Sutton, there are probably more = > issues with >> >>>>=A0 this script than has been covered so far, but this change = > makes >> >>>>=A0 suspension and restoration work for me, at least. He = > suggests there >> >>>>=A0 are problems with zombies, etc. >> >>> >> >>> You mean the handling of zombies by this script, rather than = > it somehow >> >>> causing zombies? >> >> >> >>Yes, handling of zombies. >> >> >> >> >> >> >> >Yes, it was handling of zombies - in particular the xendomains script >> was making use of the state information of the various domains, which >> isn't part of the information exported=A0 by xl list -l in either format >> > >> = >> I am guessing, but I would say the script used to use xl/xm list >> without the -l and thiis is where $state was set originally. > = > That sounds like a good bet. > = >> =A0 As you point this isn't available from xl list -l (should it be?). If >> I was approaching this as a re-write, the first thing I would do would >> be to devise some test cases for all the things this script is >> supposed to deal with. I don't know how to create zombies at will, for >> example. Perhaps the hypervisor gurus do. Until that can be done, this >> script is going to be hard to test properly. Just my opinion. > = > If you can create zombies then that is a bug I think, which we would fix > and break your test case ;-) I was thinking of... xl zombify =A0=A0=A0=A0 :) > = > If I were going to write test cases for this script I would start by > collecting a library of "xl list -l" outputs (both real world and > handwritten) and devise a test mode which sucked this in instead of > running the command and operated in a dry-run mode. > = > This is effectively what we've done, to a greater or lesser extent > (mostly lesser...), for xl disk stanza parsing > (tools/libxl/check-xl-disk-parse) or pygrub (tools/pygrub/examples/). > It's nice because when someone reports a bug you can just add their > output to the set of things you test. I think that is a good idea except it doesn't capture an issue if the outpu= t of the real xl list -l changes. Besides, I liked the idea of David S. to = get away from parsing xl list -l. Assuming this is what happened, I am not = sure of the design logic of changing the behaviour of xl list -l to work wi= th JSON. IMHO, I would say better to add another option for that output, so= as not to cause compatibility issues. Anyway, one of the for future, I think. > = > Ian. > =