From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH v2 5/5] xl: test script for the cpumap parser (for vCPU pinning) Date: Wed, 11 Sep 2013 10:31:44 +0200 Message-ID: <1378888304.2821.108.camel@Solace> References: <20130906154725.10218.45008.stgit@hit-nxdomain.opendns.com> <20130906155600.10218.27695.stgit@hit-nxdomain.opendns.com> <21039.23644.878700.819950@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5471993871495865036==" Return-path: In-Reply-To: <21039.23644.878700.819950@mariner.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 Jackson Cc: George Dunlap , Ian Campbell , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org --===============5471993871495865036== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-EzBTwLhu5flHx/GmzUeS" --=-EzBTwLhu5flHx/GmzUeS Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On mar, 2013-09-10 at 18:52 +0100, Ian Jackson wrote: > Dario Faggioli writes ("[PATCH v2 5/5] xl: test script for the cpumap par= ser (for vCPU pinning)"): > > This commit introduces "check-xl-vcpupin-parse" for helping > > verifying and debugging the (v)CPU bitmap parsing code in xl. > >=20 > > The script runs "xl -N vcpu-pin 0 all " > > repeatedly, with various input strings, and checks that the > > output is as expected. >=20 > This is a nice idea. But can we please have this use the same random > seed each time, and/or report the seed ? Otherwise you can get a very > annoying situation where a test fails but you can't repro it... >=20 Well, the output tells what is the cpumap that each test is trying to use, so that one can try it by hand to see what happens and/or debug. E.g., when it says: A few attempts of pinning to all but one random cpu: test case all,^5... it means it's doing `xl vcpu-pin -N 0 all all,^5'. Anyway, I think the seed thing you're suggesting is a nice feature to have there, so I'll do that. > I think it would be better, TBH, if you separated out the test > generation from the execution. check-xl-vif-parse et al have the test > data as an annex to the harness material, but you could have it in a > separate file which you could have a script to generate. >=20 Mmm... I think I see the general idea here, and I also like it, although I'm not sure I understood where you'd like the split to be done. What I can do is to have a script (or a functioning mode for the same script, introducing some command line parameters) for generating both the test vector and the expected output and store both in a file. Then, the xl-check-foo script will read such file and, for each line, run the command and compare the result with the one stored in the file, associated with the command itself... Would that match with what you where thinking? > Also the use of "sleep 1" needs to go. >=20 Ok. Thanks and Regards, Dario --=20 <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) --=-EzBTwLhu5flHx/GmzUeS Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (GNU/Linux) iEYEABECAAYFAlIwKnAACgkQk4XaBE3IOsR7xQCggbQ99RM/MHZyI6eE+wQqjHDA WqEAoIslHWF2MjSxPHWAGYqvneZvKJk1 =fQ4/ -----END PGP SIGNATURE----- --=-EzBTwLhu5flHx/GmzUeS-- --===============5471993871495865036== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============5471993871495865036==--