FAQ

How do get the output of a command show up in the log?

When you issue a command, to capture the output, you need to assign it to a variable and then log the variable.

Example:

result = dut.identify()
logging.detail(result)

Note

More information about getting started can be found in Getting Started Guide.

The value for Sec/Pass in the GUI always shows 0 until the test completes. Why?

The value for Sec/Pass in the GUI can come from one of two places.
  1. If you are timing your script using a positive value for passtimer, this value will automatically be populated.

  2. If you are timing the script any other way (passtimer = -1 or passtimer = 0), manually put in an estimated time using the test configuration file passtimer_estimated

Example:

To set the value of passtimer_estimated to 10 add the following code somewhere in your script before the line keep_running()

set_var('passtimer_estimated', 10)

Note

One way to get an estimate of the Sec/Pass value is to run the script once before setting this value. Then navigate to the test folder in the REST tree and use the command

cat seconds_pass

Although test time can vary on different drives, this will allow you use the actual time of a test run as the basis for this value.

In either case, when the test is completed the value is updated with the actual test duration

What is the REST tree, and how do I find my test in the REST tree?

See Using the Command Line

What happens if I set both passtimer and passes before my keep_running() loop?

Suppose the following configuration was set before the keep_running() loop:

set_var('passtimer', 15)
set_var('passes', 3)

This code ensures that each pass runs for 15 seconds, and that three passes take place.

In other words, 3 passes of the test will happen, and each pass will take a minimum of 15 seconds. This means the total test time will be about 45 seconds.

How do I issue overlapping resets?

Overlapping resets can be issued using the run_concurrent function. See the run_concurrent documentation in the SANBlaze Test API section for a full explanation of parameters with examples.

When I am enabling low power modes, do I need to do anything to stop the SANBlaze systems from polling the drives and keeping them alive?

The system watchdog will keep the drive from entering lower power mode. This can be turned off using the python framework using the following command:

watchdog_enable(dut)

The watchdog should be re-enabled when the drive exits low power mode. This can be done using the following command:

watchdog_disable(dut)

Note

If the state is entered through the api command ASPM_enable, this behavior should be automatically implemented and will require no additional actions.

How do I stop all I/O tests on a target or more than one I/O test on a target?

The get_vlun_stop_test function requires the test_id to stop only a specific test_id at a time. We have another way that can stop all I/O tests on a target. However, if you want to stop more than one test at a time, we can use a for loop.

Stop all I/O tests on a target

from sanblaze_test_api_util import proc_write
proc_write('StopTests', f'/iport{dut.port}/target{dut.target}')

Stop more than one test on a target

from sanblaze_test_api_util import proc_write
# Create a list of test_ids that you would like to stop.
test_ids = ['Read_1', 'Write_2', 'Read_3']
for test_id in test_ids:
     proc_write(f'StopTests={test_id}', f'/iport{dut.port}/target{dut.target}')

How do I turn off the passing command of get_feature command that always print out?

When you issue a get_feature command, it always prints out the passing command. This passing command can be turned off by adding silent flag as ‘silent=True’.

Example:

/usr/bin/io /iport0/target101 GetLogPage -v -lid 02 -csi 00 -txlen e8 -tt -x

To turn off the passing command:

dut.get_log_page(0x02, silent=True)

How do I pass a RAE flag to the get log page command on the MI API?

RAE is Retain Asynchronous Event. According to MI spec v1.2, RAE bit needs to be set to 1.

from sanblaze_apis import MI
# Use desired slot here
a = MI(slot=2)
a.get_logpage(rae=1)