Command line options¶
Definition¶
xbtest supports the following command line options described in next sections:
-v: Display version¶
-h: Display help¶
- -h¶
Display help message and command line options available 1. There are two help levels:
Command line options and the list of all installed AVED deployment archives supported by xbtest with their respective pre-canned tests.
$ xbtest -h
Command line options for the selected card (
-d
).$ xbtest -d <BDF> -h
-d: Select card¶
- -d <BDF>¶
Select the Alveo card identified by its
<BDF>
.The command line:
Maximum number of times option
-d
is present in command line is 100.See Identifying AVED running on card to find the
<BDF>
of the card installed in your system.$ xbtest -d <BDF> -j path/to/my_tests.json
-g: Display guide¶
- -g <test case/task>¶
Display a guide for the given
<test case/task>
1.This guide includes JSON members description, test sequence definition with examples and basic test JSON file examples.
To obtain the list of test cases available, use command line option
-h
.Note
This option must be used with command line option
-d
.$ xbtest -d <BDF> -g <test case/task>
-j: Select test JSON¶
- -j path/to/my_tests.json¶
Select test JSON file
path/to/my_tests.json
defining the test cases to run 2.See Test JSON file structure for more information on the definition of the test JSON file content.
$ xbtest -d <BDF> -j path/to/my_tests.json
-c: Select pre-canned test¶
- -c <pre-canned test>¶
Select a pre-canned test
<pre-canned test>
to run 2.To obtain the list of pre-canned tests available and their location in the installation directory use command line option
-h
.See Pre-canned tests description for more information on the quantity and content of these card specific tests.
$ xbtest -d <BDF> -c <pre-canned test>
-l: Select logging directory¶
- -l path/to/log_dir¶
Define the name of a directory
path/to/log_dir
in which all log files will be stored, for example output files of any test case will be stored 3.When not specified, logging directory is still generated with a default name.
If the provided directory already exists, then the command line option
-f
must be provided to override the directory: all contents of the directory will be removed.See Result directory section for more information on the different directories and files generated by xbtest.
$ xbtest -l path/to/log_dir -d <BDF> -j path/to/my_tests.json
-L: Disable logging directory¶
-m: Display message information¶
-F: Disable dynamic display¶
- -F¶
Disable the dynamic display mode.
When not provided, xbtest defaults to the dynamic display mode.
See Display modes section for more information on the messages displayed by xbtest in the console.
$ xbtest -F -d <BDF> -j path/to/my_tests.json
-f: Force an operation¶
-b: Select verbosity¶
- -b <verbosity level>¶
Select the verbosity level
<verbosity level>
;Range: [-4, 0]; Default: 0.
Setting a negative verbosity level enables display of extra messages with
DEBUG
severity (see Understanding xbtest messages).$ xbtest -b <verbosity level> -d <BDF> -j path/to/my_tests.json
The following table describes the different severity levels that can be enabled:
¶ Level
Details
0
No debug information is reported by default.
-1
This level allows to reports debug information for test cases and tasks (intermediate results/measurements/test steps). The handiest one to debug a tricky situation and have more information about the ongoing test.
-2
Use this level for more information regarding the host application setup phase.
-3
Reports debug information for xbtIP access related calls. This may be used for example if the board/SW hangs.
-4
This level activates the debug messages of the host application parsers (e.g. JSON files, command line).
These
DEBUG
messages are not supported by command line option-m
.There are no details, nor resolution available. There are no rules about their content or even their accuracy (the best way to understand them is to have access to the SW source code to follow their generation).
-t: Select timestamp¶
- -t <timestamp>¶
Select the timestamp mode
<timestamp>
;Possible values:
none
,absolute
anddifferential
.Defaults to none when not specified.
$ xbtest -t <timestamp> -d <BDF> -j path/to/my_tests.json
The following table described the supported timestamp modes.
¶ Mode
Details
Example
none
By default, no timestamp is used in the log messages.
STATUS :: CMN_032 :: POWER :: Start Test 1: [300, 49]
absolute
The absolute elapsed wall-clock time since some arbitrary, fixed point in the past (typically since reboot of the server). This is handy to link
dmesg
file withxbtest.log
file as it uses the same format (second with 6 decimal digits precision).[263445.141868] STATUS :: CMN_032 :: POWER :: Start Test 1: [300, 49]
differential
Elapsed time since the previous message displayed.
[+0.000076] STATUS :: CMN_032 :: POWER :: Start Test 1: [300, 49]
Warning
This will slow down the software as each message requests a timestamp to the OS (clock monotonic). The slow down shouldn’t be noticeable if only 1 xbtest instance is running or if the processors are not heavily loaded. With multi-cards or CPU stress test running, the behaviour of xbtest cannot be guaranteed.
-D: Select card configuration JSON (multi cards test)¶
- -D path/to/card_cfg.json¶
Provide a card configuration JSON file
path/to/card_cfg.json
.This file can be used, instead of the command line, to select cards, test JSON files and pre-canned tests.
This option can be provided only once and cannot be combined with the -d, -c, -j options.
See Complex multi cards test section for more information on the parameters supported in this file.
$ xbtest -D path/to/card_cfg.json
-i & -e: Select PDI and card definition JSON¶
- -i <pdi>¶
Select the PDI
<pdi>
. This is used to find the xbtest metadata JSON files.
- -e <card definition>¶
Select the Card definition JSON file
<card definition>
.
These options -i
and -e
are used internally by xbtest application software (xbtSW) while dispatching the test run.
Single card examples¶
Single test on a single card¶
The following example shows how to run only one test, Test JSON files (-j
) or pre-canned test (-c
), on a single card.
$ xbtest -d 0000:5e:00.1 -j path/to/my_tests.json
$ xbtest -d 0000:5e:00.1 -c verify
In the below example, the verbosity has been increase to include more debug messages and by disabling the dynamic console, all messages are printed in the console.
$ xbtest -d 0000:5e:00.1 -j path/to/my_tests.json -F -b -1
Multiple tests on a single card¶
Test JSON files (-j
) and pre-canned test (-c
) options can be mixed.
Each test provided is run one after the other for the specified BDF.
An error in one test on one card does not stop any other tests.
For example:
$ xbtest -d 0000:5e:00.1 -c verify -c stress -j path/to/my_tests.json
Multi card support¶
xbtest supports natively the dispatch of test across various cards. You don’t need to open various terminals.
This can be done via the command line or a card configuration json
Command line: for quick and easy multiple card tests.
Multiple tests on a single card.
Same tests over multiple cards.
Multiple tests over multiple cards.
Card configuration json file: for complex test sequence and card selection with support for individual option per test and card.
Same tests on multiple cards¶
Different cards can be targeted simultaneously.
Each test provided is run one after the other for all selected cards.
For example:
$ xbtest -d 0000:5e:00.1 -d 0000:d9:00.1 -d 0000:86:00.1 -c dma -j path/to/my_tests.json -c memory -j path/to/another_test.json -b -1
In this example, the card configurations for all cards (0000:5e:00.1 & 0000:d9:00.1 & 0000:86:00.1) are:
Test 1: pre-canned
dma
Test 2:
path/to/my_tests.json
Test 3: pre-canned
memory
Test 4:
path/to/another_test.json
-b -1
for all tests
Different tests on multiple cards¶
The tests run can differs between each card.
$ xbtest -d 0000:5e:00.1 -d 0000:d9:00.1 -c dma -j path/to/my_tests.json -c memory -b -1 \
-d 0000:86:00.1 -j path/to/my_card_specific_test.json
In this example, the card configurations are:
0000:5e:00.1 & 0000:d9:00.1:
Test 1: pre-canned
dma
Test 2:
path/to/my_tests.json
Test 3: pre-canned
memory
-b -1
is used for all tests0000:86:00.1:
Test 1:
path/to/my_card_specific_test.json
Complex multi cards test¶
For complex test sequence, the card configuration JSON file will offer more flexibility and configuration.
The card configuration JSON file is used to define:
List of BDF.
List of tests:
Test JSON file or pre-canned test.
Possibly add other options for each test individually.
Possibly overwrite tests definition per BDF.
Comments supported at any level of the JSON file.
The card configuration JSON file is selected using command line option -D
:
$ xbtest -D card_config.json
Card configuration JSON definition¶
The following table defines the parameters supported in the card configuration JSON file:
Node name |
Node type |
Example |
Command line equivalent |
Mandatory / Optional |
Default |
Description |
|||
---|---|---|---|---|---|---|---|---|---|
Level 0 |
Level 1 |
Level 2 |
Level 3 |
||||||
global_config |
args |
string |
“-b -1” |
-b -1 |
Optional |
Specify the other command line options to be passed to xbtest SW for all cards.
|
|||
cards |
List<string> |
[“0000:86:00.1”, “0000:5e:00.1”] |
-d 0000:86:00.1 -d 0000:5e:00.1 |
Mandatory |
List of card BDFs.
|
||||
tests |
List<object> |
Mandatory |
List of objects. Each object defines a test.
|
||||||
args |
string |
“-b -1” |
-b -1 |
Optional |
global_config.args |
Overwrites |
|||
test_json |
string |
“path/to/my_tests.json” |
-j path/to/my_tests.json |
Mandatory
|
Test JSON file. |
||||
pre_canned |
string |
“stress” |
-c stress |
Optional
|
Pre-canned test. |
||||
card_config |
|
object |
Optional |
Overwrite for card identified by
|
|||||
args |
string |
“-b -1” |
-b -1 |
Optional |
global_config.args |
Overwrites |
|||
tests |
List<object> |
Mandatory |
gloabal_config.tests |
Overwrites
|
|||||
args |
string |
“-b -1” |
-b -1 |
Optional |
card_config.<BDF>.args |
Overwrites |
|||
test_json |
string |
“path/to/my_tests.json” |
-j path/to/my_tests.json |
Mandatory
|
Test JSON file for card identified by |
||||
pre_canned |
string |
“stress” |
-c stress |
Optional
|
Pre-canned test for card identified by |
Here are some examples:
{
"comment": "First define all tests and all targeted cards",
"global_config": {
"args" : "-b -1",
"cards": ["0000:86:00.1", "0000:5e:00.1", "0000:d9:00.1"],
"tests": [
{ "pre_canned": "verify" },
{ "test_json" : "path/to/my_tests.json", "args": "-b -2" }
]
},
"comment": "Then override tests for some cards if needed",
"card_config": {
"0000:5e:00.1": {
"tests": [
{ "pre_canned": "power", "args": "-b 0" },
{ "test_json" : "path/to/another_test.json" },
]
}
}
}