From KVM
Revision as of 04:23, 24 January 2011 by Jasowang (Talk | contribs)


Recent autotest supports passing test parameters to control file through --args options. This is also been introduced in kvm-autotest which can let user do some basic tests configurations (variants limitation or excluding, parameters configuration) through command line.

You should have some basic understanding of the test parameters and configuration file format before using the command line. If not, you are suggested to read the test configuration file format and test parameters before continuing.

How to use

It's very simple for you to use the command line, suppose you are in the directory of kvm subtest, you can pass test parameters through:

../../bin/autotest control --args="key1=value1 key2=value2 ...... keyN=valueN"

KVM-Autotest supports two kinds of parameters:

  1. keywords "only" and "no": they serve as the same function as in configuration file, limit and exclude variants.
    1. For each "only=x", the control file would generate a "only x" and pass it to the configuration file analyzer
    2. For each "no=y", the control would generate a "no y" and pass it to the configuration file analyzer
  2. test parameters: all other are passed to the configuration analyzer untouched, that is to say, you could specify any test parameters by this way.


The command line parameters interface can not provide the same flexibility as the configuration file and have the following limitations:

  1. The generation of the final test matrix still depends on the configuration file, you still need it as a base and do test. You still need a test template such as tests.cfg in order to utilize the command line interface.
  2. As all test parameters passed from the command line and analyzed after the configuration file, so any test parameters would override ALL previous ones defined in configuration file. So the command line interface is good at being used to do small configuration modifications to just one test.
  3. It can not be used to adding variants, if you want them, you must edit the configuration file.



  1. support parameters surrounded by quotes
  2. cli support for build?
  3. auto completion?