]> xenbits.xensource.com Git - xen.git/commit
xl: test script for the cpumap parser (for vCPU pinning)
authorDario Faggioli <dario.faggioli@citrix.com>
Sat, 7 Dec 2013 00:05:34 +0000 (01:05 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Mon, 9 Dec 2013 15:20:12 +0000 (15:20 +0000)
commitcaee9a0362b198636410793e091ba901ddca9f2c
tree31063932d7c7e400cef70d7bb11bab48931a92bd
parent62c562557a8a52612fa4ad960a285f5cd618611e
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 what the script can do:

# ./check-xl-vcpupin-parse -h
 usage: ./check-xl-vcpupin-parse [options]

 Tests various vcpu-pinning strings. If run without arguments acts
 as follows:
  - generates some test data and saves them in
    check-xl-vcpupin-parse.data;
  - tests all the generated configurations (reading them back from
    check-xl-vcpupin-parse.data).

 An example of a test vector file is provided in
 check-xl-vcpupin-parse.data-example.

 Options:
  -h         prints this message
  -r seed    uses seed for initializing the rundom number generator
             (default: the script PID)
  -s string  tries using string as a vcpu pinning configuration and
             reports whether that succeeds or not
  -o ofile   save the test data in ofile
             (default: check-xl-vcpupin-parse.data)
  -i ifile   read test data from ifile

An example test data file (generated on a 2 NUMA nodes, 16 CPUs
host) is being provided in check-xl-vcpupin-parse.data-example.

Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
tools/libxl/check-xl-vcpupin-parse [new file with mode: 0755]
tools/libxl/check-xl-vcpupin-parse.data-example [new file with mode: 0644]