OCP_DatacenterSSD_2_0

OCP_DCSSD_2_0_CmdTimeout_AdminCmdExtendedTime.py

This script will run the following tests:
  1. Format NVM command with various SES values

  2. TCG Revert command

  3. TCG RevertSP command

  4. TCG GenKey command

  5. Verify each command completes within a given time limit

NOTE: Modify “tcg_password” variable if the DUT uses a password other than ‘12345678’

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

CTO-2

check_cmd_status(output_cmd)

Check command output and print the success or error string

Parameters:

output_cmd (list) – Command output

Returns:

cmd_flag – 0 = command failed, 1 = commmand passed

Return type:

int

OCP_DCSSD_2_0_CmdTimeout_AdminCmdTime.py

This script will run the following tests:
  1. NVMe Abort command

  2. NVMe Get Feature

  3. NVMe Set Feature

  4. NVMe Identify

  5. NVMe Get Log

  6. NVMe Namespace Detach/Attach

  7. NVMe Namespace Delete/Create

  8. NVMe Firmware Download

  9. NVMe Firmware Commit

  10. Create/Delete IO Submission/Completion Queue

  11. Verify each command completes within a given time limit

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

CTO-1

OCP_DCSSD_2_0_CmdTimeout_IOCmdTime.py

This script will run the following tests:
  1. Run I/O profile for 1 hour

  2. Verify no I/Os took longer than 8 seconds to complete

  3. Verify 7 or fewer I/Os took more than 2 seconds to complete

  4. Verify remaining I/Os took 2 or less seconds to complete

  5. Repeat previous steps for each I/O profile

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

CTO-3

check_io_test_status(dut, test_id)

Check I/O test status result

Parameters:
  • dut (XML_API) – Device object under test

  • test_id (str) – I/O testname

Returns:

io_test_flag – 0 = test failed, 1 = test didn’t fail

Return type:

int

get_sb_filter_timestamp(dut, test_id, timestamp_type)

Get the starting or ending timestamp and format it for use in sb_filter

Parameters:
  • dut (XML_API) – Device object under test

  • test_id (str) – I/O testname

  • timestamp_type (str) – “StartTime” or “EndTime”

Returns:

timestamp – Timestamp formatted for sb_filter

Return type:

str

OCP_DCSSD_2_0_ContConfig_Arbitration.py

This script will run the following tests:
  1. Verify that the device’s default arbitration is Round-Robin by reading CC.AMS

  2. Verify that the device supports Weighted round robin with urgent class priority by reading CAP.AMS.

  3. Change the arbitration to Weighted Round Robin by changing CC.AMS field.

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

NVMe-CFG-1

clear_bit(value, bit)

Clears a bit to 0

Parameters:
  • value (int) – value to be modified

  • bit (int) – index to be modified

Return type:

int

set_cc_ams(dut, ams)

Sets CC.AMS value

Parameters:
  • dut (XML_API) – Device object under test

  • ams (int) – Arbitration Mechanism Selected for setting

Return type:

None

verify_bit(value, bit, on=True)

Verifies if a bit is set to 1 or cleared to 0

Parameters:
  • value (int) – value to be checked

  • bit (int) – index to be checked

  • on (bool) – If checking against 1, true, if 0, false

Return type:

bool

verify_cc_ams(dut, expected_ams)

Verifies arbitration mechanism selected is set as expected

Parameters:
  • value (int) – Controller Configuration return bits

  • expected_ams (int) – expected arbitration mechanism selected

Return type:

None

verify_cc_en(dut, on, timeout)

Verifies CC.EN is set to a particular value

Parameters:
  • dut (XML_API) – Device object under test

  • on (bool) – If CC.EN should be 1 or 0

  • timeout (int) – Expected timeout in seconds

Returns:

end_time – time that CSTS.RDY is expected to transition by

Return type:

int

wait_csts_rdy(dut, end_time, rdy_bit)

Waits timeout / 2 seconds for CSTS.RDY bit to transition after changing CC.EN

Parameters:
  • dut (XML_API) – Device object under test

  • end_time (int) – Expected timeout limit (timeout + time.time())

  • rdy_bit (int) – Expected value for CSTS.RDY to transition to

Return type:

None

OCP_DCSSD_2_0_ContConfig_EUI64_NGUID.py

This script will run the following tests:
  1. Verify Number of Namespaces (NN) >= number of valid NSIDs (from Identify with CNS=2h)

  2. Verify EUI64 and NGUID are both non-zero for each active namespace

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

NVMe-CFG-7, NVMe-CFG-8

OCP_DCSSD_2_0_ContConfig_FatalStatus.py

This script will run the following tests:
  1. Obtain CSTS.CFS and verify it’s set to zero

Pass/Fail: Script passes if register value is set to zero

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

NVMe-CFG-3

OCP_DCSSD_2_0_ContConfig_MDTS.py

This script will run the following tests:
  1. Verify MDTS >= 256KB

  2. Verify NPWG and NOWS <= MDTS

  3. Do Write commands with transfer size < MDTS, = MDTS and > MDTS

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

NVMe-CFG-2

OCP_DCSSD_2_0_ContConfig_Queues.py

This script will run the following tests:
  1. Verify SQES and CQES values

  2. Verify CC.IOSQES and CC.IOCQES values

  3. Create 64 queues with a queue depth of 1024

  4. Verify CAP.MQES value

  5. Get CAP.CQR value

  6. Create 64 queues with a queue depth of 1024 and Physical Contiguous bit = CAP.CQR

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

NVMe-CFG-5, NVMe-CFG-6

OCP_DCSSD_2_0_Dealloc_GarbageCollection.py

This script will run the following tests:
  1. Precondition the namespace twice with 128KiB sequential writes followed by 4KiB random writes

  2. Run 4KiB random writes for 5 minutes

  3. Verify QoS values match with those in adaptation data

  4. Deallocate 2% of the namespace

  5. Run 4KiB random writes for 1 minute

  6. Verify QoS values match with those in adaptation data and those collected in step 3

  7. Repeat steps 4-6 49 times, deallocating a different 2% of the namespace each time (so that 100% of the namespace will eventually be deallocated)

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

TRIM-7

collect_performance_logs(dut, io_test, perf_field)

Collects logs from the ADP and prints the performance logs for a given IO command

Parameters:
  • dut (XML_API) – Device object under test

  • io_test (dict) – Custom IO dict

  • perf_field (str) – Performance field to be collected. Either “TestReadBytes”, “TestWriteBytes” or “TestLatencyQoS”

Returns:

perf_vals – Parsed QoS latency values or Number of read/write bytes

Return type:

dict | int

compare_QOS_performance_logs(qos_base_values, read_io_latency)

Checks the performance log using the qos list to determine if “QoS” warning needs to be issued

Parameters:
  • qos_base_values (list | dict) – The base performance Latency values either from the ADP or a Read IO test

  • read_io_latency (dict) – The performance read latency values to be compared to io metric

Return type:

None

execute_IO_Profile(dut, test_type, io_profile, io_runtime=-1, io_pattern=0)
Executes each of the IO Profiles listed in Table 4
  1. Sequential Read (MiB/s) (128kiB, QD = 128)

  2. Sequential Write (MiB/s) (128kiB, QD = 128)

  3. Random Read (KIOPS) (4kiB, QD = 128)

  4. Random Writes (KIOPS) (4kiB, QD = 128)

  5. Random 70R:30W mix (KIOPS) (4kiB, QD = 128)

Parameters:
  • dut (XML_API) – Device object under test

  • test_type (str) – Either ‘Sequential’ | ‘Random’

  • io_profile (str) – IO Profile to be executed

  • io_runtime (int) – Time in seconds for IO to execute

  • io_pattern (int) – Pattern for io to be executed

Return type:

dict

verify_io(io_test, is_verify_step=True)

Verifies the successful execution and wait for the completion of an I/O command

Parameters:
  • io_test (dict) – I/O Command

  • is_verify_step (bool) – Determines whether to execute resting action in method or not (Special case for if the verify logging on an IO comes in a later step)

Returns:

result_msg – msg for later fail_action, or none if passed

Return type:

tuple(func, msg) | none

OCP_DCSSD_2_0_Dealloc_Trim.py

This script will run the following tests:
  1. Precondition the namespace twice with 128KiB sequential writes followed by 4KiB random writes

  2. Verify support for dataset management by checking ONCS field of identify controller command

  3. Verify support for dataset management AD, IDR, and IDW commands

  4. Verify NPDA and NPDG values

  5. Run 4KiB random writes for 5 minutes

  6. Verify write performance and latency does not change more than 5% from baseline

  7. Run 4KiB random reads for 5 minutes

  8. Deallocate 20% of the namespace starting from LBA=0

  9. Verify read performance and latency does not change more than 5% from baseline

  10. Verify deallocated LBAs are 0h, FFh, or unchanged when read

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

NVMe-IO-2, TRIM-1/2/3/6

collect_performance_logs(dut, test_id)

Collects and prints the performance logs for both a Read and a Write command

Parameters:
  • dut (XML_API) – Device object under test

  • test_id (int) – IO test ID

  • perf_field (str) – Performance field to be collected

Returns:

perf_vals – Performance values of I/O

Return type:

dict

precondition(dut, pattern=17)

Drive shall be preconditioned using 1x128KiB sequential writes over the whole drive followed by 2x4KiB random writes using a known pattern, e.g. 0x5A5A5A5A. The drive is assumed to be freshly booted and in an error free state. Performance values (Bandwidth/Throughput/Latency) and read behavior of deallocated block, 0-3, are accessible via the Adaptation data.

Parameters:
  • dut (XML_API) – Device object under test

  • pattern (int) – Known pattern to write to drive

Return type:

None

verify_dlfeat_consistency(dlfeat, adp_value, read_results)

Verifies steps 32 and 36

Parameters:
  • dlfeat (int) – DLFEAT bits [2:0]

  • adp_value (int) – Read Behavior of deallocated LBA from ADP

  • read_results – results dictionary from random read

Returns:

pass – if passing or failing the step

Return type:

bool

OCP_DCSSD_2_0_Endurance_Data.py

This script will run the following tests:
  1. Do GetLogPage for LID 2h and get values of Percentage Used, Available Spare, and Data Units Written fields

  2. Verify Percentage Used >= 100 and Available Spare = 0

  3. Do GetLogPage for LID C0h and get value of Endurance Estimate field

  4. Verify Data Units Written in bytes equals Endurance Estimate

  5. Verify Data Units Written in TB >= ENDURANCE_EOL field in adaptation parameters

NOTE: An EOL drive is expected to be used for this test

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

ENDUD-1, ENDUD-3

OCP_DCSSD_2_0_Endurance_EOL.py

This script will run the following tests:
  1. Perform setup

  2. Wait for first AEN reporting spares have dropped below the threshold

  3. Wait for next AEN reporting spares have been exhausted

  4. Verify log page data fields for EOL

  5. Wait for final AEN for RO mode

  6. Validate read only mode

NOTE: This test case shall use special EOL Drives that are 98-99% consumed for testing. But note that the available spares must be greater than the available spares threshold to allow for detection of available spares falling below the threshold. For capacities >= 2TB the DUT shall be short-stroked.

NOTE: The execution time of this test is not deterministic because it cannot be guaranteed how long it will take to retire the final spares. The test must be allowed run to completion.

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

EOL-3/4/5

check_bit(field_name, field_value, bit)

Helper function to handle parsing and checking on the bit-value of a given field

Parameters:
  • field_name (str) – Field name to be checked on

  • field_value (int) – Field value to parse and verify on

  • bit (int) – Bit number

Return type:

None

issue_io(dut, seektype, io_profile, threads, blocks, fail_type='error', iosperpass='-1', io_runtime=-1, io_pattern=0, extra_config=None)

Executes an IO Test

Parameters:
  • dut (XML_API) – Device object under test

  • seektype (str) – Either ‘Sequential’ | ‘Random’

  • io_profile (str) – IO Profile to be executed

  • threads (int | str) – Threads (QD) to execute IO on

  • blocks (int | str) – Number of Logical Blocks

  • fail_type (int or str) – Specifies the action to be taken if the start operation fails

  • iosperpass (int | str) – Param to determine what the IO does on the drive ‘0’: unlimited, ‘-1’: Iterate once over drive, ‘-2’: Iterate twice over drive

  • io_runtime (int) – Time in seconds for IO to execute

  • io_pattern (int) – Pattern for io to be executed

  • extra_config (dict | None) – Optional parameter for running IO test with additional configurations

Return type:

dict

verify_aer(status)

Helper function to handle verifying the information received from the AER line(s)

Parameters:

status (str)

Return type:

None

verify_feature_cmd(dut, set_feature, fail_type='error', **kwargs)

Helper function to handle verifying and re-attempting a set_features command if it fails

Parameters:
  • dut (XML) – Device under testing

  • set_feature (dict) – Returned dict of a given set_features command

  • fail_type (str) – Fail Type to use if both the first and second attempt of the set_features command fails

  • kwargs (Dict[str, Any]) – Keyword arguments to add to the set_features command

Return type:

None

verify_ios(io_tests, fail_type='error', check_start_only=False, check_failure_status=None, is_verify_step=True)

Verifies the successful execution and wait for the completion of an I/O command

Parameters:
  • io_tests (list) – list of I/O test dicts

  • fail_type (str) – String to pass into fail_action to handle IO errors

  • check_start_only (bool) – If TRUE: ONLY checks if an IO successfully starts, if FALSE: Check if the IO successfully starts AND waits to finish

  • check_failure_status (int | none) – Parameter to check the IO against a failure status

  • is_verify_step (bool) – Determines whether to execute resting action in method or not (special case for if the I/O verify logging comes in a later step)

Returns:

  • result_msg (tuple(func, msg) | none) – msg for later fail_action, or none if passed

  • bool – boolean to determine whether any I/O test failed

wait_for_aen(dut, log_file)

Helper function to wait for the Asynchronous Event Request to complete by parsing /var/log/messages

Parameters:
  • dut (XML) – Device under testing

  • log_file (stream) – File stream to parse when looking at the completion/submission queue

Returns:

line – Line from /var/log/messages with information about completed asynchronous event request

Return type:

str

OCP_DCSSD_2_0_FWActHistory_ActivationHistory.py

This script will run the following tests:
  1. Clear firmware update history

  2. Firmware commit on alternate slot and verify entries

  3. Firmware commit on alternate slot with previous firmware 20 times and verify entries

  4. Verify valid firmware activation history entries doesn’t advance beyond 20

  5. Clear log and verify that back-to-back identical activation events do not result in an event being added to entries

  6. Timestamp less than versus greater than 1 minute

  7. Power cycle count increases

  8. Verify firmware activation count persistence in firmware activation history entry 0

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

FWUP-1, FWHST-LOG-1, FWHST-LOG-3, FWHST-LOG-4, FAHE-4, MS-CONF-6

s53to57(dut, alt_slot)

Performs steps 52-56

Parameters:
  • dut (XML_API) – Device Object Under Test

  • alt_slot (int) – Alternate Slot as defined per Test Procedure

Return type:

None

OCP_DCSSD_2_0_FWActHistory_ActivationHistoryFactory.py

This script will run the following tests:
  1. Get Log Page Command with LID = C2h and record Valid Firmware Activation History Entries field

  2. Verify value is 0 if factory state flag is set

Pass/Fail: Script passes if the Valid Firmware Activation History Entries field is cleared to 0x0

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

FWHST-LOG2

OCP_DCSSD_2_0_FWActHistory_EntryFormat.py

This script will run the following tests:
  1. Verify Current Firmware, Power Cycle Count, Previous Firmware, Slot Number, Commit Action Type, Result, Timestamp, Valid Firmware Activation History Entries are updated in the Firmware Activation History Entry in the Firmware Activation History Log page (Log Identifier 0xC2) when a valid firmware is activated.

  2. Issue a clear FW update history set feature, Issue NVMe command to activate the FW and verify that the Valid Firmware Activation History Entries is not cleared in the entry.

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

FAHE-1 to FAHE-13, MS-CONF-6

OCP_DCSSD_2_0_FWActHistory_EntryFormat_Factory.py

This script will run the following tests:
  1. Get Log Page Command with LID = C2h

  2. Parse all 20 FW Activation History Entries

  3. Verify every entry is cleared to 0

Pass/Fail: Script passes if all Firmware Activation History Entry are cleared to 0x0

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

FAHE-4

OCP_DCSSD_2_0_FWActHistory_LogPage_Format.py

This script will run the following tests:
  1. Verify Firmware Activation History’s log page format for recording the Firmware Activation History matches OCP requirements.

  2. After a Clear Firmware Update Activation History Set Features command, the Valid Firmware Activation History Entires field is cleared to 0 and increments on each new log entry.

  3. A new log entry is created when a non-redundant activation event is generated.

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

FAHL-1/2/3/4/5/6/7, MS-CONF-6

OCP_DCSSD_2_0_FWSlotInfo_LogPage.py

This script will run the following tests:
  1. Get firmware slot info from LID 3h

  2. Get FRMW from Identify Controller

  3. Download and commit the previous firmware image to the starting firmware slot

  4. Verify FRS field for appropriate slot in LID 3h matches the previous firmware image

  5. Verify current and next active firmware slots in LID 3h

  6. Do controller reset

  7. Verify current firmware slot in LID 3h

  8. Repeat steps 3-7 for all supported firmware slots

  9. Commit the current firmware image to the current firmware slot

  10. Clear firmware update history (FID C1h) and verify it’s successful

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

STD-LOG-5, MS-CONF-6

verify_slot(dut, start_fw_slot, PARAMS, prev_fw_fn)

Performs steps 10-21 of the Firmware Slot Information Log Page test plan

Parameters:
  • dut (XML_API) – Device object under test

  • start_fw_slot (int) – Initial FW slot being tested

  • PARAMS (dict) – Adaptation Parameters

  • prev_fw_fn (str) – Previous Firmware File Name

Returns:

  • numd (int) – Number of DWORDs limit for FW Download

  • numd_flag (int) – If NUMD check succeeded

  • start_fw_slot (int) – FW Slot as of execution of step 10

OCP_DCSSD_2_0_FWUpdate_FWActivation.py

This script will run the following tests:
  1. Get state of drive (Features and Log Page) before firmware activation

  2. Firmware activation without reset

  3. Get state of drive (Features and Log Page) and compare with “Before FW activation” values

  4. Activate with original firmware

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

FWUP-11

compare_feat(data_a, data_b)

Compares data between 2 Get Feature commands with the same FID

Parameters:
  • data_a (dict) – data returned from first Get Log Page command

  • data_b (dict) – data returned from second Get Log Page command

Returns:

True or False

Return type:

bool

compare_result(page_a, page_b, key, isStatic)

Compares values between 2 Get Log Page results with the same LID

Parameters:
  • page_a (dict) – Result dictionary a

  • page_b (dict) – Result dictionary b

  • key (string) – Key associated with values to compare

  • isStatic (bool) – Boolean flag to determine if comparing static or dynamic if static, check if equal if dynamic, check if a >= b

Returns:

True or False

Return type:

bool

get_keys(result, less, sk_list, dk_list, add_to_static)

Sorts keys from passed dictionary into static and dynamic lists using recursion

Parameters:
  • result (dict) – Result dictionary from Get Log Page command

  • less (list) – List of keys that are the static or dynamic, whichever is less

  • sk_list (list) – Static key list

  • dk_list (list) – Dynamic key list

  • add_to_static (bool) – Boolean flag to determine which list to insert to

Returns:

  • sk_list (list) – Static key list

  • dk_list (list) – Dynamic key list

OCP_DCSSD_2_0_FWUpdate_FirmwareUpdate.py

This script will run the following tests:
  1. Verify FWUP-7 Partial

  2. Verify FWUP-6, FWUP-4

  3. Verify FWUP-3 Commit Action 0, FWUP-4

  4. Verify FWUP-3 Commit Action 1, FWUP-4

  5. Verify FWUP-3 Commit Action 2

  6. Verify FWUP-3 Commit Action 3, FWUP-4, FWUP-7 Partial

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

FWUP-3/4/6/7

OCP_DCSSD_2_0_FWUpdate_NoDataLoss.py

This script will run the following tests:
  1. Precondition the namespace with DEADBEEFh pattern

  2. Get the firmware slot of the current active firmware image

  3. Get the capacity of the namespace

  4. Determine an alternate firmware slot to use for previous firmware image

  5. Download and commit the previous firmware 100 times

  6. Execute 128KB reads and verify there’s no data corruption of DEADBEEFh pattern

  7. Execute 128KB writes with 5A5A5A5Ah pattern

  8. Download and commit the previous firmware 100 times

  9. Stop the write operation

  10. Execute 128KB reads and verify there’s no data corruption of 5A5A5A5Ah pattern, and when pattern transitions to DEADBEEFh, verify there’s no data corruption of that pattern

  11. Commit the current active firmware image

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

FWUP-2, FWUP-10

download_commit(dut, prev_fw_fn, numd, alt_slot, start_step)

Display the value of a log page field, and if it’s a static value, verify it’s correct

Parameters:
  • dut (XML_API) – Device object under test

  • prev_fw_fn (str) – Previous firmware filename

  • numd (int) – Value of NUMD

  • alt_slot (int) – Alternate firmware slot

  • start_step (int) – Number of the first test step in the function

Return type:

None

OCP_DCSSD_2_0_Feature_ClearFWUpdateHistory.py

This script will run the following tests:
  1. Determine the current and alternate firmware slots

  2. Clear the FW Update History log and verify it was cleared

  3. Download the previous firmware image

  4. Alternate committing the previous and current firmware images multiple times

  5. Verify Valid Firmware Activation History Entries count is correct

  6. Clear the FW Update History log and verify it was cleared

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

CFUH-1 to CFUH-15, GETF-2

OCP_DCSSD_2_0_Feature_ClearPCIeCorrectableError.py

This script will run the following tests:
  1. Issue Set Features to clear PCIe correctable error count

  2. Do GetLogPage for LID C0h and verify PCIe Correctable Error Count is zero

  3. Power cycle the drive

  4. Delay 20 seconds

  5. Do GetLogPage for LID C0h and verify PCIe Correctable Error Count is zero

  6. Issue Set Features with SV = 1

  7. Verify the command aborts with status code 0Dh Feature Identifier Not Savable.

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

CPCIE-1-15, GETF-2

OCP_DCSSD_2_0_Feature_IEEE1667.py

This script will run the following tests:
  1. Check default state of IEEE1667 from Adaptation Parameter File

  2. Disable/Enable IEEE1667 Silo, check from get feature that current state and saved state match

  3. Check again after power cycle

  4. Default state should match

  5. Reverse state of IEEE1667 (Disable/Enable), check from get feature that current state and saved state match

  6. Check again after power cycle

  7. Default state should match

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

S1667-1 to S1667-15, GETF-1/2

OCP_DCSSD_2_0_Feature_ROWTM.py

This script will run the following tests:
  1. Issue an NVMe Get-Feature command with FID = C2h with the SEL field set to the following: 01b, 11b, 00b, 10b

  2. Issue an NVMe Set-Feature command with FID = C2h, setting Dword11 field to the following: 10b, 01b

  3. Power Cycle device

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

ROWTM-1, SROWTM-1 to SROWTM-15, GROWTM-1 to GROWTM-15, GETF-1/2

check_set_feature_result(dut, set_feature_cmd, fid, sv=0, data=None, cdw11=None)

Receives the values stored in a Set-Feature Log, and verifies the feature command’s execution

Parameters:
  • dut (XML_API) – Device object under test

  • set_feature_cmd (dict) – Set-Feature command output

  • fid (int) – FID field value for the set-feature command

  • sv (int) – The Selection field for the set-feature command

  • data (int|None) – Data Pointer for the Set-feature, intended for original set-feature value at start of test

  • cdw11 (int|None) – Command DWord 11 for the Set-Feature, intended for original set-feature value at start of test

Return type:

None

OCP_DCSSD_2_0_FormFactor_E1L_PCIeSpeedLaneWidth.py

This script will run the following tests:
  1. Verify PCI Express Link Capabilities register (0Ch) lane width and speed

  2. Verify PCI Express Link Status register (12h) lane width and speed

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

FFE1L-2

OCP_DCSSD_2_0_FormFactor_E1L_PWRDIS.py

This script will run the following tests:
  1. Assert PWRDIS and wait for device to shutdown

  2. De-assert PWRDIS and wait for device to come up

  3. Start sequential write I/O test and assert PWRDIS and wait for device to shutdown

  4. De-assert PWRDIS and wait for device to come up

  5. Run sequential read I/O test for 5 minutes and verify there are no miscompares

  6. Run sequential write I/O test for 5 minutes

  7. Run sequential read I/O test for 5 minutes

  8. Verify performance is within 5% of performance numbers supplied in adaptation parameters

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

FFE1L-9

wait_assert(dut)

Wait for PWRDIS signal to be asserted

Parameters:

dut (XML_API) – Device object under test

Return type:

None

wait_deassert(dut)

Wait for PWRDIS signal to be de-asserted

Parameters:

dut (XML_API) – Device object under test

Return type:

None

OCP_DCSSD_2_0_FormFactor_E1S_PCIeSpeedLaneWidth.py

This script will run the following tests:
  1. Verify PCI Express Link Capabilities register (0Ch) lane width and speed

  2. Verify PCI Express Link Status register (12h) lane width and speed

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

FFE1S-2

OCP_DCSSD_2_0_FormFactor_E1S_PWRDIS.py

This script will run the following tests:
  1. Assert PWRDIS and wait for device to shutdown

  2. De-assert PWRDIS and wait for device to come up

  3. Start sequential write I/O test and assert PWRDIS and wait for device to shutdown

  4. De-assert PWRDIS and wait for device to come up

  5. Run sequential read I/O test for 5 minutes and verify there are no miscompares

  6. Run sequential write I/O test for 5 minutes

  7. Run sequential read I/O test for 5 minutes

  8. Verify performance is within 5% of performance numbers supplied in adaptation parameters

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

FFE1S-9

wait_assert(dut)

Wait for PWRDIS signal to be asserted

Parameters:

dut (XML_API) – Device object under test

Return type:

None

wait_deassert(dut)

Wait for PWRDIS signal to be de-asserted

Parameters:

dut (XML_API) – Device object under test

Return type:

None

OCP_DCSSD_2_0_FormFactor_M2_PCIeSpeedLaneWidth.py

This script will run the following tests:
  1. Verify PCI Express Link Capabilities register (0Ch) lane width and speed

  2. Verify PCI Express Link Status register (12h) lane width and speed

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

FFM2-5

OCP_DCSSD_2_0_FormatNVM_CryptoErase.py

This script will run the following tests:
  1. Verify Support for Format NVM Command

  2. Get And Save Current LBA size

  3. Format NVM Command (SES=2)

  4. Verify Namespace Recreation and Attachment

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

NVMe-AD-2, NVMe-AD-5, SEC-4

do_format(dut, nsid, lbaf, ses, pil, pi, mset, format_results)

Execute format command and put the results into a dictionary (since the format is done as part of a thread, a dictionary will allow the main part of the program to access the results)

Parameters:
  • dut (XML_API) – Device object under test

  • nsid (int) – Namespace under test

  • lbaf (int) – LBAF to use in the format

  • ses (int) – SES to use in the format

  • pil (int) – PIL to use in the format

  • pi (int) – PI to use in the format

  • mset (int) – MSET to use in the format

  • format_results (dict) – Dictionary to hold the results of the format command

Return type:

None

OCP_DCSSD_2_0_FormatNVM_NoSecureErase.py

This script will run the following tests:
  1. Verify Support for Format NVM Command

  2. Get And Save Current LBA size

  3. Format NVM Command (SES=0)

  4. Delete and recreate smaller fixed size namespace.

  5. Verify Namespace Recreation and Attachment

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

NVMe-AD-2, NVMe-AD-5, SEC-4

do_format(dut, nsid, lbaf, ses, pil, pi, mset, format_results)

Execute format command and put the results into a dictionary (since the format is done as part of a thread, a dictionary will allow the main part of the program to access the results)

Parameters:
  • dut (XML_API) – Device object under test

  • nsid (int) – Namespace under test

  • lbaf (int) – LBAF to use in the format

  • ses (int) – SES to use in the format

  • pil (int) – PIL to use in the format

  • pi (int) – PI to use in the format

  • mset (int) – MSET to use in the format

  • format_results (dict) – Dictionary to hold the results of the format command

Return type:

None

OCP_DCSSD_2_0_FormatNVM_SecureErase.py

This script will run the following tests:
  1. Verify Support for Format NVM Command

  2. Get And Save Current LBA size

  3. Format NVM Command (SES=1)

  4. Delete and recreate smaller fixed size namespace.

  5. Verify Namespace Recreation and Attachment

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

NVMe-AD-2, NVMe-AD-5, SEC-4

do_format(dut, nsid, lbaf, ses, pil, pi, mset, format_results)

Execute format command and put the results into a dictionary (since the format is done as part of a thread, a dictionary will allow the main part of the program to access the results)

Parameters:
  • dut (XML_API) – Device object under test

  • nsid (int) – Namespace under test

  • lbaf (int) – LBAF to use in the format

  • ses (int) – SES to use in the format

  • pil (int) – PIL to use in the format

  • pi (int) – PI to use in the format

  • mset (int) – MSET to use in the format

  • format_results (dict) – Dictionary to hold the results of the format command

Return type:

None

OCP_DCSSD_2_0_IO_Commands.py

This script will run the following tests:
  1. Verify Read/Write/Flush commands are successful

  2. Verify sequential write I/O performance with FUA=0 and FUA=1 is within 5% of each other

  3. Execute Flush during sequential write I/O and verify both pass

  4. Do sequential write/read I/O with FUA=0 for both; then do sequential write/read I/O with FUA=0 for write and FUA=1 for read, and verify performance is within 5% of each other

  5. If supported, disable volatile write cache, do sequential write I/O, and verify performance is within 5% of the value in step 2

  6. If supported, enable volatile write cache and verify it was successful

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

NVMe-IO-1/3, GETF-2

collect_performance_logs(dut, io_test, perf_field)

Collects logs from the ADP and prints the performance logs for a given IO command

Parameters:
  • dut (XML_API) – Device object under test

  • io_test (dict) – Custom IO dict

  • perf_field (str | list) – Performance field to be collected. Either “TestReadBytes” | “TestWriteBytes” | “TestLatencyQoS” | “TestWriteIOs” | “TestReadIOs”

Returns:

perf_val_dict – Parsed QoS latency values or dict for Number of read/write bytes

Return type:

dict

compare_performance_logs(base_io_bytes, other_io_bytes, compare_msg)

Checks the performance log using the perf_metrics dict to determine if a “Performance Not Met” warning needs to be issued

Parameters:
  • base_io_bytes (dict) – dict of either the read, write or flush bytes to be compared to io metric

  • other_io_bytes (dict) – dict of either the read, write or flush bytes to be compared to io metric

  • compare_msg (List) – List tuple of two strings respectively associated with the base_io and other_io to print the params run with that io, such as [(‘with FUA’, ‘without FUA’)]

Return type:

None

get_test_timestamp(dut, test_id, timestamp_type)

Get the starting or ending timestamp and format it for use in sb_filter

Parameters:
  • dut (XML_API) – Device object under test

  • test_id (str) – I/O testname

  • timestamp_type (str) – “StartTime” or “EndTime”

Returns:

timestamp – Timestamp formatted in seconds

Return type:

int

issue_io(dut, seektype, io_profile, threads, blocks, iosperpass=0, io_runtime=-1, io_pattern=0, extra_config=None)

Executes an IO Test

Parameters:
  • dut (XML_API) – Device object under test

  • seektype (str) – Either ‘Sequential’ | ‘Random’

  • io_profile (str) – IO Profile to be executed

  • threads (int | str) – Threads (QD) to execute IO on

  • blocks (int | str) – Number of Logical Blocks

  • iosperpass (int | str) – Param to determine what the IO does on the drive ‘0’: unlimited, ‘-1’: Iterate once over drive, ‘-2’: Iterate twice over drive

  • io_runtime (int) – Time in seconds for IO to execute

  • io_pattern (int) – Pattern for io to be executed

  • extra_config (dict | None) – Optional parameter for running IO test with additional configurations

Return type:

dict

verify_ios(io_tests, is_verify_step=True)

Verifies the successful execution and wait for the completion of an I/O command

Parameters:
  • io_tests (list) – list of I/O test dicts

  • is_verify_step (bool) – Determines whether to execute resting action in method or not (Special case for if the IO verify logging comes in a later step)

Returns:

  • result_msg (tuple(func, msg) | none) – msg for later fail_action, or none if passed

  • bool – boolean to determine whether any I/O test failed

OCP_DCSSD_2_0_IO_Compare.py

This script will run the following tests:
  1. Confirm support and determine maximum I/O size to use

  2. Determine and validate the maximum LBA transfer size

  3. Test individual non-fused commands

  4. Test valid fused operation

  5. Test valid fused operation scenario with incorrect compare pattern

  6. Test fused operation using nonmatching values for NLBs and verify no update performed

  7. Test fused operation using FUSE=1 for both commands and verify no update performed

  8. Test fused operation where first command has FUSE=2 and second command has FUSE=1 and verify no update performed

  9. Test fused operation where second command has FUSE=0

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

NVMe-IO-8/9

check_cmd_status(cmd_result, exp_sct, exp_sc, fail_type='error')

Extract SCT and SC fields from command result and verify if the values are correct or not

Parameters:
  • cmd_result (dict) – Command output

  • exp_sct (str) – Expected status code type in the form (Xh)

  • exp_sc (str) – Expected status code in the form (Xh)

  • fail_type (str) – Result status for the step (default is “error”)

Return type:

None

check_fused_cmd_status(command, expected_type=0, expected_status=0)

Check status of the fused command

Parameters:
  • command (str) – Command to execute (calls fused_compare_and_write() with appropriate parameter values)

  • expected_type (int) – Error response type in SCT field

  • expected_status (int) – Error response status code in SCT field

Return type:

None

execute_command(command, result_queue)

Execute a command and get the results

Parameters:
  • command (str) – Command to execute

  • result_queue (list) – Response and status code

Return type:

None

fused_compare_and_write(dut, compare_slba=0, compare_nlba=1, compare_data='5a', compare_fuse=1, write_slba=0, write_nlba=1, write_data='5a', write_fuse=2)

Execute a fused compare and write command and get the results

Parameters:
  • dut (XML_API) – Device object under test

  • compare_slba (int) – Starting LBA for compare command

  • compare_nlba (int) – Number of LBAs for compare command

  • compare_data (str) – Pattern to use for compare command

  • compare_fuse (int) – Value of FUSE field in Dword 0 for compare command

  • write_slba (int) – Starting LBA for write command

  • write_nlba (int) – Number of LBAs for write command

  • write_data (str) – Pattern to use for write command

  • write_fuse (int) – Value of FUSE field in Dword 0 for write command

Return type:

A list containing status code and response for the compare and write commands

verify_data_buffer(dut, data_pattern, nlb=1, slba=0)

Check status of the fused command

Parameters:
  • dut (XML_API) – Device object under test

  • data_pattern (str) – Pattern to use in the I/O test

  • nlb (int) – Number of LBAs

  • slba (int) – Starting LBA

Returns:

True or False

Return type:

bool

OCP_DCSSD_2_0_IO_WriteUncorrectable.py

This script will run the following tests:
  1. Verify DCLP-6 is set to 800Fh in LID C4h

  2. Verify ONCS bit 1 is set to 1

  3. Determine the largest supported data transfer in blocks

  4. Execute Write Uncorrectable on a single LBA and verify a Read to that LBA fails

  5. Recover the LBA by doing a Write to it

  6. Execute Write Uncorrectable on an LBA range by setting NLB=MaxLbas and verify a Read to that LBA fails

  7. Recover the LBA range by doing a Write to it

  8. Execute Write Uncorrectable on the entire namespace and verify Reads to the entire namespace fail

  9. Recover the entire namespace by doing Writes to it

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

NVMe-IO-10/11/12/13/14

get_RanLBA(max_lba)

Get a random SLBA number

Parameters:

max_lba (int) – Max range of LBA

Returns:

lba_x – Random SLBA value

Return type:

int

read_range_with_error(dut, max_lba)

Read a range of LBAs and verify “unrecovered read error” status is returned

Parameters:
  • dut (XML_API) – Device object under test

  • max_lba (int) – Number of blocks to use in the I/O test

Returns:

True or False

Return type:

bool

OCP_DCSSD_2_0_IO_WriteZeroes.py

This script will run the following tests:
  1. Get LogPage for LID C4h to read Device Capabilities

  2. Issue a NVMe Identify Command with CNS=1 for the Identify Controller data structure

  3. Issue a NVMe Identify Command with CNS=0 for the Identify Namespace data structure

  4. Verify Write Zeroes Command Support field DCLP-3 is set to 801Fh

  5. Write Zeroes command with NSID=1, SLBA=LBA-X, NLB=1, DEAC=0, FUA=0

  6. Write Zeroes command with NSID=1, SLBA=LBA-X, NLB=1, DEAC=0, FUA=1

  7. Write Zeroes command with NSID=1, SLBA=LBA-X, NLB=1, DEAC=1, FUA=0

  8. Write Zeroes command with NSID=1, SLBA=LBA-X, NLB=1, DEAC=1, FUA=1

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

NVMe-IO-4/5/6

get_slba_x(max_lba)

Get a random SLBA value

Parameters:

max_lba (int) – Max I/O blocks value from get_max_blocks()

Returns:

lba_x – Random SLBA value

Return type:

int

verify_data_buffer(dut, data_pattern, nlb=1, slba=0)

Run reverify I/O test and check whether it passed or failed

Parameters:
  • dut (XML_API) – Device object under test

  • data_pattern (int) – Data pattern to be verified

  • nlb (int) – Number of logical blocks

  • slba (hex) – Starting LBA value

Returns:

True (test passed) or False (test failed)

Return type:

boolean

OCP_DCSSD_2_0_LogPage_CmdsSupportedEffects.py

This script will run the following tests:
  1. Read the Controller Capabilities register and check values of bits 37 and 44

  2. Do GetLogPage for LID 5h

  3. Verify the log page contains an entry for each admin command shown as supported in Table 4 in the testplan

  4. Verify the log page contains an entry for each I/O command shown as supported in Table 5 in the testplan

  5. Check the effects bits in Table 5 in the testplan for I/O commands

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

STD-LOG-6

LogPageCheckBitValue(cmd_dict, tag, bit_fieldname, exp_value)

Check value of a particular bit

Parameters:
  • cmd_dict (dict) – Command dictionary to use

  • tag (str) – Bit field name

  • bit_fieldname (str) – Bit field abbreviation

  • exp_value (int) – Expected bit value

Return type:

None

OCP_DCSSD_2_0_LogPage_DeviceCapabilities.py

This script will run the following tests:
  1. NVMe Get Log Page Command with LID=C4h

  2. NVMe Identify Command with CNS=01h

  3. Verify number of physical PCIe ports matches the corresponding field in adaptation parameters

  4. Verify bytes 1:0 of OOB Management Support field are correct

  5. Verify bytes 1:0 of Write Zeroes Command Support field are correct

  6. Verify bytes 1:0 of Sanitize Command Support field are correct

  7. Verify bytes 1:0 of Dataset Management Command Support field are correct

  8. Verify bytes 1:0 of Write Uncorrectable Command Support field are correct

  9. Verify bytes 1:0 of Fused Operation Support field are correct

  10. Verify various values for DSSD Power States

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

DCLP-1 to DCLP-12

OCP_DCSSD_2_0_LogPage_ErrorInfo.py

This script will run the following tests:
  1. Get ELPE field

  2. Do GetLogPage for LID 1h to get error count for each entry

  3. Reset controller

  4. Do IdentifyController

  5. Do GetLogPage for LID 1h to get error count for each entry

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

STD-LOG-1

OCP_DCSSD_2_0_LogPage_ErrorRecovery.py

This script will run the following tests:
  1. Read Error Information log page to get recovery settings

  2. Verify reserved fields and static fields and make sure device is in error free state

  3. Record performance logs and set AEN before drive goes into error state

  4. Inject error and recover the drive based on reset and recovery actions

  5. Check drive performance after it recovers

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

EREC-AEN-1, EREC-1 to EREC-15

OCP_DCSSD_2_0_LogPage_PersistentEvents.py

This script will run the following tests:
  1. Verify that reading the Persistent Event Log page is supported by a device.

  2. If the controller does not have a persistent event log reporting context, then the controller shall abort the command with a status code of Command Sequence Error.

  3. Verify that Supported Events Bitmap field has bits 13:1 set to 1 indicating that the following event logs are supported
    1. Thermal Excursion Event

    2. Telemetry Log Create Event

    3. Sanitize Completion Event

    4. Sanitize Start Event

    5. Format NVM Completion Event

    6. Format NVM Start Event

    7. Change Namespace Event

    8. NVM Subsystem Hardware Error Event

    9. Power-on or Reset Event

    10. Timestamp Change Event

    11. Firmware Commit Event

    12. SMART / Health Log Snapshot Event

  4. Power Cycle the drive and then perform Controller Level Reset on drive. Verify that these two actions have increased the “Total Number of Events” field in Log Page data.

  5. Verify that mandatory events that occur while a reporting context is active are not reported in that reporting context.

  6. Verify that mandatory events that occur while a reporting context is not active are reported when the next reporting context is created.

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

STD-LOG-9/10

OCP_DCSSD_2_0_LogPage_SMART.py

This script will run the following tests:
  1. Do GetLogPage for LID 2h with different NSIDs

  2. Check various field values

  3. Do controller reset and repeat steps 1-2

  4. Do FLR and repeat steps 1-2

  5. Do NSSR and repeat steps 1-2

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

STD-LOG-2/3, SLOG-1/4/5/10/11

get_smart_logpage(dut, logpage_nsid)

Issue SMART log page command and return the data structure

Parameters:
  • dut (XML_API) – Device object under test

  • logpage_nsid (int) – NSID to use

Returns:

output_cmd

Return type:

list

smart_logpage_compare_field_values(data_struct1, data_struct2, start_byte, end_byte, tag, method)

Compare SMART log page field value between two data structures

Parameters:
  • data_struct1 (list) – First data structure to compare

  • data_struct2 (list) – Second data structure to compare

  • start_byte (int) – Starting byte number in list

  • end_byte (int) – Ending byte number in list

  • tag (str) – Log page field name

  • method (int) – Testing method to use (0 = verify values match, 1 = allow for second value to be less than the first, 2 = allow second value to be greater than the first, 3 = allow second value to be one greater than the first)

Return type:

None

smart_logpage_field_value_is_zero(data_struct, start_byte, end_byte, tag, method)

Check if SMART log page field value is set to zero

Parameters:
  • data_struct (list) – Data structure to check

  • start_byte (int) – Starting byte number in list

  • end_byte (int) – Ending byte number in list

  • tag (str) – Log page field name

  • method (int) – Testing method to use (1 = check single byte, 2 = check multiple bytes)

Return type:

None

OCP_DCSSD_2_0_LogPage_SMARTExtended_Endianness.py

This script will run the following tests:
  1. Do GetLogPage for LID C0h

  2. Check that byte 0 of Security Version Number and Log Page Version fields is correct

  3. Verify Log Page GUID is correct

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

SLOG-3, SMART-22/27/28

OCP_DCSSD_2_0_LogPage_SMARTExtended_EnduranceEstimate.py

This script will run the following tests:
  1. Do GetLogPage for LID C0h and get Endurance Estimate field value

  2. If endurance groups are supported, do GetLogPage for LID 9h and get Endurance Estimate field value

  3. Verify both values are the same

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

SMART-25

OCP_DCSSD_2_0_LogPage_SMARTExtended_NUSE.py

This script will run the following tests:
  1. Precondition the device to have a single namespace

  2. Verify that the values of NUSE in Identify Namespace and Total NUSE in LID C0h are the same

  3. Calculate the temporary namespace capacity to use, factoring in the namespace granularity descriptor size

  4. Delete the namespace

  5. Create, attach and write to namespaces, from 1 to MNAN/NN value

  6. Power cycle the device and delay for 10 minutes

  7. Verify that the Total NUSE value reported in LID C0h is equal to the value of total NUSE summed over all the namespaces created

  8. Delete all of the namespaces

  9. Create and attach a new namespace

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

SMART-23

get_ID_NS_DATA_1(params)

Helper function to retrieve and parse the ADP’s ID_NS_DATA_1 field information

Parameters:

params (dict) – ADP parameter values

Returns:

  • adp_id_ns (dict) – Dictionary of parsed values from the ADP’s ID_NS_DATA_1 field

  • create_Namespace (dict)

namespace_management(dut, sel, format_index, mset, nvmsetid, anagrpid, new_ns_capacity=0, max_ns_count=1, pi=0, pil=0, is_private=0)

Helper function to create a new Namespace with specific field information

Parameters:
  • dut (XML) – Device object under test

  • sel (int) – Select Field for namespace management action

  • new_ns_capacity (int) – Create Size capacity

  • max_ns_count (int) – Count of namespaces to be made

  • format_index (int)

  • mset (int) – Metadata Settings

  • nvmsetid (int) – NVM Set identifier associated with the submission queue

  • anagrpid (int) – ANA Group Identifier

  • pi (int) – Protection Information

  • pil (int) – Protection Information Location

  • is_private (int) – Determines if namespace is private or not

Returns:

create_Namespace

Return type:

dict

OCP_DCSSD_2_0_LogPage_SMARTExtended_PLPCount.py

This script will run the following tests:
  1. Do GetLogPage for LID C0h and get PLP Start Count field value

  2. Power cycle the drive

  3. Do GetLogPage for LID C0h and get PLP Start Count field value and verify it increased by 1

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

SMART-24

OCP_DCSSD_2_0_LogPage_SMARTExtended_Persistence.py

This script will run the following tests:
  1. Issue NVMe GetLogPage command with LID = C0h, SMART/Health Information Extended Log Page.

  2. Wait 10 minutes and then power cycle the drive

  3. Verify fixed or reserved values are unchanged

  4. Verify dynamic values are unchanged or have increased

  5. Do controller reset and repeat steps 3-4

  6. Do NSSR and repeat steps 3-4

  7. Do FLR and repeat steps 3-4

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

SLOG-1/4/10, SMART-12/13/15/16/18/19/20/22/25/26/27/28/30

parse_logpage_values(dut, lid)

Issues a Get Log Page command and parses into Static and Dynamic dictionaries

Parameters:
  • dut (XML_API) – Device object under testing

  • lid (int) – Integer issued in either hex or decimal, specifies GetLog Page

Returns:

get_log_x, static_fields, dynamic_fields

Return type:

dict

repeat_step_12_to_15(dut, static_fields, dynamic_fields, after_power_cycle=False)

Helper function for repeated test steps 12 to test step 15

Parameters:
  • dut (XML) – Device object under testing

  • static_fields (list) – List of the static fields from the SMART/Health Extended Log Page

  • dynamic_fields (list) – List of the dynamic fields from the SMART/Health Extended Log Page

  • after_power_cycle (bool) – Boolean to indicate edge case for step 16

Return type:

None

OCP_DCSSD_2_0_LogPage_SMARTExtended_PowerStateChangeCount.py

This script will run the following tests:
  1. Verify Power State Change Count reported in the SMART/Health Information Extended Log has increased by the number of NVMe Power state changes

  2. Verify Power State Change Count reported in the SMART/Health Information Extended Log has increased by the number of DSSD Power State changes

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

SMART-31

postcondition(dut)

Sets the current power state back to the default NVMe Power State 0

Parameters:

dut (XML_API) – Device object under test

Return type:

None

OCP_DCSSD_2_0_LogPage_SMARTExtended_SecVerNumber.py

This script will run the following tests:
  1. Do GetLogPage for LID C0h

  2. Check Security Version field against parameterization data

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

SMART-22

OCP_DCSSD_2_0_LogPage_SMARTExtended_UnalignedIO.py

This script will run the following tests:
  1. Power cycle the device

  2. Do GetLogPage for LID C0h and verify Unaligned I/O field is 0

  3. Send 10 4KB sequential write I/O commands starting at LBA 1

  4. Do GetLogPage for LID C0h and verify Unaligned I/O field increased by at least 10

  5. Power cycle the device

  6. Do GetLogPage for LID C0h and verify Unaligned I/O field is 0

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

SMART-21

perform_cleanup(dut, orig_lbaf)

Used to postcondition drive in the event of a test-wide failure

Parameters:
  • dut (XML_API) – Device object under test

  • orig_lbaf (int) – Original LBA to re-format drive to

Returns:

‘test’ – fail_action=’test’

Return type:

str

OCP_DCSSD_2_0_LogPage_SMARTExtended_UnitsRW.py

This script will run the following tests:
  1. Do GetLogPage for LID C0h and get physical media units written and read values

  2. Perform 128KB sequential writes for 5 minutes

  3. Perform 128KB sequential reads for 5 minutes

  4. Do GetLogPage for LID C0h and verify physical media units written and read values increased

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

SMART-1/2

get_logpage_fields(dut, lid, field_name1, field_name2, print_msgs)
Parameters:
  • dut

  • lid

  • field_name1

  • field_name2

  • print_msgs

OCP_DCSSD_2_0_LogPage_SMART_LittleEndian.py

This script will run the following tests:
  1. Do GetLogPage for LID 2h and get values of Data Units Read/Written, Host Read/Write Commands, Controller Busy Time, Power Cycles, Power On Hours, and Unsafe Shutdowns fields

  2. Issue four write and read commands, each with 251 blocks

  3. Power cycle the drive

  4. Do GetLogPage for LID 2h and verify Data Units Read/Written and Host Read/Write Commands values increased by at least 1

  5. Surprise power cycle the drive

  6. Do GetLogPage for LID 2h and verify Power Cycle Count and Unsafe Shutdowns values increased by at least 1

  7. Perform 4KB random reads and writes for 65 minutes

  8. Do GetLogPage for LID 2h and verify Power On Hours value increased by at least 1

  9. Verify Controller Busy Time value stayed the same or increased by at least 1

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

STD-LOG-2, SLOG-3/5

compare_values(field_name, baseline_dict, new_values_dict)

Compare field values before and after various testing

Parameters:
  • field_name (str) – Field name

  • baseline_dict (dict) – Original field value

  • new_values_dict (dict) – New field value

Return type:

None

verify_io(io_test, io_type, seektype)

Verifies the succession of an I/O command

Parameters:
  • io_test (dict) – I/O Command

  • io_type (str) – Name of I/O test

  • seektype (int) – 0: ‘Sequential’, 1: ‘Random’

Returns:

io_test_failed – bool on the status of IO test completion

Return type:

bool

OCP_DCSSD_2_0_LogPage_SMART_UnsafeShutdowns.py

This script will run the following tests:
  1. Do GetLogPage for LID 2h and get Unsafe Shutdowns field value

  2. Surprise power cycle the drive 10 times

  3. Do GetLogPage for LID 2h and get Unsafe Shutdowns field value and verify it increased by 1

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

STD-LOG-2, SLOG-5

OCP_DCSSD_2_0_LogPage_SMART_VolatileMem_BackupDev_Failure.py

This script will run the following tests:
  1. Verify Critical Warnings value in LID 2h is zero

  2. Inject PLP defect error

  3. Trigger the failure by sending reads equal to NRTDP value

  4. Verify Critical Warnings value in LID 2h indicates Volatile Memory Backup Device Failure and Read Only Mode have occurred

  5. Recover the device from the error injection

  6. Power cycle the device

  7. Verify Critical Warnings value in LID 2h is zero

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

STD-LOG-2, SLOG-5/11

OCP_DCSSD_2_0_LogPage_SMART_WriteRead.py

This script will run the following tests:
  1. Do GetLogPage for LID 2h and get values of various fields

  2. Perform 4KB random reads and writes for 65 minutes

  3. Do GetLogPage for LID 2h and verify the various fields increased

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

STD-LOG-2, SLOG-5

compare_fields(field_name, value_before, value_after)

Compare field values before and after I/O test

Parameters:
  • field_name (str) – Field name

  • value_before (int) – Field value before I/O

  • value_after (int) – Field value after I/O

Returns:

Various fields

Return type:

list

get_smart_logpage_fields(dut, logpage_nsid)

Get log page field values

Parameters:
  • dut (XML_API) – Device object under test

  • logpage_nsid (int) – NSID to use

Returns:

Various fields

Return type:

list

OCP_DCSSD_2_0_LogPage_UnsupportedRequirements.py

This script will run the following tests:
  1. Verify Unsupported Requirements Log Page, LID = C5h, default values are set to values as specified in OCP document.
    1. Reserved fields “URLP-2” and “URLP-4” are cleared to zero.

    2. Log Page Version field “URLP-5” is set to one.

    3. Log Page GUID field “URLP-6” is set to C7BB98B7D0324863BB2C23990E9C722Fh

  2. Collection Unsupported Count, “URLP-1.” Verify that nonzero values in Unsupported Requirement list matches with Unsupported Count.

  3. Verify that Requirement IDs in Unsupported Requirements list matches with Unsupported Requirement ID passed in Adaptation Parameters file.

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

URLP-1/2/3/4/5/6

OCP_DCSSD_2_0_NSMgmt_NSAttachCommand.py

This script will run the following tests:
  1. Verify Identify data appropriately updates based on current state of namespaces.

  2. Verify that when attaching an namespace to a controller that it shifts to active.

  3. Verify that when deleting an attached namespace from an controller that it shifts to inactive.

  4. Verify maximum allowed namespaces can be created, attached, and appropriate Identify data reflects changes.

  5. Based on support, see if EUI64 and NGUID differs from stored namespace data of vendor parameters file.

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

NVMe-AD-4, NUSE-1, NSM-1/2/3/4/5/6/7

check_contains_0s(nsid_list, struct_type)

Checks on either the returned Active or Allocated Namespace List

nsid_list: dict

Either an Actice NS ID List or an Allocated NS ID List

struct_type: str

The String name associated with the command, intended for log printing

Return type:

None

namespace_management(dut, id_ns, sel, format_index, mset, new_ns_capacity=0, max_ns_count=1, is_private=0, pi=0, pil=0)

Helper function to create a new Namespace with specific field information

Parameters:
  • dut (XML) – Device object under test

  • id_ns (dict) – Identify Namespace command dictionary

  • sel (int) – Select Field for namespace management action

  • new_ns_capacity (int) – Create Size capacity

  • max_ns_count (int) – Count of namespaces to be made

  • format_index (int)

  • mset (int) – Metadata Settings

  • is_private (int) – Determines if namespace is private or not

  • pi (int) – Protection Information

  • pil (int) – Protection Information Location

Returns:

create_Namespace

Return type:

dict

OCP_DCSSD_2_0_NSMgmt_NSBasicData.py

This script will run the following tests:
  1. Verify that new drives come from the factory configured with exactly one active namespace sized to the maximum capacity of the device.

  2. Verify that the FLBAS for this namespace corresponds to the default set at the factory and as specified per the device profile contained in the Adaptation data.

  3. Verify that for a valid namespace, the namespace data returned from the Identify command exactly matches the namespace data as provided in the Adaptation data for the drive.

  4. Verify that the values of NN and MNAN reported in the Identify Controller Dataset are set correctly per the device profile setting in the Adaptation data.

  5. Verify that support for the NSWG field is indicated in the NSFEAT field in adaptation data.

  6. Verify that the NSWG field in Namespace data is populated and, that the value matches the indirection unit value in Adaptation data.

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

NSM-4/5/6, NVMe-OPT-7, SECTOR-3

OCP_DCSSD_2_0_NSMgmt_NSMgmtCommand.py

This script will run the following tests:
  1. Verify ability to create maxmimum allowed namespaces on DUT, accounting for NS Granularity

  2. Verify namespace management behavior across all namespaces.

  3. Verify Identify data updates accordingly with unattached namespaces.

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

NVMe-AD-3, NSM-1/2/3/4/5/6/7

namespace_management(dut, id_ns, sel, format_index, mset, new_ns_capacity=0, max_ns_count=1, is_private=0, pi=0, pil=0)

Helper function to create a new Namespace with specific field information

Parameters:
  • dut (XML) – Device object under test

  • id_ns (dict) – Identify Namespace command dictionary

  • sel (int) – Select Field for namespace management action

  • new_ns_capacity (int) – Create Size capacity

  • max_ns_count (int) – Count of namespaces to be made

  • format_index (int)

  • mset (int) – Metadata Settings

  • is_private (int) – Determines if namespace is private or not

  • pi (int) – Protection Information

  • pil (int) – Protection Information Location

Returns:

create_Namespace

Return type:

dict

OCP_DCSSD_2_0_Namespace_Support.py

This script will run the following tests:
  1. Identify Command with CNS = 0

  2. Identify Command with CNS = 1

  3. Identify Command with CNS = 2

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

SECTOR-3

OCP_DCSSD_2_0_PCIe_BootRequirements.py

This script will run the following tests:
  1. Read “Expansion ROM Base Address” register and verify that “Option ROM” is not included.

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

BOOT-2

OCP_DCSSD_2_0_PCIe_LowPowerModes.py

This script will run the following tests:
  1. If Active State Power Management (ASPM) is supported, the default firmware state shall be disabled. Verify this by reading ASPMS and ASPMC.

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

LPWR-1

OCP_DCSSD_2_0_PCIe_MaxPayloadSize.py

This script will run the following tests:
  1. Verify PCI express Device Capabilities register (04h) max payload size

  2. Verify PCI Express Link Status register (08h) max read request size through power cycle

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

PCI-1

OCP_DCSSD_2_0_PCIe_Resets.py

This script will run the following tests:
  1. While I/O is running, issue FLR for multiple instances and verify that the drive recovers and that I/O is still running

  2. Issue cold reset for multiple instances and verify that the drive recovers

  3. Issue warm reset for multiple instances and verify drive recovers

  4. While I/O is running, issue hot reset for multiple instances and verify that the drive recovers and that I/O is still running

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

PCI-5/6

OCP_DCSSD_2_0_PCIe_TLPCompletionTimeout.py

This script will run the following tests:
  1. The TLP completion timeout is programmable to different supportable ranges by programming the timeout to a different subset range.

  2. Disable the TLP completion timeout and verify that it was successful.

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

PCI-2/3/4

OCP_DCSSD_2_0_PLPHealth_PLPHealthCheckInterval.py

This script will run the following tests:
  1. Get factory default value of feature PLP Health Check Interval (0xC6) and it should be 000Fh.

  2. Using set feature change the interval to X minute, value other than 000Fh, and using get feature check that the current state and saved state are set to Xh no later than next power cycle.

  3. Current and saved state should be Xh even after drive goes through power cycle.

  4. Default state should be 000Fh.

  5. Using set feature change the interval to 0 , Disable Health Check, and using get feature check that the current state and saved state are set to 0h no later than next power cycle.

  6. Current and saved state should be 0h even after drive goes through power cycle.

  7. Default state should be 000Fh.

  8. Using set feature change the interval to 000Fh and using get feature check that the current state and saved state are set to 000Fh no later than next power cycle.

  9. Current and saved state should be 000Fh even after drive goes through power cycle.

  10. Default state should be 000Fh.

  11. If setting this feature is not supported by the controller then a status error code of 0x2 (Invalid Field in Command) shall be returned.

  12. Check the default state of 0xC6 with sel=01b.It should be 000Fh and should not change over power cycle. Current state selection should not affect the default state.

  13. Check the capabilities of 0xC6 with sel=11b and it should be 5h indicating that this feature is savable, changeable, and not name space specific.

  14. Check the current state of 0xC6 with sel=00b and it should match with Interval selection made with set feature.

  15. Check the saved state of 0xC6 with sel=10b.

  16. If this feature is not supported by the controller, then a status error code of 0x2 (Invalid Field in Command) shall be returned

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

SPLPI-1 to SPLPI-15, GPLPI-1/2, GETF-1/2, PLP-7

OCP_DCSSD_2_0_Power_IdlePower.py

This script will run the following tests:
  1. Loop over power states from 0 to NPSS

  2. Verify IDLP multiplied by IPS = 5W

  3. Set power state to the current power state in the loop and verify it was set correctly

  4. Collect 30 idle power measurements at 1 second intervals

  5. Compute average idle power of the measurements and verify it’s <= 5W + 5% margin

  6. Repeat steps 2-5 for each operational power state

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

PWR-1/6

OCP_DCSSD_2_0_Power_PowerManagement.py

This script will run the following tests:
  1. Do SetFeaturesSaves with FID=2h to set power state to the current power state in the loop

  2. Do GetFeatures and verify saved and current feature value is the power state that was set previously

  3. Power cycle the drive

  4. Repeat previous steps for each operational power state

  5. Do SetFeaturesSaves with FID=7h to set DSSD power state to the current power state in the loop

  6. Do GetFeatures and verify current feature value is the power state that was set previously

  7. Power cycle the drive

  8. Repeat previous steps for each operational power state

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

PWR-1/5, DSSDPSS-1/2/3, SDSSDPS-1 to SDSSDPS-15, DSSDPSG-1/2, GDSSDPS-1/2

get_current_ps(dut)

Gets the current power state

Parameters:

dut (XML_API) – Device object under test

Returns:

ps – Current Power State

Return type:

int

postcondition(dut, ps)

Sets the current power state back to the default value

Parameters:
  • dut (XML_API) – Device object under test

  • ps (int) – Power State to set device to

Return type:

None

OCP_DCSSD_2_0_ReliabilityPLP_DataIntegrity.py

This script will run the following tests:
  1. Issue Identify Controller and verify it’s successful

  2. Check RTD3 Entry Latency field value

  3. Issue a Sequential Write IO for 128kiB, QD=128

  4. Issue Sequential Read IO for 128kiB, QD=128

  5. Execute normal shutdown process and verify CC.SHN and CSTS.SHST values

  6. Execute abrupt shutdown process and verify CC.SHN and CSTS.SHST values

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

PLP-1

check_performance_logs(perf_metrics, io_bytes)

Checks the performance log using the perf_metrics dict to determine if a “Performance Not Met” warning needs to be issued

Parameters:
  • perf_metrics (list | dict) – Performance metrics of Read and Write

  • io_bytes (dict) – dict for read/write bytes

Return type:

None

collect_performance_logs(dut, io_test, perf_field)

Collects logs from the ADP and prints the performance logs for a given IO command

Parameters:
  • dut (XML_API) – Device object under test

  • io_test (dict) – Custom IO dict

  • perf_field (str | list) – Performance field to be collected. Either “TestReadBytes” | “TestWriteBytes” | “TestLatencyQoS” | “TestWriteIOs” | “TestReadIOs”

Returns:

perf_val_dict – Parsed QoS latency values or dict for Number of read/write bytes

Return type:

dict

execute_IO_Profile(dut, test_type, io_profile, io_runtime=-1, io_pattern=1)
Executes each of the IO Profiles listed in Table 4
  1. Sequential Read (MiB/s) (128kiB, QD = 128)

  2. Sequential Write (MiB/s) (128kiB, QD = 128)

  3. Random Read (KIOPS) (4kiB, QD = 128)

  4. Random Writes (KIOPS) (4kiB, QD = 128)

  5. Random 70R:30W mix (KIOPS) (4kiB, QD = 128)

Parameters:
  • dut (XML_API) – Device object under test

  • test_type (str) – Either ‘Sequential’ | ‘Random’

  • io_profile (str) – IO Profile to be executed

  • io_runtime (int) – Time in seconds for IO to execute

  • io_pattern (int) – Pattern for io to be executed

Return type:

dict

get_runtime_seconds(dut, test_id)

Get the starting or ending timestamp and format it for use in sb_filter

Parameters:
  • dut (XML_API) – Device object under test

  • test_id (str) – I/O testname

Returns:

timestamp – Timestamp formatted in seconds

Return type:

int

restore_orig_abrupt_value(dut, shutdown_type)

Restore original value of Abrupt shutdown

Parameters:
  • dut (XML_API) – Device object under test

  • shutdown_type (int) – Original Abrupt value

Return type:

None

set_shn_bit(dut, set_value)

Sets the CC.SHN bit

Parameters:
  • dut (XML_API) – Device object under test

  • set_value (int) – Value you want to set the CC field to (zeros based)

Return type:

None

verify_bit_transition(dut, field_str, value, timeout)

Verifies that the CSTS field being checked transitions within the ‘timeout’

Parameters:
  • dut (XML_API) – Device object under test

  • ctrl_status (dict) – Dictionary for Controller Status Register

  • field_str (str) – Field of CSTS to be checked for transition

  • value (int) – Value of CSTS field to be compared to

  • timeout (int) – CSTS.TO field to be used for determining timeout

Return type:

None

verify_data_buffer(dut, shutdown_type, test_type, data_pattern=0)

Run reverify I/O test and check whether it passed or failed

Parameters:
  • dut (XML_API) – Device object under test

  • test_type (str) – IO Profile type to be verified

  • data_pattern (int) – Data pattern to be verified

  • shutdown_type (int) – Original Abrupt value

Return type:

None

verify_ios(io_tests)

Verifies the succession of an I/O command

Parameters:

io_tests (list) – list of I/O Command dicts

Returns:

io_failed – Returns failed if any io test failed

Return type:

bool

OCP_DCSSD_2_0_ReliabilityPLP_IOLatencyPerf.py

This script will run the following tests:
  1. Issue Get-Feature FID=C6h for PLP Health Check Interval data

  2. Issue Set-Feature FID=C6h to set PLP Health Check Interval data for the following values: 05h, 19h, 0Fh

  3. Issue both a Read and Write IO at 128kiB, QD=128, for 5 minutes

  4. Compare IO tests performance to the performance logs in the ADP

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

PLP-2/7

check_performance_logs(perf_metrics, io_bytes)

Checks the performance log using the perf_metrics dict to determine if a “Performance Not Met” warning needs to be issued

Parameters:
  • perf_metrics (list | dict) – Performance metrics of Read and Write

  • io_bytes (dict) – dict for read/write bytes

Return type:

None

collect_performance_logs(dut, io_test, perf_field)

Collects logs from the ADP and prints the performance logs for a given IO command For a Sequential IO: MiB/s, for a Random IO: IOPS

Parameters:
  • dut (XML_API) – Device object under test

  • io_test (dict) – Custom IO dict

  • perf_field (str | list) – Performance field to be collected. Either “TestReadBytes” | “TestWriteBytes” | “TestLatencyQoS” | “TestWriteIOs” | “TestReadIOs”

Returns:

perf_val_dict – Parsed QoS latency values or dict for Number of read/write bytes

Return type:

dict

execute_IO_Profile(dut, test_type, io_profile, io_runtime=-1, io_pattern=1)
Executes each of the IO Profiles listed in Table 4
  1. Sequential Read (MiB/s) (128kiB, QD = 128)

  2. Sequential Write (MiB/s) (128kiB, QD = 128)

  3. Random Read (KIOPS) (4kiB, QD = 128)

  4. Random Writes (KIOPS) (4kiB, QD = 128)

  5. Random 70R:30W mix (KIOPS) (4kiB, QD = 128)

Parameters:
  • dut (XML_API) – Device object under test

  • test_type (str) – Either ‘Sequential’ | ‘Random’

  • io_profile (str) – IO Profile to be executed

  • io_runtime (int) – Time in seconds for IO to execute

  • io_pattern (int) – Pattern for io to be executed

Return type:

dict

get_runtime_seconds(dut, test_id)

Get the starting or ending timestamp and format in seconds

Parameters:
  • dut (XML_API) – Device object under test

  • test_id (str) – I/O testname

Returns:

timestamp – Timestamp formatted in seconds

Return type:

int

verify_ios(io_tests)

Verifies the succession of an I/O command

Parameters:

io_tests (list) – list of I/O Command dicts

Returns:

io_failed – Returns failed if any io test failed

Return type:

bool

OCP_DCSSD_2_0_ReliabilityPLP_PLPFailure.py

This script will run the following tests:
  1. Perform sequential write/read for five minutes

  2. Inject PLP error

  3. Record EOL-PLP setting

  4. Perform sequential writes for one minute and verify pass/fail based on EOL-PLP setting

  5. Recover the device from the error injection

  6. Check drive performance after it recovers

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

PLP-9

OCP_DCSSD_2_0_ReliabilityPowerINCS_IncompleteShutdown.py

This script will run the following tests:
  1. Perform sequential write and read for five minutes and collect performance logs

  2. Issue GetLogPage for LID 2h and check Critical Warning bits 3-4

  3. Issue GetLogPage for LID C0h and record Incomplete Shutdowns field

  4. Create INCS scenario on the drive

  5. Perform 4KB random writes with a queue depth of 128

  6. Issue Identify command and verify it passes

  7. Issue GetLogPage for LID C0h and check Incomplete Shutdowns field

  8. Issue GetLogPage for LID 2h and check Critical Warning bit 3

  9. Issue GetLogPage for LID C1h and check various fields

  10. Perform sequential writes and verify they fail

  11. Perform sequential reads and check if they pass or fail

  12. Format the drive

  13. Set CC.EN=1

  14. Issue GetLogPage for LID C1h and check Panic ID field

  15. Issue Identify command and verify it passes

  16. Perform sequential write and read for five minutes and collect performance logs

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

INCS-1/4/5/6

OCP_DCSSD_2_0_ReliabilityPowerTTR_ControllerStatus.py

This script will run the following tests:
  1. Reset the controller by clearing CC.EN field to zero.

  2. Enable the controller, CC.EN=1.

  3. Device will set CSTS.RDY to 1 when it is ready.

  4. Device should service ADMIN commands as soon as CSTS,RDY = 1.

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

TTR-3/4

OCP_DCSSD_2_0_ReliabilityPowerTTR_DeviceStability.py

This script will run the following tests:
  1. Precondition the namespace twice with 128KiB sequential writes

  2. Perform sequential reads and writes on the device for 5 minutes

  3. Do a normal shutdown on the device

  4. Power device back on

  5. Perform sequential reads and verify no there’s no data corruption

  6. Perform sequential reads and writes on the device for 5 minutes and check performance

  7. Do an abrupt shutdown on the device

  8. Repeat steps 4-6

  9. Start a sequential write test

  10. Do an ungraceful shutdown on the device

  11. Repeat steps 4-6

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

TTR-7/8/12/15/16/19

check_performance_logs(perf_metrics, io_bytes, io_type)

Checks the performance log using the perf_metrics dict to determine if a “Performance Not Met” warning needs to be issued

Parameters:
  • perf_metrics (list) – Performance metrics of read and write expected throughput

  • io_bytes (float) – Either the read or write bytes to be compared to I/O metric

  • io_type (int) – 0: Read, 1: Write

Return type:

None

collect_performance_logs(dut, seq_read, seq_write, io_runtime)

Collects and prints the performance logs for reads and writes in an I/O test

Parameters:
  • dut (XML_API) – Device object under test

  • seq_read (dict) – Custom read I/O test dict

  • seq_write (dict) – Custom write I/O test dict

  • io_runtime (int) – Time in seconds for IO to execute

Returns:

  • read_bytes (int) – Number of bytes read

  • write_bytes (int) – Number of bytes written

execute_IO_Profile(dut, test_type, io_profile, extra_config=None, io_runtime=-1, io_pattern=17)
Executes each of the IO Profiles listed in Table 4
  1. Sequential Read (MiB/s) (128kiB, QD = 128)

  2. Sequential Write (MiB/s) (128kiB, QD = 128)

  3. Random Read (KIOPS) (4kiB, QD = 128)

  4. Random Writes (KIOPS) (4kiB, QD = 128)

  5. Random 70R:30W mix (KIOPS) (4kiB, QD = 128)

Parameters:
  • dut (XML_API) – Device object under test

  • test_type (str) – Either ‘Sequential’ | ‘Random’

  • io_profile (str) – IO Profile to be executed

  • io_runtime (int) – Time in seconds for IO to execute

  • io_pattern (int) – Pattern for io to be executed

Return type:

dict

verify_ios(io_tests)

Checks if I/O tests passed or failed

Parameters:

io_tests (list) – list of I/O test dicts

Returns:

io_failed – Returns failed if any I/O test failed

Return type:

bool

verify_reverify(dut, io_test)

Checks if reverify I/O test passed or failed

Parameters:

io_test (dict) – reverify I/O test dict

Return type:

None

OCP_DCSSD_2_0_ReliabilityPowerTTR_PERST.py

This script will run the following tests:
  1. Assert and de-assert PERST on the drive

  2. Verify CSTS.RDY transitions to 0 within one second

  3. Verify Identify command is successful

  4. Perform sequential write and read for five minutes and collect performance logs

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

TTR-20

OCP_DCSSD_2_0_ReliabilityPowerTTR_ShutdownNotification.py

This script will run the following tests:
  1. Do Identify Controller and verify it’s successful

  2. Check RTD3 Entry Latency field value

  3. Execute normal shutdown process and verify CC.SHN and CSTS.SHST values

  4. Execute abrupt shutdown process and verify CC.SHN and CSTS.SHST values

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

TTR-5/6

find_cc_shn_string_in_msgs(dut, search_string, cc_shn_exp, pci, num_lines_msgs)

Copy new lines in /var/log/messages to a new file, then search for a CC.SHN string and act on it Call get_num_lines_var_log_messages() to get num_lines_msgs before calling this function

Parameters:
  • dut (XML_API) – Device object under test

  • search_string (str) – String to search for in /var/log/messages

  • cc_shn_exp (int) – Expected integer value of CC.SHN value (either “1” or “2”)

  • pci (str) – PCI ID of the DUT

  • num_lines_msgs (int) – Number of lines in /var/log/messages from get_num_lines_var_log_messages()

Return type:

None

OCP_DCSSD_2_0_ReliabilityPowerTTR_TimeToIdentify.py

This script will run the following tests:
  1. Disable the controller by setting CC.EN=0

  2. Enable the controller by setting CC.EN=1

  3. Verify that the device responds to identify command and read/write commands within Time defined by DP-CFG-8 and DP-CFG-9, respectively

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

TTR-1/2

OCP_DCSSD_2_0_Reliability_Panic01_CPUHang.py

This script will run the following tests:
  1. Perform sequential write/read for five minutes

  2. Inject Panic Type 1 (CPU/Controller Hang)

  3. Detect injected Panic Type 1 (CPU/Controller Hang)

  4. Execute the workflow to attempt recovery

  5. Verify whether the workflow has resolved the injected panic

  6. Verify that error injection is disabled, and device is no longer in an injected panic state

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

CRASH-1/2/3/4

OCP_DCSSD_2_0_Reliability_Panic02_NANDHang.py

This script will run the following tests:
  1. Perform sequential write/read for five minutes

  2. Inject Panic Type 2 (NAND Hang)

  3. Detect injected Panic Type 2 (NAND Hang)

  4. Execute the workflow to attempt recovery

  5. Determine whether the workflow has resolved the injected panic

  6. Verify that error injection is disabled, and device is no longer in an injected panic state

  7. Perform final I/O test

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

CRASH-1/2/3/4

check_performance_logs(perf_metrics, io_bytes, io_type)

Checks the performance log using the perf_metrics dict to determine if a “Performance Not Met” warning needs to be issued

Parameters:
  • perf_metrics (list) – Performance metrics of Read and Write

  • io_bytes (float) – Either the read or write bytes to be compared to io metric

  • io_type (int) – 0: Read, 1: Write

Return type:

None

collect_performance_logs(dut, seq_read, seq_write)

Collects and prints the performance logs for both a Read and a Write command

Parameters:
  • dut (XML_API) – Device object under test

  • seq_read (dict) – Custom Read IO dict

  • seq_write (dict) – Custom Write IO dict

Returns:

  • read_bytes (int) – Number of bytes read

  • write_bytes (int) – Number of bytes written

execute_IO_Profile(dut, test_type, io_profile, io_runtime=-1, io_pattern=0)
Executes each of the IO Profiles listed in Table 4
  1. Sequential Read (MiB/s) (128kiB, QD = 128)

  2. Sequential Write (MiB/s) (128kiB, QD = 128)

  3. Random Read (KIOPS) (4kiB, QD = 128)

  4. Random Writes (KIOPS) (4kiB, QD = 128)

  5. Random 70R:30W mix (KIOPS) (4kiB, QD = 128)

Parameters:
  • dut (XML_API) – Device object under test

  • test_type (str) – Either ‘Sequential’ | ‘Random’

  • io_profile (str) – IO Profile to be executed

  • io_runtime (int) – Time in seconds for IO to execute

  • io_pattern (int) – Pattern for io to be executed

Return type:

dict

run_read_and_write_IOs(dut, verify_step_num, io_runtime=-1, io_pattern=0)

Executes the Sequential Read and Write for 128kiB, QD = 128 from Table 4, simultaneously

Parameters:
  • dut (XML_API) – Device object under test

  • io_runtime (int) – Time in seconds for IO to execute

  • io_pattern (int) – Pattern for io to be executed

  • verify_step_num (int) – Step number for the Verification of both Read and Write IOs

Return type:

List of dicts

OCP_DCSSD_2_0_Reliability_Panic03_PLPDefect.py

This script will run the following tests:
  1. Perform sequential write/read for five minutes

  2. Inject Panic Type 3 (PLP Defect)

  3. Detect injected Panic Type 3 (PLP Defect)

  4. Read log page data

  5. Execute the workflow to attempt recovery

  6. Determine whether the workflow has resolved the injected panic

  7. Verify that error injection is disabled, and device is no longer in an injected panic state

  8. Perform final I/O performance test

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

CRASH-1/2/3/4

OCP_DCSSD_2_0_Reliability_Panic04_FWError.py

This script will run the following tests:
  1. Perform sequential write/read for five minutes

  2. Inject Panic Type 4 (Logical Firmware Error)

  3. Detect injected Panic Type 4 (Logical Firmware Error)

  4. Execute the workflow to attempt recovery

  5. Determine whether the workflow has resolved the injected panic

  6. Verify that error injection is disabled, and device is no longer in an injected panic state

  7. Perform final I/O performance test

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

CRASH-1/2/3/4

OCP_DCSSD_2_0_Reliability_Panic05_DRAMCritPath.py

This script will run the following tests:
  1. Perform sequential write/read for five minutes

  2. Inject Panic Type 5 (DRAM Corruption Critical Path)

  3. Detect injected Panic Type 5 (DRAM Corruption Critical Path)

  4. Execute the workflow to attempt recovery

  5. Determine whether the workflow has resolved the injected panic

  6. Verify that error injection is disabled, and device is no longer in an injected panic state

  7. Perform final I/O performance test

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

CRASH-1/2/3/4

OCP_DCSSD_2_0_Reliability_Panic06_DRAMNonCritPath.py

This script will run the following tests:
  1. Perform sequential write/read for five minutes

  2. Inject Panic Type 6 (DRAM Corruption Non-Critical Path)

  3. Detect injected Panic Type 6 (DRAM Corruption Non-Critical Path)

  4. Execute the workflow to attempt recovery

  5. Determine whether the workflow has resolved the injected panic

  6. Verify that error injection is disabled, and device is no longer in an injected panic state

  7. Perform final I/O performance test

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

CRASH-1/2/3/4

OCP_DCSSD_2_0_Reliability_Panic07_NANDCorruption.py

This script will run the following tests:
  1. Perform sequential write/read for five minutes

  2. Inject Panic Type 7 (NAND Corruption)

  3. Detect injected Panic Type 7 (NAND Corruption)

  4. Execute the workflow to attempt recovery

  5. Determine whether the workflow has resolved the injected panic

  6. Verify that error injection is disabled, and device is no longer in an injected panic state

  7. Perform final I/O performance test

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

CRASH-1/2/3/4

OCP_DCSSD_2_0_Reliability_Panic08_SRAMCorruption.py

This script will run the following tests:
  1. Perform sequential write/read for five minutes

  2. Inject Panic Type 8 (SRAM Corruption)

  3. Detect injected Panic Type 8 (SRAM Corruption)

  4. Execute the workflow to attempt recovery

  5. Determine whether the workflow has resolved the injected panic

  6. Verify that error injection is disabled, and device is no longer in an injected panic state

  7. Perform final I/O performance test

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

CRASH-1/2/3/4

OCP_DCSSD_2_0_Reliability_Panic09_HWMalfunction.py

This script will run the following tests:
  1. Perform sequential write/read for five minutes

  2. Inject Panic Type 9 (HW Malfunction)

  3. Detect injected Panic Type 9 (HW Malfunction)

  4. Execute the workflow to attempt recovery

  5. Determine whether the workflow has resolved the injected panic

  6. Verify that error injection is disabled, and device is no longer in an injected panic state

  7. Perform final I/O performance test

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

CRASH-1/2/3/4

OCP_DCSSD_2_0_Reliability_Panic10_NoNANDSpares.py

This script will run the following tests:
  1. Perform sequential write/read for five minutes

  2. Inject Panic Type 10 (No More NAND Spares)

  3. Detect injected Panic Type 10 (No More NAND Spares)

  4. Read log page data

  5. Execute the workflow to attempt recovery

  6. Determine whether the workflow has resolved the injected panic

  7. Verify that error injection is disabled, and device is no longer in an injected panic state

  8. Perform final I/O performance test

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

CRASH-1/2/3/4

OCP_DCSSD_2_0_Reset_ContReset.py

This script will run the following tests:
  1. Execute controller reset

  2. Verify AQA, ASQ, ACQ, CMBMSC and PMRMSC registers didn’t change

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

NVMeR-2

OCP_DCSSD_2_0_Reset_NSSR.py

This script will run the following tests:
  1. Execute NSSR

Pass/Fail: Script passes if NSSR is successful

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

NVMeR-1

steps_1_8(dut)

Allows steps 1-8 to easily loop

Parameters:

dut (XML_API) – Device object under test

Returns:

  • nssro (int) – CSTS.NSSRO register bit value

  • cap_to – Controller Timeout, converted to seconds

OCP_DCSSD_2_0_SMBus_256_Bytes.py

This script will run the following tests:
  1. Get MI Basic subsystem management data structure with offset 0 and length 154 bytes

  2. Get MI Basic subsystem management data structure with offset 154 and length 102 bytes

  3. Verify various fields return correct info

Pass/Fail: Script passes if all info is correct

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

SMBUS-1/2/3/5/6

check_basic_mgmt_value(output_cmd, field_name, field_name_descr, exp_value)

Verify a field value is correct

Parameters:
  • output_cmd (dict) – Data structure to check

  • field_name (str) – Name of parameter in data structure to check

  • field_name_descr (str) – Name of parameter to print in the report

  • exp_value (int) – Expected value of parameter

Return type:

None

check_cmdcode_154_167(output_cmd, field_name, field_name_descr, exp_value)

Check field value and return flag value based on success/failure

Parameters:
  • output_cmd (dict) – Data structure to check

  • field_name (str) – Name of parameter in data structure to check

  • field_name_descr (str) – Name of parameter to print in the report

  • exp_value (int) – Expected value of parameter

Return type:

Flag value (1 = passed, 0 = failed)

OCP_DCSSD_2_0_SMBus_CmdCode00.py

This script will run the following tests:
  1. Get MI Basic subsystem management data structure command code 0 and verify it returns correct info

Pass/Fail: Script passes if all info is correct

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

SMBUS-1/2/3

OCP_DCSSD_2_0_SMBus_CmdCode08.py

This script will run the following tests:
  1. Get MI Basic subsystem management data structure command code 8 and verify it returns correct info

Pass/Fail: Script passes if all info is correct

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

SMBUS-1/2/3

OCP_DCSSD_2_0_SMBus_CmdCode154.py

This script will run the following tests:
  1. Get MI Basic subsystem management data structure command code 154 and verify it returns correct info

Pass/Fail: Script passes if all info is correct

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

SMBUS-1/2/3/8

OCP_DCSSD_2_0_SMBus_CmdCode167.py

This script will run the following tests:
  1. Get MI Basic subsystem management data structure command code 167 and verify it returns correct info

Pass/Fail: Script passes if all info is correct

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

SMBUS-1/2/3

OCP_DCSSD_2_0_SMBus_CmdCode242.py

This script will run the following tests:
  1. Get MI Basic subsystem management data structure command code 242 and verify it returns correct info

Pass/Fail: Script passes if all info is correct

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

SMBUS-1/2/3/5

check_basic_mgmt_value(output_cmd, field_name, field_name_descr, exp_value)

Verify a field value is correct

Parameters:
  • output_cmd (dict) – Data structure to check

  • field_name (str) – Name of parameter in data structure to check

  • field_name_descr (str) – Name of parameter to print in the report

  • exp_value (int) – Expected value of parameter

Return type:

None

OCP_DCSSD_2_0_SMBus_CmdCode248.py

This script will run the following tests:
  1. Get MI Basic subsystem management data structure command code 248 and verify it returns correct info

Pass/Fail: Script passes if all info is correct

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

SMBUS-1/2/3

check_basic_mgmt_value(output_cmd, field_name, field_name_descr, exp_value)

Verify a field value is correct

Parameters:
  • output_cmd (dict) – Data structure to check

  • field_name (str) – Name of parameter in data structure to check

  • field_name_descr (str) – Name of parameter to print in the report

  • exp_value (int) – Expected value of parameter

Return type:

None

OCP_DCSSD_2_0_SMBus_CmdCode32.py

This script will run the following tests:
  1. Get MI Basic subsystem management data structure command code 32 and verify it returns correct info

Pass/Fail: Script passes if all info is correct

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

SMBUS-1/2/3

OCP_DCSSD_2_0_SMBus_CmdCode50.py

This script will run the following tests:
  1. Get MI Basic subsystem management data structure command code 50 and verify it returns correct info

Pass/Fail: Script passes if all info is correct

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

SMBUS-1/2/3

OCP_DCSSD_2_0_SMBus_CmdCode90.py

This script will run the following tests:
  1. Get MI Basic subsystem management data structure command code 90 and verify it returns correct info

Pass/Fail: Script passes if all info is correct

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

SMBUS-1/2/3/4

OCP_DCSSD_2_0_SMBus_CmdCode96.py

This script will run the following tests:
  1. Get MI Basic subsystem management data structure command code 96 and verify it returns correct info

Pass/Fail: Script passes if all info is correct

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

SMBUS-1/2/3

OCP_DCSSD_2_0_SMBus_DataTTR.py

This script will run the following tests:
  1. Get timestamp

  2. Do a power cycle

  3. Poll MI Basic subsystem management data structure command code 0 until it’s successful

  4. Get timestamp

  5. Verify MI Basic subsystem management data structure command code 0 info is correct

  6. Verify difference between timestamps is within CAP.TO

  7. Repeat steps 1-6 using controller reset

  8. Repeat steps 1-6 using NSSR

  9. Repeat steps 1-6 using FLR

Pass/Fail: Script passes if all info is correct

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

SMBUS-1/2/3/4/7

basic_mgmt_status_during_reset(dut, mi_dut, step_num, mi_ver, cap_to_secs)

Do Basic Management Status command during a reset and verify it finished within CAP.TO

Parameters:
  • dut (XML_API) – Device object under test

  • mi_dut (XML_API) – Device MI object under test

  • step_num (int) – Step number of the start timestamp step

  • mi_ver (int) – MI version supported by the controller

  • cap_to_secs (int) – CAP.TO value in seconds

Return type:

None

verify_basic_mgmt_status_output(dut, mi_dut, mi_output_cmd, mi_ver, power_cycle_flag)

Do GetFeatures with SEL value and verify returned info is correct

Parameters:
  • dut (XML_API) – Device object under test

  • mi_dut (XML_API) – Device MI object under test

  • mi_output_cmd (dict) – Output of MI command

  • mi_ver (int) – MI version supported by the controller

  • power_cycle_flag (int) – 1 = power cycle was executed, 0 = other reset was executed

Return type:

None

OCP_DCSSD_2_0_SMBus_FWUpdate.py

This script will run the following tests:
  1. Verify disabling Firmware Update using Basic Management SMBus Block Write command and verifying using SMBus Read Byte command.

  2. Verify enabling Firmware Update using the SMBus Write Byte protocol

Pass/Fail: Script passes if all info is correct

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

SMBUS-1/3/4/5/6/7

OCP_DCSSD_2_0_SMBus_InvalidTransaction.py

This script will run the following tests:
  1. Send the NVMe Basic Management Block Read command with any invalid SMBus slave address

  2. Verify that NVMe Basic Management command does not complete successfully

Pass/Fail: Script passes if all info is correct

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

SMBUS-1/2/3/4/7

OCP_DCSSD_2_0_SMBus_SecureBoot.py

This script will run the following tests:
  1. Get MI Basic subsystem management data structure command code 242 and verify it returns correct info

  2. Inject secure boot failure

  3. Power cycle the drive

  4. Issue Identify command and verify it passes

  5. Get MI Basic subsystem management data structure command code 242 and verify it returns correct info

  6. Get MI Basic subsystem management data structure command code 0 and verify it returns correct info

  7. Power cycle the drive

  8. Issue Identify command and verify it passes

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

SMBUS-1/3/5/6

OCP_DCSSD_2_0_Sanitize_BlockErase.py

This script will run the following tests:
  1. Verify that the device properly indicates support for the Sanitize Block Erase operation in Identify Controller data.

  2. Verify that the Sanitize Status Log Page correctly reports the Sanitize Operation status.

  3. Verify that the Sanitize command completes successfully.

  4. Verify that the Sanitize Operation Block Erase completes successfully.

  5. Verify that if AERs are submitted and AENs enabled by the host, the device sends a correctly formatted AEN to the host on successful completion of the sanitize operation.

  6. Verify when the Sanitize Operation is completed successfully the previously written namespace data cannot be read back.

  7. Verify that reads to sanitized LBAs complete successfully and return data that is all 0s or 1s (FFFFFFFFh) regardless of whether the LBA were previously written, unwritten, or deallocate

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

NVMe-AD-7/8/9, SEC-4, STD-LOG-9/10

exit_sanitize_failure(dut, ndi)

Performs the necessary steps to exit sanitize failure mode

Parameters:
  • dut (XML_API) – Device object under test

  • ndi (int) – NDI bit from SANICAP

Return type:

None

postcondition(dut, ndi, wait=7200)

Performs the necessary postcondition steps to restore DUT back to original state

Parameters:
  • dut (XML_API) – Device object under test

  • ndi (int) – NDI bit from SANICAP

  • wait (int) – Estimated time to wait for Sanitize Operation if Get Log Page with LID=81h fails

Return type:

None

verify_data_buffer(dut, params, config)

Start an IO test, wait for it to finish, check test status

Parameters:
  • dut (XML_API) – Device object under test

  • params (dict) – Parameters for IO test

  • config (dict) – Configuration for IO test

Return type:

None

OCP_DCSSD_2_0_Sanitize_CmdsReceivedDuringSanitize.py

This script will run the following tests:
  1. Verify that once the Sanitize Operation begins, the device shall abort any active or subsequently received commands that are not allowed during Sanitize Operations with status ‘Sanitize in Progress’.

  2. Verify that once the Sanitize Operation begins, the device successfully completes any active or subsequently received commands that are allowed during Sanitize Operations.

  3. Verify that while in the Sanitize Failed state, the DUT aborts all commands submitted that are prohibited during a Sanitize Operation with status ‘Sanitize Failed’.

  4. Verify that all Admin/NVM commands not allowed during a sanitize operation also are aborted while the DUT is in a sanitize failed state.

  5. Verify that once the DUT exits the Sanitize Failed state it shall successfully complete all supported commands received including those that are prohibited during Sanitize Operations.

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

NVMe v1.4b 5.14.1.16.2/5.21.1.23/5.24/8.15

check_cmd_status(cmd_result, exp_err_code, fail_type='error')

Extract SC field from command results and verify if the value is correct or not

Parameters:
  • cmd_result (dict) – Command output

  • exp_err_code (str) – Expected error code in the form (Xh)

  • fail_type (str) – Status to have the step end with (default is “error”)

Returns:

sc_flag – 1 = Expected error code found, 0 = Expected error code not found

Return type:

int

do_format(dut, nsid, lbaf, ses, format_results)

Execute format command and put the results into a dictionary (since the format is done as part of a thread, a dictionary will allow the main part of the program to access the results)

Parameters:
  • dut (XML_API) – Device object under test

  • nsid (int) – Namespace under test

  • lbaf (int) – LBAF to use in the format

  • ses (int) – SES to use in the format

  • format_results (dict) – Dictionary to hold the results of the format command

Return type:

None

exit_sanitize_failure(dut, ndi)

Performs the necessary steps to exit sanitize failure mode

Parameters:
  • dut (XML_API) – Device object under test

  • ndi (int) – NDI bit from SANICAP

Return type:

None

postcondition(dut, ndi, wait=7200)

Performs the necessary postcondition steps to restore DUT back to original state

Parameters:
  • dut (XML_API) – Device object under test

  • ndi (int) – NDI bit from SANICAP

  • wait (int) – Estimated time to wait for Sanitize Operation if Get Log Page with LID=81h fails

Return type:

None

restart_sanitize(dut, sanact)

Restart sanitize operation if it has completed

Parameters:
  • dut (XML_API) – Device object under test

  • sanact (bin) – Sanitize action to use when starting sanitize operation

Return type:

None

verify_io_status(test_id, sc)

Checks an IO test for a particular status code being returned

Parameters:
  • test_id (string) – IO Test identifier

  • sc (string) – Status code to check for, should be in hex format

Returns:

True or False

Return type:

bool

OCP_DCSSD_2_0_Sanitize_CryptoErase.py

This script will run the following tests:
  1. Verify that the device properly indicates support for the Sanitize Crypto Erase operation in Identify Controller data

  2. Verify that the Sanitize Status Log Page correctly reports the Sanitize Operation status.

  3. Verify that the Sanitize command completes successfully.

  4. Verify that the Sanitize Operation Crypto Erase completes successfully.

  5. Verify that if AERs are submitted and AENs enabled by the host, the device sends a correctly formatted AEN to the host on successful completion of the sanitize operation.

  6. Verify when the Sanitize Operation Crypto Erase is completed successfully the previously written namespace data cannot be read back.

  7. Verify that reads of sanitized LBAs complete successfully and return data that is randomized garbage regardless of whether the LBA were previously written, unwritten, or deallocated

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

NVMe-AD-7/8/9, SEC-4, STD-LOG-9/10

check_pattern(dut, params, config, signal)

Executes an IO test using the passed parameters, verify pattern is random or garbage

Parameters:
  • dut (XML_API) – Device object under test

  • params (dict)

  • config (dict)

  • signal (int)

Return type:

None

exit_sanitize_failure(dut, ndi)

Performs the necessary steps to exit sanitize failure mode

Parameters:
  • dut (XML_API) – Device object under test

  • ndi (int) – NDI bit from SANICAP

Return type:

None

get_pattern(dut, start_LBA)

Issue a read to an LBA to check for random/garbage data pattern

Parameters:
  • dut (XML_API) – Device object under test

  • start_LBA (int) – LBA to read from

Returns:

  • params (dict) – IO parameters with data pattern

  • signal (int) – Conditional flag to signify data pattern

postcondition(dut, ndi, wait=7200)

Performs the necessary postcondition steps to restore DUT back to original state

Parameters:
  • dut (XML_API) – Device object under test

  • ndi (int) – NDI bit from SANICAP

  • wait (int) – Estimated time to wait for Sanitize Operation if Get Log Page with LID=81h fails

Return type:

None

verify_data_buffer(dut, params, config)

Start an IO test, wait for it to finish, check test status

Parameters:
  • dut (XML_API) – Device object under test

  • params (dict) – Parameters for IO test

  • config (dict) – Configuration for IO test

Return type:

None

OCP_DCSSD_2_0_Sanitize_FailedOperations.py

This script will run the following tests:
  1. Verify support for sanitize block erase command

  2. Verify initial sanitize state

  3. Delete and recreate smaller fixed size namespace

  4. Precondition namespace for sanitize

  5. If namespace write protection is supported, verify sanitize command fails if sent while namespace is write-protected

  6. Verify sanitize command fails while firmware update is pending

  7. Restore device to its starting condition

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

NVMe v1.4b 5.14.1.16.2/5.21.1.23/5.24/8.15

clear_bit(value, bit)

Clears a bit to 0

Parameters:
  • value (int) – value to be modified

  • bit (int) – index to be modified

Return type:

int

exit_sanitize_failure(dut, ndi)

Performs the necessary steps to exit sanitize failure mode

Parameters:
  • dut (XML_API) – Device object under test

  • ndi (int) – NDI bit from SANICAP

Return type:

None

postcondition(dut, ndi, wait=7200)

Performs the necessary postcondition steps to restore DUT back to original state

Parameters:
  • dut (XML_API) – Device object under test

  • ndi (int) – NDI bit from SANICAP

  • wait (int) – Estimated time to wait for Sanitize Operation if Get Log Page with LID=81h fails

Return type:

None

set_bit(value, bit)

Sets a bit to 1

Parameters:
  • value (int) – value to be modified

  • bit (int) – index to be modified

Return type:

int

verify_data_buffer(dut, params, config)

Start an IO test, wait for it to finish, check test status

Parameters:
  • dut (XML_API) – Device object under test

  • params (dict) – Parameters for IO test

  • config (dict) – Configuration for IO test

Return type:

None

OCP_DCSSD_2_0_Sanitize_OverwriteErase.py

This script will run the following tests:
  1. Verify that, if supported, the device properly indicates support for the Sanitize Overwrite operation in Identify Controller data and as per Adaptation data.

  2. Verify that the Sanitize Status Log Page correctly reports the Sanitize Operation status

  3. Verify that the Sanitize command completes successfully.

  4. Verify that the Sanitize Operation Overwrite completes successfully.

  5. Verify that if AERs are submitted and AENs enabled by the host, the device sends a correctly formatted AEN to the host on successful completion of the sanitize operation

  6. Verify when the Sanitize Operation Overwrite is completed successfully the previously written namespace data cannot be read back

  7. Verify that reads of sanitized LBAs return data that matches the overwrite pattern used regardless of whether the LBA were previously written, unwritten, or deallocated.

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

NVMe-AD-7/8/9, SEC-4, STD-LOG-9/10

exit_sanitize_failure(dut, ndi)

Performs the necessary steps to exit sanitize failure mode

Parameters:
  • dut (XML_API) – Device object under test

  • ndi (int) – NDI bit from SANICAP

Return type:

None

postcondition(dut, ndi, wait=7200)

Performs the necessary postcondition steps to restore DUT back to original state

Parameters:
  • dut (XML_API) – Device object under test

  • ndi (int) – NDI bit from SANICAP

  • wait (int) – Estimated time to wait for Sanitize Operation if Get Log Page with LID=81h fails

Return type:

None

verify_data_buffer(dut, params, config)

Start an IO test, wait for it to finish, check test status

Parameters:
  • dut (XML_API) – Device object under test

  • params (dict) – Parameters for IO test

  • config (dict) – Configuration for IO test

Return type:

None

OCP_DCSSD_2_0_Sector_Size.py

This script will run the following tests:
  1. Verify device supports LBA data sizes set to 9 and 12

  2. Format device with a LBAF that uses LBA data size that’s different from LBADS currently used by the namespace

  3. Verify Identify Namespace reflects the LBAF that was used

  4. Repeat steps 2-3 using a LBAF with the original LBADS

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

SECTOR-4 MS-CONF-1 MS-CONF-2 NSM-2 NSM-3

OCP_DCSSD_2_0_SecureBoot_RollbackPrevention.py

This script will run the following tests:
  1. Verify baseline firmware configuration matches assumptions

  2. Verify loading new firmware image FWRV2 signed by PK1 and at security version SV1

  3. Verify loading firmware signed by PK1 with the security version increased to V2

  4. Verify now cannot load firmware with the security version set to V1

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

SEC-1/3/5

OCP_DCSSD_2_0_SecureBoot_SecuredDrive.py

This script will run the following tests:
  1. Verify firmware update on secured drive passes and DUT firmware changes with a signed firmware image on an unsecure drive.

  2. Verify firmware update on secured drive fails and DUT firmware remains unchanged with an unsigned firmware image on an unsecured drive.

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

SEC-1/3/5/9

check_c2_fw_rev(log_page, expected_value, skip_flag)

Check latest FAHE of log page C2h for expected firmware revision.

Parameters:
  • log_page (Dict) – C2h Log Page

  • expected_value (String) – Firmware Revision expected to be found in latest FAHE

  • skip_flag (int) – Flag value

Returns:

  • Firmware Activation Count (int)

  • skip_flag (int)

OCP_DCSSD_2_0_SecureBoot_UnsecuredDrive.py

This script will run the following tests:
  1. Verify firmware update fails and DUT firmware remains unchanged with a signed firmware image on an unsecure drive.

  2. Verify firmware update passes and DUT firmware changes with an unsigned firmware image on an unsecured drive.

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

SEC-1/5

check_c2_fw_rev(log_page, expected_value, skip_flag)

Check latest FAHE of log page C2h for expected firmware revision.

Parameters:
  • log_page (Dict) – C2h Log Page

  • expected_value (String) – Firmware Revision expected to be found in latest FAHE

  • skip_flag (int) – Flag value

Returns:

  • Firmware Activation Count (int)

  • skip_flag (int)

OCP_DCSSD_2_0_UUID_UUID.py

This script will run the following tests:
  1. Issue an Identify command with CNS=01h

  2. Issue an Identify command with CNS=17h

  3. Issue a Get-Feature command for FIDs C2, C4, C6 and C7 with UUID field = C194D55BE0944794A21D29998F56BE6Fh

  4. Issue a Set-Feature command for FIDs C1 to C7 with UUID field = C194D55BE0944794A21D29998F56BE6Fh

  5. Issue a Get-Feature command for FIDs C2, C4, C6 and C7 with UUID field = 0

  6. Issue a Set-Feature command for FIDs C1 to C7 with UUID field = 0

  7. Issue a Get-Feature command for FIDs C2, C4, C6 and C7 with UUID field to a value other than 0 or C194D55BE0944794A21D29998F56BE6Fh

  8. Issue a Set-Feature command for FIDs C1 to C7 with UUID field to a value other than 0 or C194D55BE0944794A21D29998F56BE6Fh

  9. Issue a Get Log Page command for LIDs C0 to C5 with UUID field = C194D55BE0944794A21D29998F56BE6Fh

  10. Issue a Get Log Page command for LIDs C0 to C5 with UUID field = 0

  11. Issue a Get Log Page command for LIDs C0 to C5 with UUID field = to a value other than 0 or C194D55BE0944794A21D29998F56BE6Fh

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

UUID-1/2/3/4/5

get_latency_monitor_values(dut, get_log_c3_input=None)

Receives the values stored in a Latency Monitoring Log (C3h), returning each field

Parameters:
  • dut (XML_API) – Device object under test

  • get_log_c3_input (dict) – Latency Monitor Log Page dictionary

Returns:

data – Value of all lmdata fields

Return type:

int

issue_get_features(dut, uuid_index, check_sc=False)

Issues a series of get-feature commands and verifies if they are successful

Parameters:
  • dut (XML_API) – Device object under test

  • uuid_index (int) – Index to be used for UUID

  • check_sc (bool) – bool flag to check for expected failure status

Returns:

has_failure

Return type:

bool, current_states: dict

issue_log_pages(dut, uuid_index, check_sc=False)

Issues a series of GetLog Page commands and verifies if they are successful

Parameters:
  • dut (XML_API) – Device object under test

  • uuid_index (int) – Index to be used for UUID

  • check_sc (bool) – bool flag to check for expected failure status

Return type:

None

issue_set_features(dut, uuid_index, get_feat_values, check_sc=False, data_buffer='')

Issues a series of set-feature commands and verifies if they are successful

Parameters:
  • dut (XML_API) – Device object under test

  • uuid_index (int) – Index to be used for UUID

  • get_feat_values (list) – List of values from get features for FIDs 0xC2, 0xC4, 0xC6, 0xC7

  • check_sc (bool) – bool flag to check for expected failure status

  • data_buffer (hex) – Data buffer

Return type:

None

OCP_DCSSD_2_0_Unsupported_Command.py

This script will run the following tests:
  1. Verify reserved Admin and NVM opcodes in the table return an “invalid command opcode” error

  2. Verify unsupported optional Admin and NVM opcodes in the table return an “invalid command opcode” error

  3. Verify unsupported vendor unique Admin opcodes in the table return an “invalid command opcode” error

  4. Verify every supported vendor unique Admin opcode that requires challenge-response action to unlock returns an error

  5. Verify unsupported vendor unique NVM in the table return an “invalid command opcode” error

  6. Verify every supported vendor unique NVM that requires challenge-response action to unlock returns an error

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

SEC-19

check_opcode_optional(dut, opcode_list, admin_nvm_flag, num_cmds_supp, cmds_supp, cmds_supp_len)

Verify unsupported optional opcode returns INVALID_OPCODE error

Parameters:
  • dut (XML_API) – Device object under test

  • opcode_list (list) – List of opcodes (in integer format) to loop through

  • admin_nvm_flag (int) – 0 = Execute Admin command, 1 = Execute NVM command

  • num_cmds_supp (int) – Value of NUM_OPT_ADM_CMDS_SUPPORTED or NUM_OPT_NVM_CMDS_SUPPORTED

  • cmds_supp (list) – List of OPT_ADM_CMD_OPCODES or OPT_NVM_CMD_OPCODES

  • cmds_supp_len (int) – Length of OPT_ADM_CMD_OPCODES or OPT_NVM_CMD_OPCODES

Return type:

None

check_opcode_reserved(dut, nvme_ver, opcode_list, admin_nvm_flag)

Verify reserved opcode returns INVALID_OPCODE error

Parameters:
  • dut (XML_API) – Device object under test

  • nvme_ver (int) – NVMe version supported by the controller

  • opcode_list (list) – List of opcodes (in integer format) to loop through

  • admin_nvm_flag (int) – 0 = Execute Admin command, 1 = Execute NVM command

Return type:

None

check_opcode_vendor_unique(dut, opcode_list, admin_nvm_flag, num_cmds_supp, cmds_supp, cmds_supp_len, num_req_cra_cmds_supp, req_cra_cmds_supp, req_cra_cmds_supp_len)

Verify unsupported vendor unique opcode returns INVALID_OPCODE error

Parameters:
  • dut (XML_API) – Device object under test

  • opcode_list (list) – List of opcodes (in integer format) to loop through

  • admin_nvm_flag (int) – 0 = Execute Admin command, 1 = Execute NVM command

  • num_cmds_supp (int) – Value of NUM_OPT_ADM_CMDS_SUPPORTED or NUM_OPT_NVM_CMDS_SUPPORTED

  • cmds_supp (list) – List of OPT_ADM_CMD_OPCODES or OPT_NVM_CMD_OPCODES

  • cmds_supp_len (int) – Length of OPT_ADM_CMD_OPCODES or OPT_NVM_CMD_OPCODES

  • num_req_cra_cmds_supp (int) – Value of NUM_VU_ADMIN_CMDS_SUP_REQ_CRA or NUM_VU_NVM_CMDS_SUP_REQ_CRA

  • req_cra_cmds_supp (list) – List of VU_ADMIN_CMD_OPC_VALS_REQ_CRA or VU_NVM_CMD_OPC_VALS_REQ_CRA

  • req_cra_cmds_supp_len (int) – Length of VU_ADMIN_CMD_OPC_VALS_REQ_CRA or VU_NVM_CMD_OPC_VALS_REQ_CRA

Return type:

None

check_opcode_vendor_unique_locked(dut, num_req_cra_cmds_supp, req_cra_cmds_supp, admin_nvm_flag)

Verify unsupported vendor unique LID returns an error

Parameters:
  • dut (XML_API) – Device object under test

  • num_req_cra_cmds_supp (int) – Value of NUM_VU_ADMIN_CMDS_SUP_REQ_CRA or NUM_VU_NVM_CMDS_SUP_REQ_CRA

  • req_cra_cmds_supp (list) – List of VU_ADMIN_CMD_OPC_VALS_REQ_CRA or VU_NVM_CMD_OPC_VALS_REQ_CRA

  • admin_nvm_flag (int) – 0 = Execute Admin command, 1 = Execute NVM command

Return type:

None

print_cmds_supp_hex(param_name, cmds_supp_hex, cmds_supp_len_hex)

Print a hexadecimal list of controller-supported opcodes

Parameters:
  • param_name (str) – Parameter name (e.g. OPT_ADM_CMD_OPCODES or OPT_NVM_CMD_OPCODES or VU_ADM_CMD_OPCODES or VU_NVM_CMD_OPCODES or VU_ADMIN_CMD_OPC_VALS_REQ_CRA or VU_NVM_CMD_OPC_VALS_REQ_CRA)

  • cmds_supp_hex (list) – List of OPT_ADM_CMD_OPCODES or OPT_NVM_CMD_OPCODES or VU_ADM_CMD_OPCODES or VU_NVM_CMD_OPCODES or VU_ADMIN_CMD_OPC_VALS_REQ_CRA or VU_NVM_CMD_OPC_VALS_REQ_CRA

  • cmds_supp_len_hex (int) – Length of OPT_ADM_CMD_OPCODES or OPT_NVM_CMD_OPCODES or VU_ADM_CMD_OPCODES or VU_NVM_CMD_OPCODES or VU_ADMIN_CMD_OPC_VALS_REQ_CRA or VU_NVM_CMD_OPC_VALS_REQ_CRA

Return type:

None

OCP_DCSSD_2_0_Unsupported_Feature.py

This script will run the following tests:
  1. Do GetFeatures and SetFeatures for every reserved FID in the table and verify “invalid field” error is returned

  2. Do GetFeatures and SetFeatures for every unsupported optional FID in the table and verify “invalid field” error is returned

  3. Do GetFeatures and SetFeatures for every unsupported vendor unique FID in the table and verify “invalid field” error is returned

  4. Do GetFeatures and SetFeatures for every supported vendor unique FID that requires challenge-response action to unlock and verify an error is returned

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

SEC-19

check_fid_optional(dut, fid_list, num_fids_supp, fids_supp, fids_supp_len)

Verify unsupported optional FID returns INVALID_FIELD error

Parameters:
  • dut (XML_API) – Device object under test

  • fid_list (list) – List of FIDs (in integer format) to loop through

  • num_fids_supp (int) – Value of NUM_OPT_FIDS_SUPPORTED

  • fids_supp (list) – List of OPT_FIDS_SUPPORTED

  • fids_supp_len (int) – Length of OPT_FIDS_SUPPORTED

Return type:

None

check_fid_reserved(dut, nvme_ver, fid_list)

Verify reserved FID returns INVALID_FIELD error

Parameters:
  • dut (XML_API) – Device object under test

  • nvme_ver (int) – NVMe version supported by the controller

  • fid_list (list) – List of FIDs (in integer format) to loop through

Return type:

None

check_fid_vendor_unique(dut, fid_list, num_fids_supp, fids_supp, fids_supp_len, num_req_cra_fids_supp, req_cra_fids_supp, req_cra_fids_supp_len)

Verify unsupported vendor unique FID returns INVALID_FIELD error

Parameters:
  • dut (XML_API) – Device object under test

  • fid_list (list) – List of FIDs (in integer format) to loop through

  • num_fids_supp (int) – Value of NUM_VU_FIDS_SUPPORTED

  • fids_supp (list) – List of VU_FIDS_SUPPORTED

  • fids_supp_len (int) – Length of VU_FIDS_SUPPORTED

  • num_req_cra_fids_supp (int) – Value of NUM_VU_FIDS_SUP_REQ_CRA

  • req_cra_fids_supp (list) – List of VU_FID_VALS_REQ_CRA

  • req_cra_fids_supp_len (int) – Length of VU_FID_VALS_REQ_CRA

Return type:

None

check_fid_vendor_unique_locked(dut, num_req_cra_fids_supp, req_cra_fids_supp)

Verify unsupported vendor unique FID returns an error

Parameters:
  • dut (XML_API) – Device object under test

  • num_req_cra_fids_supp (int) – Value of NUM_VU_FIDS_SUP_REQ_CRA

  • req_cra_fids_supp (list) – List of VU_FID_VALS_REQ_CRA

Return type:

None

print_fids_supp_hex(param_name, fids_supp_hex, fids_supp_len_hex)

Print a hexadecimal list of controller-supported FIDs

Parameters:
  • param_name (str) – Parameter name (e.g. OPT_FIDS_SUPPORTED or VU_FIDS_SUPPORTED or VU_FID_VALS_REQ_CRA)

  • fids_supp_hex (list) – List of OPT_FIDS_SUPPORTED or VU_FIDS_SUPPORTED or VU_FID_VALS_REQ_CRA

  • fids_supp_len_hex (int) – Length of OPT_FIDS_SUPPORTED or VU_FIDS_SUPPORTED or VU_FID_VALS_REQ_CRA

Return type:

None

OCP_DCSSD_2_0_Unsupported_LogPage.py

This script will run the following tests:
  1. Do GetLogPage for every reserved LID in the table and verify “invalid log page” error is returned

  2. Do GetLogPage for every unsupported optional LID in the table and verify “invalid log page” error is returned

  3. Do GetLogPage for every unsupported vendor unique LID in the table and verify “invalid log page” error is returned

  4. Do GetLogPage for every supported vendor unique LID that requires challenge-response action to unlock and verify an error is returned

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:

SEC-19

check_lid_optional(dut, lid_list, num_lids_supp, lids_supp, lids_supp_len)

Verify unsupported optional LID returns INVALID_LOG_PAGE error

Parameters:
  • dut (XML_API) – Device object under test

  • lid_list (list) – List of LIDs (in integer format) to loop through

  • num_lids_supp (int) – Value of NUM_OPT_LIDS_SUPPORTED

  • lids_supp (list) – List of OPT_LIDS_SUPPORTED

  • lids_supp_len (int) – Length of OPT_LIDS_SUPPORTED

Return type:

None

check_lid_reserved(dut, nvme_ver, lid_list)

Verify reserved LID returns INVALID_LOG_PAGE error

Parameters:
  • dut (XML_API) – Device object under test

  • nvme_ver (int) – NVMe version supported by the controller

  • lid_list (list) – List of LIDs (in integer format) to loop through

Return type:

None

check_lid_vendor_unique(dut, lid_list, num_lids_supp, lids_supp, lids_supp_len, num_req_cra_lids_supp, req_cra_lids_supp, req_cra_lids_supp_len)

Verify unsupported vendor unique LID returns INVALID_LOG_PAGE error

Parameters:
  • dut (XML_API) – Device object under test

  • lid_list (list) – List of LIDs (in integer format) to loop through

  • num_lids_supp (int) – Value of NUM_VU_LIDS_SUPPORTED

  • lids_supp (list) – List of VU_LIDS_SUPPORTED

  • lids_supp_len (int) – Length of VU_LIDS_SUPPORTED

  • num_req_cra_lids_supp (int) – Value of NUM_VU_LIDS_SUP_REQ_CRA

  • req_cra_lids_supp (list) – List of VU_LID_VALS_REQ_CRA

  • req_cra_lids_supp_len (int) – Length of VU_LID_VALS_REQ_CRA

Return type:

None

check_lid_vendor_unique_locked(dut, num_req_cra_lids_supp, req_cra_lids_supp)

Verify unsupported vendor unique LID returns an error

Parameters:
  • dut (XML_API) – Device object under test

  • num_req_cra_lids_supp (int) – Value of NUM_VU_LIDS_SUP_REQ_CRA

  • req_cra_lids_supp (list) – List of VU_LID_VALS_REQ_CRA

Return type:

None

print_lids_supp_hex(param_name, lids_supp_hex, lids_supp_len_hex)

Print a hexadecimal list of controller-supported LIDs

Parameters:
  • param_name (str) – Parameter name (e.g. OPT_LIDS_SUPPORTED or VU_LIDS_SUPPORTED or VU_LID_VALS_REQ_CRA)

  • lids_supp_hex (list) – List of OPT_LIDS_SUPPORTED or VU_LIDS_SUPPORTED or VU_LID_VALS_REQ_CRAD

  • lids_supp_len_hex (int) – Length of OPT_LIDS_SUPPORTED or VU_LIDS_SUPPORTED or VU_LID_VALS_REQ_CRAD

Return type:

None