Skip to content

Executing

SarikaM edited this page Aug 2, 2013 · 16 revisions

tnvme can be executed against real world hardware or simulated NVMe hardware. The simulated Device Under Test (DUT) will never fully emulate real world hardware and has some inherent deficiencies. However, a close enough approach may be sufficient and you are encouraged to investigate this path. Customized support for the simulated NVMe DUT resides at nvmeqemu. The local manage git repo exists for the sole purpose of supporting this compliance suite within nvmeqemu. You should start by reading the start here file to get the simulated environment up and running.

Regardless of whether or not a real or simulated environment is being used, tnvme cannot be executed without first installing the corresponding kernel mode driver called dnvme. dnvme is resident within nvmecompliance as its own git repo. After compiling and installing dnvme it will attempt to claim hardware and export those devices as special character devices of the form /dev/nvmeX; where X = {0...(n-1)}. tnvme attempts to peruse the /dev directory to seek all testable devices within a system. Each instance of tnvme can target a single mutually exclusive DUT. dnvme simply refuses to allow multiple open attempts against any single DUT.

Getting Help

Executing tnvme is as simple as typing ./tnvme --help. The resulting output explains the interface to the application.

Creating Dump Directory

The framework requires a place to write dump files and refuses to create the directory if it doesn't exist. The dump directory may be specified, but if not the default value is w/r to the working directory and is called "./Dump".

mkdir Dump

Summarize the Test Cases

Retrieving a summary of every test supported is done by typing ./tnvme --summary.

0: Group:Informative
    0.0.0: Test:Dump all registers
    1.0.0: Test:Create an ACQ & ASQ
    1.1.0: Test:Issue the identify cmd
    1.2.0: Test:Issue the get features cmd
1: Group:PCI registers syntactic
    0.0.0: Test:Validate all PCI registers syntactically
etc...

Running a Single Test

To specify any particular test for execution you must supply the fully qualified test number. For example, to execute Group 0, Test 1.1.0, "Test:Issue the identify cmd" you would type: ./tnvme --test=0:1.1.0. Notice the ":" between the group and the test references is necessary.

2012-05-20_10:40:11.29202 tnvme:group.cpp:233: ------------------END TEST------------------
2012-05-20_10:40:11.29205 tnvme:tnvme.cpp:908: Iteration SUMMARY passed : 166
2012-05-20_10:40:11.29207 tnvme:tnvme.cpp:912:                   failed : 0
2012-05-20_10:40:11.29210 tnvme:tnvme.cpp:914:                   skipped: 6
2012-05-20_10:40:11.29212 tnvme:tnvme.cpp:915:                   total  : 172
2012-05-20_10:40:11.29236 tnvme:tnvme.cpp:916: Stop loop execution #1
2012-05-20_10:40:11.29240 SUCCESS: testing
Completed at Sun May 20 06:40:11 EDT 2012
Elapsed runtime (hh:mm:ss): 1:21:19

Running an Entire Group of Tests

To run every test contained within say group 3 type: ./tnvme --test=3

2012-03-02_16:13:21.83314 tnvme: SUCCESSFUL test case run
2012-03-02_16:13:21.83323 tnvme: ------------------END TEST------------------
2012-03-02_16:13:21.83335 tnvme: Iteration SUMMARY passed : 17
2012-03-02_16:13:21.83345 tnvme:                   failed : 0
2012-03-02_16:13:21.83354 tnvme:                   skipped: 0
2012-03-02_16:13:21.83364 tnvme:                   total  : 17
2012-03-02_16:13:21.83374 tnvme: Stop loop execution #0
2012-03-02_16:13:21.83487 SUCCESS: testing

Getting Test Case Details

To retreive complete test case documentation details for a single test type the reference numnber to the test of interest: ./tnvme --detail=3:0.0.5. Again take note of the ":" between the group and the test references. It is also possible to specify only a group number to retrieve the details of all the tests within a specific group.

tnvme: Parsing cmd line: ../tnvme/tnvme --log=./Logs -k skiptest.cfg --detail=3:0.0.5 
tnvme: Execution will skip test case(s): 1:ALL.ALL.ALL, 
tnvme binary: v/2.0
tnvme compiled against dnvme API: v/1.1.0
dnvme API residing within kernel: v/1.1.0
3: Group:Basic Initialization
    0.0.5: Test:Delete contiguous IOCQ and IOSQ's
      Compliance: revision 1.0b, section 7
         Issue the admin commands Delete I/O SQ and Delete I/Q CQto the ASQ and
         reap the resulting CE's from the ACQ to certify those the contiguous
         IOQ's have been deleted. Dumping driver metrics before and after the
         deletion will prove the dnvme/hdw has removed those Q's

Clone this wiki locally