Creating IO Tests

Start an IO test with default parameters:

start_IO(dut)

Start an IO test with custom behaviors:

params = {
    'iotype': 'Read',
    'threads': 1,
    'iosperthread': '300s',  # 5 minutes
    'seektype': 0,
}

config = {
    'OnError': 'StopTest',
}

start_IO(dut, params, config)

start_IO

start_IO provides a wrapper around XML_API.get_vlun_start_test.

It does the following for your convenience:
– Ensures that configuration parameters passed to the XML API are defined properly
– Cleanly parses the XML API response into a form that is easier to use
– Handles and logs any problems that arise when starting the IO test
– Ensures that the new IO test is tracked properly during script execution
start_IO(dut, params=None, config=None, fail_type='error')
dut : XML_API
The DUT the new IO test will run on
params : dict Optional
A dictionary for configuring the behavior of the IO test
config : dict Optional
A dictionary for configuring how the test will be managed by the system
fail_type : int or str Optional
Specifies the action to be taken if the IO test fails to start:
0 or 'pass' : Log a PASS
1 or 'notify' : Log a NOTE
2 or 'warn' : Log a WARNING and increment the warnings counter
3 or 'error' : Log an ERROR and increment the errors counter
4 or 'test' : Log an ERROR and immediately fail the entire test

The options passed in params and config closely correspond to the settings available when starting a new IO test in the Controller/Namespace Tests tab in the GUI.

Warning

It is highly recommended that within scripts you only start new IO tests using start_IO instead of XML_API.get_vlun_start_test. Using start_IO ensures that the new IO test will be tracked properly throughout script execution.

params

The params parameter is used to configure IO test behavior. The available settings correspond with the parameters of get_vlun_start_test.

Where possible, values given will be converted to integers.

For many settings, users have the option to use the legacy name instead of the new name found in the XML API. Conversion to the new form will be handled automatically.

The available settings are as follows. Legacy names are listed first:

iotype test_type : The type of IO test to start.
threads : The number of threads on which to perform IOs
blocks : The number of blocks per IO.
iosperthread ios : The number of IOs per thread. Specifies IO test duration if followed by ‘s’
iosperpass pass_ios : For compare tests, the number of IOs of each type to do per pass.
seektype seektype : The access type of the IO test (sequential, random, etc)
opcode : The opcode to use. SCSI only
initiator : The initiator the test will be run on. (-1 for all)
writeblocks wblocks : The number of blocks to write before skipping. Rewrite only
skipblocks wskips : The number of blocks to skip after writing. Rewrite only
pattern : The IO pattern to execute (All 1s, 0x55AA55AA, etc)
dedup_ratio dedup : The deduplication ratio
comp_ratio comp : The compression ratio
dup_uniq : The duplicate uniqueness percent
alignment skip_blocks :
alignment is used to specify the block alignment for each IO, or the alignment size.
skip_blocks is used to specify the number of blocks to skip after each IO, or the alignment.

If alignment is given, it will be converted to a negative number to be passed into skip_blocks.
To use block skipping functionality, you must use skip_blocks.
seed : The randomizer seed to use for IOs
startpaused / paused : Whether to start the test in a paused state
multipath / multipath_mode : The multipath mode to use
all_targets : 0 or 1. If 1, the IO test will run on all targets/controllers on the machine
all_luns : 0 or 1. If 1, the IO test will run on all namespaces under the passed DUT.
use_defaults : Whether to use default configuration settings (except for those specified in config)
If test_name or override_parameters are given they will be ignored.
config is used to populate override_parameters

For a more detailed explanation of the options, see the Python API Manual here.

config

The options passed in this dictionary are used to construct the value passed to override_parameters in get_vlun_start_test. These allow you to customize how the system will manage the IO test.

For some of the options and their functionality, see the CLI User Guide (init) here.

The complete list of currently supported options is as follows:

CompareType LBAInPatterns UseVerify UseWSame UseXCopy UseCmpWr NoT10DIF xxPROTECT PRCHK AppTag ReservedEnd ReservedStart TestLimit TestLimits PassEndDelay GeneralTimeout TapeTimeout ReadWriteTimeout ReadTimeout WriteTimeout VerifyTimeout CompareTimeout AbortTimeout CompareAndWriteTimeout WriteVerifyTimeout WriteSameTimeout WriteZeroesTimeout WriteUncorrTimeout ZoneAppendTimeout UnmapTimeout DatasetManagementTimeout XCopyTimeout TaskMgmtTimeout NoPathTimeout BusyDelay BusyRetry Retry QueuingPolicy NVMeQueueSelect TimeoutErrorRecovery VerifyWriteBuffer PatternInMetadata StreamIdentifier JEDECRandom ShadowThreads CompleteReadPassAfterCompareError OnError PerfLimits Burstiness VerifyWritesMode VerifyAtomicWrites DeallocAfterCompare TestControl TestAlertScript CheckWriteOverlap UseZApp UseWrVer VerifyAfterWrite StopAfterErrorHandling FastExit IOsMin MBsMin LatencyLimits MiscompareLimit OverrideNACA OverrideFUA OverrideLR OverridePattern ZoneQueueDepth ZoneQueueDepthTimeLimit VerifyInjectedErrors ZoneAppendTimeout WriteVerifyTimeout WriteUncorrTimeout MediaAccessTimeout BufferOffset UseNVMeSGLs

Any unknown configuration options in the dictionary will be ignored, and a WARNING will be issued.