[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2 5/5] xl: test script for the cpumap parser (for vCPU pinning)



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 parser 
> (for vCPU pinning)"):
> > This commit introduces "check-xl-vcpupin-parse" for helping
> > verifying and debugging the (v)CPU bitmap parsing code in xl.
> > 
> > The script runs "xl -N vcpu-pin 0 all <some strings>"
> > repeatedly, with various input strings, and checks that the
> > output is as expected.
> 
> 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...
> 
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.
> 
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.
> 
Ok.

Thanks and Regards,
Dario

-- 
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.