OCP_2_5_Group_2

DSSD_25_Admin_Command_Execution_Time_Verification_Test_Case.py

Admin Command Execution Time Verification Test Case:

For Standard Duration Admin Commands, the CTO test objectives are to verify that each validly formatted admin command completed successfully within 10 seconds under the following scenarios:

  1. Admin commands issued sequentially,

  2. Admin commands issued in the presence of a stressing background I/O workload.

DSSD_25_Arbitration_Test_Case.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. Verify that the arbitration can be changed 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.5 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

DSSD_25_Basic_Command_And_Data_Verification_Test_Case.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/18/23, SLOG-1/3/4/5/11

DSSD_25_Basic_Data_Persistence_Test_Case.py

Basic Data Persistence Test Case

The purpose of this test case is to verify the following:

  1. That the SMART/Health Information Extended Log (C0h) log page is returned, and the command completes with status success,

  2. That all static attribute values in the C0h Log page persist across power cycles, resets, Sanitize, FormatNVM and TCG GenKey/RevertSP, and Revert operations, (Need to add error modes with EI),

  3. That the limited subset of the dynamically updated attribute values that are highly unlikely to change in the absence of specific HW events persist across power cycles, resets, Sanitize, Format NVM and TCG GenKey/RevertSP, and Revert operations, (Need to add error modes with EI),

  4. That the thermal throttling status is 0 reflecting not throttled.

  5. That the capacitor health is greater than 1, and less than 0xFFFF.

  6. That the value in all the reserved fields is 0.

  7. That the NVMe Command Set Errata Version and Lowest Permitted Firmware Revision match the values in Adaptation data.

steps_1_to_11(dut)

Perform repeated steps for Test Steps 1-11

DSSD_25_Basic_Namespace_Data_Verification_Test_Case.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.5 requirements referenced by this script:

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

DSSD_25_Basic_Verification_Of_Asynchronous_Event_Requests_Test_Case.py

The objectives for the Basic Verification of Asynchronous Event Requests Test Case are as follows:

a.) Verify that the value of bit-3 in the LPA field is set to 1b, indicating the support for sending

Telemetry Log Notices.

b.) Verify that the value of bit-8 in the OAES field shall be set to 1b, indicating the support for

Namespace Attribute Notices event and the associated Changed Namespace List log page.

c.) Verify that the value of bit-9 in the OAES field shall be set to 1b, indicating the support for the

Firmware Activation Notices event.

d.) Verify that when attempting to an NVMe Asynchronous Event Request command when there are

already AERL+1 Asynchronous Event Request commands pending, the latest Asynchronous Event Request command shall fail because the number of outstanding Asynchronous Event Request commands has been exceeded.

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

NVMe-OPT-8/9/10/11, NVMe-AD-24/25

DSSD_25_Boot_Requirements_Test_Case.py

This script will run the following tests:
  1. Verify that the Expansion ROM Base Address contains a value of 0 indicating that an Option ROM is not included

Pass/Fail: Script passes if all tests pass

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

BOOT-2

DSSD_25_Clear_FW_Update_History_Test_Case.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.5 requirements referenced by this script:

CFUH-1 to CFUH-15, GETF-2

DSSD_25_Clear_PCIe_Correctable_Error_Counters_Test_Case.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.5 requirements referenced by this script:

CPCIE-1-15, GETF-2

DSSD_25_Commands_Received_During_Device_Self_Test_Operation_Test_Case.py

This script will run the following tests:
  1. While the Device Self-test command is in progress, the device properly terminates the new extended device self-test command with a status code of “Device Self-test in Progress.

  2. If a new device self-test command with STC = Fh be sent while the Extend Device Self-Test command is in progress, the device properly terminates the ongoing device self-test operation.

  3. If a new device self-test command with STC = Fh be sent while the Short Device Self-Test command is in progress, the device properly terminates the ongoing device self-test operation.

  4. That the device self-test command with STC = Fh completes successfully.

  5. While the Short Device Self-test Operation is in progress, the device properly terminates the ongoing device self-test command once a Controller Level reset is triggered.

  6. While the Short Device Self-test Operation is in progress, the device properly terminates the ongoing device self-test command once a Format NVM command is received.

  7. While the Short Device Self-test Operation is in progress, the device properly terminates the ongoing device self-test command once a Sanitize Command is received.

  8. While the Extend Device Self-test Operation is in progress, the device properly terminates the ongoing device self-test command once a Format NVM command is received.

  9. While the Extend Device Self-test Operation is in progress, the device properly terminates the ongoing device self-test command once a Sanitize Command is received.

Pass/Fail: Script passes if all tests pass

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

NVMe v2.0d Section 5.9/5.16.1.7/8.6

exit_sanitize_failure(dut)

Performs the necessary steps to exit sanitize failure mode

Parameters:

dut (XML_API) – Device object under test

Return type:

None

find_postcondition_wait(dut)

Finds the estimated time to wait for a Sanitize operation to complete

Parameters:

dut (XML_API) – Device object under test

Returns:

wait – Time to wait for Sanitize to complete

Return type:

int

postcondition(dut, wait=7200)

Performs the necessary postcondition steps to restore DUT back to original state

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

  • wait (int) – Estimated time to wait for Sanitize Operation if Get Log Page with LID=81h fails

Return type:

None

DSSD_25_Commands_Supported_And_Effects_Log_Page_Test_Case.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.5 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

DSSD_25_Compare_Test_Case.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.5 requirements referenced by this script:

NVMe-IO-1/3/4/5/6/7/8/9/10/11/12/13/14, GETF-2

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, any_fail=False)

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

  • any_fail (bool) – Whether the type of failure matters, only use for checking failures

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

DSSD_25_Controller_Memory_Buffer_Test_Case.py

This script will run the following tests:
  1. Verify that if the value of CMBMSC.CRE is 0b, both values of CMBLOC and CMBSZ are cleared to 00h.

  2. Verify that if the value of CMBMSC.CRE is NOT 0b, either CMBMSC.CMSE or CMBSTS.CBAI has 0b value

Pass/Fail: Script passes if all model number characters are ASCII

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

NVMe-CFG-11

DSSD_25_Controller_Reset_Test_Case.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.5 requirements referenced by this script:

NVMeR-2

DSSD_25_Controller_Status_Ready_Test_Case.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.5 requirements referenced by this script:

TTR-3/4

DSSD_25_Data_Persistence_Across_Format_NVM_Operations_Test_Case.py

The objective for the Data Persistence Across Format NVM Operations test case is to verify that the data in the SMART / Health Information Log Page (LID 02h) persists across Format NVM operations by performing the following checks:

  1. Verify that all reserved and unsupported fields are cleared to 0 and do not change.

  2. Verify that all statically defined fields remain unchanged.

  3. Verify that all dynamically updated counter attribute values that are highly unlikely to change in the absence of specific HW events persist across the Format NVM Commands are either unchanged or have increased in value. The notable exception to this would be fields such as the Available Spares attribute that should persist through the Format NVM Commands but may decrease in value due to the nature of what is being reported.

Pass/Fail: Script passes if all tests pass

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

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

DSSD_25_Data_Persistence_Across_Sanitize_Operations_Test_Case.py

The objective for the Data Persistence Across Sanitize Operations test case is to verify that the data in the SMART / Health Information Log Page (LID 02h) persists across Sanitize Operations by performing the following checks:

  1. Verify that all reserved and unsupported fields are cleared to 0 and do not change.

  2. Verify that all statically defined fields remain unchanged.

  3. Verify that all dynamically updated counter attribute values that are highly unlikely to change in the absence of specific HW events persist across the sanitize process are either unchanged or have increased in value. The notable exception to this would be fields such as the Available Spares attribute that should persist through Sanitize Commands but may decrease in value due to the nature of what is being reported.

Pass/Fail: Script passes if all tests pass

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

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

postcondition(dut)

Data Persistence Across Sanitize Operations Test Case - Postcondition

DUT should be restored to its starting condition. If the Sanitize command should fail at any point the steps to exit Sanitize Failure Mode must be performed. If the test case itself should fail at some step while the Sanitize Operation is in progress the Sanitize Operation must be allowed to complete prior to exiting the failed test case. In all test case outcomes namespace recreation steps shall be performed before exiting the test case.

DSSD_25_Data_Persistence_Across_TCG_Operations_Test_Case.py

Data Persistence Across TCG Operations Test Case: The objective for the Data Persistence Across TCG Operations test case is to verify that the data in the SMART / Health Information Log Page (LID 02h) persists across the required TCG operations by performing the following checks:

  1. Verify that all reserved and unsupported fields are cleared to 0 and do not change.

  2. Verify that all statically defined fields remain unchanged.

  3. Verify that all dynamically updated counter attribute values that are highly unlikely to change in the absence of specific HW events persist across the TCG purge related operations are either unchanged or have increased in value. The notable exception to this would be fields such as the Available Spares attribute that should persist through the TCG purge related operations but may decrease in value due to the nature of what is being reported.

DSSD_25_Dataset_Management_Command_Verification_Test_Case.py

The objectives of this test case are as follows:
  1. Verify support for the Dataset Management command by checking bit-2 of the ONCS field in the Identify Controller dataset.

  2. Verify the use of the Dataset Management command with Attribute = AD for deallocate.

  3. Verify that data blocks that have been deallocated read back as 0.

  4. Verify that after an unsafe power cycle, data blocks that have been deallocated continue to read back as 0.

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

OCP-NVMe-IO-2, OCP-TRIM-1/2/8

DSSD_25_Destructiveness_For_Device_Self_Test_Operation_Test_Case.py

This script will run the following tests:
  1. Verify that user data pattern created during preconditioning is unchanged after a self-test operation.

Pass/Fail: Script passes if all tests pass

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

SELFTST-11

DSSD_25_Device_Capabilities_Log_Page_Test_Case.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.5 requirements referenced by this script:

DCLP-1 to DCLP-12

DSSD_25_Drive_Behavior_In_Case_Of_PLP_Failure_Test_Case.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.5 requirements referenced by this script:

PLP-9

DSSD_25_Drive_State_After_Firmware_Activation_Without_Reset_Test_Case.py

The objectives of this test case are to verify the following:

  1. That firmware activation without reset does not change the contents of the features listed in the Feature Table

  2. That firmware activation without reset does not change the contents of the log pages listed in the Log Page Table.

  3. That firmware activation without reset does not change the PCIe Link Status.

  4. That firmware activation without reset does not change the IO SQ/CQ queue settings.

  5. That firmware activation without reset does not change the LBA format.

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

FWUP-11

compare_dict(log_a, log_b, resv, static, dyn)

Compares corresponding values in two dictionaries

Parameters:
  • log_a (dict) – First dictionary of objects to be compared

  • log_b (dict) – Second dictionary of objects to be compared

  • resv (list) – List of reserved fields

  • static (list) – List of static fields

  • dyn (list) – List of dynamic fields

Return type:

None

enable_fw_update(dut)

Enables FW Update in SMBus command code 90 (byte 91)

Parameters:

dut (XML_API) – Device object under test

Return type:

None

get_feature_state(dut)

Does Get Features on a FID

Parameters:

dut (XML_API) – Device object under test

Return type:

Feature data

get_identify_state(dut)

Executes steps 25-30

Parameters:

dut (XML_API) – Device object under test

Return type:

Identify data for CNS 0h and 1h

get_io_state(dut)

Executes steps 20-23

Parameters:

dut (XML_API) – Device object under test

Return type:

None

get_log_page_state(dut, endgid)

Does Get Log Page on a LID

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

  • endgid (int) – ENDGID value for LID 9h

Return type:

Log page data

get_pcie_link_status(dut)

Get the PCIe link status

Parameters:

dut (XML_API) – Device object under test

Return type:

PCIe link status

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)

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

DSSD_25_E1L_PCIe_Speed_And_Lane_Width_Test_Case.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.5 requirements referenced by this script:

FFE1L-2

DSSD_25_E1L_PWRDIS_Test_Case.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

DSSD_25_E1S_PCIe_Speed_And_Lane_Width_Test_Case.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.5 requirements referenced by this script:

FFE1S-2

DSSD_25_E1S_PWRDIS_Test_Case.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

DSSD_25_EUI64_And_NGUID_Test_Case.py

This script will run the following tests:
  1. Verify that if the device comes from the factory, the namespace has a nonzero value for EIU64.

  2. Verify that for all subsequent namespace creations after the first created namespace, the EUI64 field is 0.

  3. Verify that for all namespace creations, the NGUID field is nonzero and contains a value that is different from the default and from all other NGUID values. Also verify UIDREUSE bit is set to 1.

Pass/Fail: Script passes if all tests pass

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

NVMe-CFG-7/8

DSSD_25_Endianness_Verification_Test_Case.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.5 requirements referenced by this script:

SLOG-1/3/4/10, STD-LOG-23, SMART-1/2/12-28/30-33

DSSD_25_Endurance_Estimate_Test_Case.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.5 requirements referenced by this script:

SLOG-1/3/4/10, STD-LOG-23, SMART-1/2/12-28/30-33

DSSD_25_Endurance_Group_Information_Log_Page_09h_Test_Case.py

This script will run the following tests:
  1. Verify support for endurance groups

  2. Read the endurance group information log page and sanity check fields

  3. Compare endurance estimate values

  4. Sanity check remaining fields

Pass/Fail: Script passes if all tests pass

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

STD-LOG-17

compare_values(field_name, output_lid_02, output_lid_09)

Compare field values from two log pages and verify they match

Parameters:
  • field_name (str) – Field name to compare

  • output_lid_02 (dict) – Output of LID 2h

  • output_lid_09 (dict) – Output of LID 9h

Return type:

None

DSSD_25_Error_Information_Log_Page_Test_Case.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.5 requirements referenced by this script:

STD-LOG-1

DSSD_25_Error_Recovery_Log_Page_Test_Case.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.5 requirements referenced by this script:

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

DSSD_25_Execution_Time_Device_Self_Test_Operation_Test_Case.py

This script will run the following tests:
  1. That the device properly indicates support for the Device Self-Test operation in Identify Controller data.

  2. That the device properly defines the Extended Device Self-test Time in Identify Controller data.

  3. After the minimum number of required LBAs, which is available in the Adaptation Data, have been written, the extended device self-test operation is enabled.

  4. That the Device Self-Test Log Page correctly reports the Device Self-Test Operation status.

  5. A short device self-test operation shall be completed in less than or equal to 2 minutes.

  6. An extended device self-test operation shall be completed in less than or equal to 30 minutes.

  7. A vendor-specific self-test operation shall be completed in less than or equal to 2 seconds.

  8. During the extended device self-test operation, the device properly reads all allocated LBAs and increases the value of Physical Media Units Read field in the SMART Cloud Health log page.

  9. Even though the device self-test operation and host I/O activities are running concurrently, the device self-test operation is still completed within the OCP required time.

Pass/Fail: Script passes if all tests pass

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

NVMe-AD-12, STD-LOG-13, SELFTST-2/3/4/5/6/9

DSSD_25_Factory_Default_Settings_Verification_Test_Case.py

This script will run the following tests:
  1. All supported firmware slots shall contain the most recent production firmware revision.

  2. All logical blocks shall be deallocated.

  3. The following SMART / Health Information log page fields shall be cleared to 0h: Critical Warning, Endurance Group Critical Warning Summary, Data Units Read, Data Units Written, Host Read Commands, Host Write Commands, Controller Busy Time, Power Cycles, Power On Hours, Unsafe Shutdowns, Media and Data Integrity Errors, Percentage Used, Number of Error Information Log Entries.

  4. The Available Spare field in the SMART / Health Information log page shall be set to a value of 100.

  5. The Total Number of Events field in the Persistent Event log page shall be cleared to 0h.

  6. The Sanitize Status field in the Sanitize Status log page cleared to 0 indicating the NVM subsystem has never been sanitized and the Global Data Erased bit in the Sanitize Status field set to 1b.

Pass/Fail: Script passes if all tests pass

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

FDEF-1/2/3/4/5, NVMe-AD-22

DSSD_25_Failed_Sanitize_Operations_Test_Case.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

Pass/Fail: Script passes if all tests pass

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

NVMe v2.0d 5.16.1.25/5.27.1.19/5.24/8.21

exit_sanitize_failure(dut)

Performs the necessary steps to exit sanitize failure mode

Parameters:

dut (XML_API) – Device object under test

Return type:

None

postcondition(dut, wait=7200, fail=True)

Performs the necessary postcondition steps to restore DUT back to original state

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

  • wait (int) – Estimated time to wait for Sanitize Operation if Get Log Page with LID=81h fails

  • fail (bool) – If True, print ERROR message and exit the script; if False, print DETAIL message

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

DSSD_25_Fatal_Status_Test_Case.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.5 requirements referenced by this script:

NVMe-CFG-3

DSSD_25_Firmware_Activation_Notice_AE_Test_Case.py

The objectives for the Firmware Activation Notice AE Test Case are as follows:

a.) Verify that if an event occurs for which reporting is enabled and there are no Asynchronous Event

Request commands pending, the device retains the event information for that Asynchronous Event Type and reports it once an Asynchronous Event Request command is submitted.

b.) Verify that if duplicate events are queued while no Asynchronous Event Request commands are

pending, the duplicate events are reported as a single response to a future Asynchronous Event Request command.

c.) Verify that, if an AER is pending, after sending the NVMe Firmware Commit command with CA=3

and slot = 0, an AEN is sent to the host with the following information:

  1. Event Type: Notice

  2. Asynchronous Event Information: Firmware Activation Starting

  3. Log Page Identifier: Firmware Slot Information log (03h)

d.) Verify that, if an AER is pending, after sending the NVMe Firmware Commit command with CA=3

and firmware slot specified, an AEN is sent to the host with the following information:

  1. Event Type: Notice

  2. Asynchronous Event Information: Firmware Activation Star

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

NVMe-OPT-8/9/10/11, NVMe-AD-24/25

verify_aer_completion(aer)

Verify that the AEN configuration is as follows: a. Event Type = ‘Notice’ b. Asynchronous Event Information = ‘Firmware Activation Starting’ c. Log Page Identifier = ‘Firmware Slot Information (03h)’

Parameters:

aer (str) – Asynchronous Event to examine

Return type:

None

DSSD_25_Firmware_Slot_Information_Log_Page_Test_Case.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

Pass/Fail: Script passes if all tests pass

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

STD-LOG-5, MS-CONF-6

verify_slot(dut, start_fw_slot, PARAMS, prev_fw_fn)

Performs steps 10-22 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

DSSD_25_Firmware_Update_Test_Case.py

Test objectives are to verify the following:

  1. The firmware Commit command with Commit Action (CA) 000b, 001b, 010b and 011b are supported.

  2. A minimum of 3 slots firmware slots are supported by verifying that the value of bits [3:1] in the Firmware Updates (FRMW) field is greater than or equal to 3.

  3. The device shall complete the Firmware Activation process and be ready to accept host IO and admin commands within 1 second from the receipt of the firmware commit command. Verify that the value of Maximum Time for Firmware Activation (MTFA) field is less than or equal to Ah.

  4. The device supports a read-only firmware slot in slot 1.

  5. If the Firmware Slot field in the Firmware Commit command is cleared to 0h, verify that the device commits the firmware image to a firmware slot that is not currently active.

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

FWUP-3/4/6/7/20/21/25

enable_fw_update(dut)

Enables FW Update in SMBus command code 90 (byte 91)

Parameters:

dut (XML_API) – Device object under test

Return type:

None

verify_aer_completion(aer)

Verify that the Asynchronous Event Type field in bits [2:0] of CQE Dword 0 is cleared to 0. Verify that the Asynchronous Event Information field in bits [15:08] of CQE Dword 0 is set to 5.

DSSD_25_Firmware_Update_Without_Data_Loss_Or_Destruction_Test_Case.py

Test objectives are to verify the following:

  1. Device supports repeated Firmware Download and Commit operations.

  2. Repeated Firmware Download and Commits shall not cause data to be lost or corrupted.

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

FWUP-2/10

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

Downloads previous firmware and executes a FW commit command

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

Returns:

fw_commit_flag – True if the FW commit command failed, else False

Return type:

bool

enable_fw_update(dut)

Enables FW Update in SMBus command code 90 (byte 91)

Parameters:

dut (XML_API) – Device object under test

Return type:

None

DSSD_25_Format_NVM_Command_Extended_Execution_Time_Verification_Test_Case.py

This script will run the following tests:

Verify each Format NVM commands completes within these timeout settings. 1. The Format NVM Command for Cryptographic Erase shall complete within 10 seconds. 2. The Format NVM Command for No Secure Erase shall complete within the per TB specific timeout parameter provided by the supplier in the Adaptation Data. 3. The Format NVM Command for User Data Erase shall complete within 10 seconds per TB of device capacity.

Pass/Fail: Script passes if all tests pass

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

CTO-2, CTO-11

DSSD_25_Format_NVM_Command_On_A_Per_Namespace_Basis_Test_Case.py

This script will run the following tests:
  1. Verify support for Format NVM command

  2. Determine the maximum number of namespaces supported

  3. Get and save the current namespace dataset

  4. Calculate the LBA size

  5. Read the namespace granularity list

  6. Use the namespace granularity descriptor to calculate the capacity to use to create MaxNsCnt namespaces

  7. Delete original namespace

  8. Create and precondition new namespaces

  9. Format (SES=1) two randomly selected namespaces

  10. Verify the Format NVM only affected the two specific namespaces

  11. Restore original namespace

Pass/Fail: Script passes if all tests pass

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

NVMe-AD-2/5/8/23, SEC-4, NVMe Spec Format NVM Section

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

gen_2_ran(range_start, range_end)

Generates 2 random numbers between range_start, range_end

Parameters:
  • range_start (int) – Start of range (inclusive)

  • range_end (int) – End of range (inclusive)

Returns:

  • num1 (int) – First unique integer

  • num2 (int) – Second unique integer

DSSD_25_Format_NVM_Crypto_Erase_Test_Case.py

This script will run the following tests:
  1. Verify support for Format NVM command

  2. Get and save current LBA size

  3. Precondition namespace

  4. Start Format NVM command (SES=2)

  5. Verify Format command has ended

  6. Verify the Format NVM results

Pass/Fail: Script passes if all tests pass

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

NVMe-AD-2/5/8/23, SEC-4, NVMe Spec Format NVM Section

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

DSSD_25_Format_NVM_No_Secure_Erase_Test_Case.py

This script will run the following tests:
  1. Verify support for Format NVM command

  2. Get and save current LBA size

  3. Precondition namespace

  4. Start Format NVM command (SES=0)

  5. Verify format command has ended

  6. Verify the Format NVM results

Pass/Fail: Script passes if all tests pass

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

NVMe-AD-2/5/8/23, SEC-4, NVMe Spec Format NVM Section

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

DSSD_25_Format_NVM_User_Data_Erase_Test_Case.py

This script will run the following tests:
  1. Verify support for Format NVM command

  2. Determine if the controller will use crypto erase instead of user data erase

  3. Get and save current LBA size

  4. Precondition namespace

  5. Start Format NVM command (SES=1)

  6. Verify format command has ended

  7. Verify the Format NVM results

Pass/Fail: Script passes if all tests pass

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

NVMe-AD-2/5/8/23, SEC-4, NVMe Spec Format NVM Section

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

DSSD_25_Get_Set_Feature_C6_PLP_Health_Check_Interval_Test_Case.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.5 requirements referenced by this script:

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

DSSD_25_Get_Set_Feature_DSSD_Asynchronous_Event_Feature_Verification_Test_Case.py

This script will run the following tests:
  1. For Set feature: Get factory default value of feature 0xC9 and it should be cleared to 0.

  2. Change “Enable Panic Notices” field to 1 using set feature and using get feature check that the current state is set to 1 no later than next power cycle.

  3. Current state should be cleared to 0 after drive goes through power cycle

  4. Default state should be cleared to 0

  5. Change “Enable Panic Notices” field to 0 using set feature and using get feature check that the current state is cleared to 0 no later than next power cycle.

  6. Current should be cleared to 0 after drive goes through power cycle.

  7. Default state should be cleared to 0.

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

  9. For Get feature: Check the default state of 0xC9 with SEL=01b.It should be cleared to 0 and should not change over a power cycle. Current state selection should not affect the default state.

  10. Check the capabilities of 0xC9 with SEL=11b and it should be 100b indicating that this feature is not savable, changeable, and not namespace specific.

  11. Check the current state of 0xC9 with SEL=00b and it should match with selection made with set feature.

Pass/Fail: Script passes if all tests pass

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

SDAEC-1 to SDAEC-15, GDAEC-1/2

get_feat_c9_and_check(dut, sel, expected, step_num)

Retrieves the stored values in a Get-Feature for FID = C9h, and verifies the feature command’s execution

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

  • sel (int) – The Selection field for the Get-Feature command

  • expected (int) – Expected value for DWORD-0 bits [2:0] of the completion queue entry

  • step_num (int) – The current test step number

Return type:

None

DSSD_25_Hardware_Component_Log_Page_Test_Case.py

Test objectives are to verify the following:

  1. That the Hardware Component log page is returned, and the command completes with status success.

  2. That the Hardware Component log page format for recording the hardware components on the device matches OCP requirements.

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

HWCOMP-1/2/3/4/5

DSSD_25_IEEE1667_Feature_Test_Case.py

This script will run the following tests:

For Set feature the objectives are to test the following:

  1. Get factory default state of feature IEEE1667

  2. If the default state is enabled:
    • Disable IEEE1667 Silo using set feature and using get feature check that the current state and saved state are set to “disabled” no later than next power cycle

    • Current and saved state should be “disabled” even after drive goes through power cycle

    • Default state should be “enabled”

    • Enable IEEE1667 Silo using set feature and using get feature check that the current state and saved state are set to “enabled” no later than next power cycle

    • Current and saved state should be “enabled” even after drive goes through power cycle

    • Default state should be “enabled”

    • If setting this feature is not supported, then a status error code of 0x2 (Invalid Field in Command) shall be returned

  3. If the default state is disabled:
    • Enable IEEE1667 Silo using set feature and using get feature check that the current state and saved state are set to “enabled” no later than next power cycle

    • Current and saved state should be “enabled” even after drive goes through power cycle

    • Default state should be “disabled”

    • Disable IEEE1667 Silo using set feature and using get feature check that the current state and saved state are set to “disabled” no later than next power cycle

    • Current and saved state should be “disabled” even after drive goes through power cycle

    • Default state should be “disabled”

    • If setting this feature is not supported, then a status error code of 0x2 (Invalid Field in Command) shall be returned

For Get feature the objectives are to test the following:

  1. Check the default state of C4h with SEL=01b.It should match with factory default value and should not change during power cycle. Current state selection should not affect the default state

  2. Check the capabilities of C4h with SEL=11b and it should be 101b indicating that this feature is savable, changeable, and not name space specific

  3. Check the current state of C4h with SEL=00b and it should match with enabled/disable selection made with set feature

  4. Check the saved state of C4h with SEL=10b

Pass/Fail: Script passes if all tests pass

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

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

DSSD_25_IO_Command_Execution_Time_Verification_Test_Case.py

I/O Command Execution Time Verification Test Case:

For I/O commands the CTO test objectives are to verify the following:

  1. That when executing a stressing I/O workload over the course of 1 hour no more than 7 I/Os shall take more than 2s to complete.

  2. That when executing the previous I/O workloads under full capacities of device (Maximum Data Transfer Size and Maximum Queue Entries Supported), the performance still shall be met.

DSSD_25_Incomplete_Shutdown_Test_Case.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.5 requirements referenced by this script:

INCS-1/4/5/6

DSSD_25_LBA_Status_Information_Log_Page_Test_Case.py

This script will run the following tests:
  1. That reading the LBA Status Information Log page is supported by the DUT.

  2. That the log page reports LBA ranges that have been marked uncorrectable by the Write Uncorrectable command.

  3. The test case shall use the Write Uncorrectable command to create N separate LBA ranges marked as uncorrectable.

  4. The test case shall next read the LBA Status Information Log Page and verify that it contains a single LBA Status Namespace Element.

  5. The test case shall verify that the number of LBA Range Descriptors reported in the LBA Status Log Namespace Element is equal to N, where N is the number of uncorrectable LBA Ranges created.

  6. The test case shall next verify that the LBA ranges reported in the LBA Range Descriptors in the LBA Status Namespace Element match the LBA ranges marked as uncorrectable.

Pass/Fail: Script passes if all tests pass

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

STD-LOG-11

DSSD_25_Little_Endian_Verification_Test_Case.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.5 requirements referenced by this script:

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

compare_values(field_name, baseline_dict, new_values_dict, difference)

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

  • difference (int) – Expected difference between the baseline values and the new values

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

DSSD_25_Low_Power_Modes_Requirements_Test_Case.py

This script will run the following tests:
  1. Verify that ASPM Optionality Compliance (AOC) bit is set to 1

  2. Verify that ASPM Support (ASPMS) field is set to 10b or 11b

  3. Execute PCIe reset

  4. Verify that ASPM Control (ASPMC) field is cleared to 00b

Pass/Fail: Script passes if all tests pass

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

LPWR-1/2

DSSD_25_M2_PCIe_Speed_And_Lane_Width_Test_Case.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

DSSD_25_Maximum_Data_Transfer_Size_Test_Case.py

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

  2. Verify NPWG and NOWS <= MDTS

  3. Do Write command with transfer size < MDTS and > NPWG, and verify it passes

  4. Do Write command with transfer size = MDTS, and verify it passes

  5. Do Write command with transfer size > MDTS, and verify it fails

Pass/Fail: Script passes if all tests pass

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

NVMe-CFG-2

DSSD_25_NVMe_Commands_Received_During_Sanitize_Operation_Test_Case.py

This script will run the following tests:
  1. Verify support for sanitize crypto erase command

  2. Verify initial sanitize state

  3. Delete and recreate smaller fixed size namespace

  4. Verify that a format NVM command in progress is aborted when DUT receives sanitize command

  5. Wait until sanitize operation completes

  6. Verify that pending I/Os are aborted when DUT receives sanitize command

  7. Verify that all other NVM commands are aborted by DUT while sanitize operation is in progress

  8. Verify that admin commands not supported during sanitize are aborted by DUT when received

  9. Verify that DST during sanitize are aborted by DUT when received

  10. Verify that admin commands supported during sanitize operation are not aborted by DUT

Pass/Fail: Script passes if all tests pass

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

NVMe v2.0d 5.16.1.25/5.27.1.19/5.24/8.21

check_cmd_fail(dut, result, cmd, expected_status, sanact, wait=7200)

Checks for command failure during Sanitize

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

  • result (dict) – The dictionary returned by an XML_API call

  • cmd (str) – Command name to print

  • expected_status (int) – Expected status to return

  • sanact (bin) – Sanitize action to use when starting sanitize operation

Returns:

True if the command needs to be resent, False otherwise

Return type:

bool

check_sanitize(dut, cmd, sanact, wait=7200)

Restart sanitize operation if it has completed

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

  • cmd (str) – Command name to print

  • sanact (bin) – Sanitize action to use when starting sanitize operation

Returns:

True if the command needs to be resent, False otherwise

Return type:

bool

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

do_sanitize(dut, sanact, sanitize_results)

Execute sanitize command and put the results into a dictionary (since the sanitize 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

  • sanact (bin) – Sanitize action to use when starting sanitize operation

  • sanitize_results (dict) – Dictionary to hold the results of the sanitize command

Return type:

None

exit_sanitize_failure(dut)

Performs the necessary steps to exit sanitize failure mode

Parameters:

dut (XML_API) – Device object under test

Return type:

None

postcondition(dut, wait=7200, fail=True)

Performs the necessary postcondition steps to restore DUT back to original state

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

  • wait (int) – Estimated time to wait for Sanitize Operation if Get Log Page with LID=81h fails

  • fail (bool) – If True, print ERROR message and exit the script; if False, print DETAIL message

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

DSSD_25_NVMe_Controller_Configuration_And_Behavior_Test_Case.py

This script will run the following tests:
  1. Verify the stride between doorbell properties is 4 bytes as set by CAP.DSTRD

  2. Verify the device is NVM subsystem scope as set by CAP.CPS

  3. Verify the device supports the NVM Command Set as set by CAP.CSS and CNTRLTYPE

  4. Verify the minimum memory page size is 2^12

  5. Verify the maximum memory page size is at least 2 ^ (12 + 1)

  6. Verify the maximum number of Error Information log entries that are stored by the controller is 256 as set by ELPE

  7. Verify the device does NOT support the Host Memory Buffer by checking HMMIN and HMPRE fields are set to zero

  8. Verify the device shall NOT support the Controller Ready Independent of Media mode, by checking CAP.CRMS.CRIMS is set to zero

Pass/Fail: Script passes if all model number characters are ASCII

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

NVMe-CFG-9/12/13/16/17/18/19/20

DSSD_25_Namespace_Attachment_Command_Verification_Test_Case.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.5 requirements referenced by this script:

NVMe-AD-4, NUSE-1, NSM-1/2/3/4/5/6/7, NVMe v2.0d Section 3.2.1/5.22/8.11

namespace_management(dut, id_ns, sel, format_index, mset, new_ns_capacity=0, max_ns_count=1, is_private=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

Returns:

create_namespace

Return type:

dict

DSSD_25_Namespace_Attribute_Notices_AE_Test_Case.py

This script will run the following tests: The objectives for the Namespace Attribute Notices AE Test Case are to verify that the device completes an Asynchronous Event Request command for the “Namespace Attribute Changed” event when there is a change to one or more of the following:

  1. LBA format has been changed by Format NVM command, the AEN will be triggered because of the Identify Namespace data structure (CNS = 00h).

  2. The namespace is currently write-protected because of the Write Protection Config Set Feature Command, the AEN will be triggered because of the change of the I/O Command Set Independent Identify Namespace data structure (CNS = 08h).

  3. The namespace has been detached/attached/deleted, the AENs will be triggered because of the change of the Active Namespace ID list (CNS = 02h).

  4. The LBA format has been changed by Format NVM command, the AEN will be triggered because of the change of the Identify Namespace data structure for an Allocated Namespace ID (CNS = 11h).

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

NVMe-OPT-8/9/10/11, NVMe-AD-24/25

verify_aer_completion(aer)

Verify the AEN configuration as follows: a. Event Type = ‘Notice’, b. Asynchronous Event Information = ‘Namespace Attribute Changed’, c. Log Page Identifier = ‘Changed Namespace List (04h)’.

Parameters:

aer (str) – Asynchronous Event to examine

Return type:

None

DSSD_25_Namespace_Management_Command_Verification_Test_Case.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.5 requirements referenced by this script:

NVMe-AD-3, NSM-1/2/3/4/5/6/7, NVMe v2.0d Section 3.2.1/5.23/8.11

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

DSSD_25_Namespace_Support_Test_Case.py

This script will run the following tests:
  1. Issue Identify command with CNS = 1 and verify MNAN/NN values

  2. Issue Identify command with CNS = 2 and verify active NSID list contains one NSID

  3. Issue Identify command with CNS = 0

  4. Verify MaxBlks = NSZE = NCAP

Pass/Fail: Script passes if all tests pass

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

SECTOR-3

DSSD_25_PCIe_Max_Payload_Size_Requirements_Test_Case.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.5 requirements referenced by this script:

PCI-1

DSSD_25_PCIe_Resets_Requirements_Test_Case.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.5 requirements referenced by this script:

PCI-5/6

DSSD_25_PCIe_TLP_Completion_Timeout_Requirements_Test_Case.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.5 requirements referenced by this script:

PCI-2/3/4

DSSD_25_PEL_Data_Persistence_Across_Format_NVM_Operations_Test_Case.py

The objectives for this test case are to verify the following:

  1. That the device processes the Get Log Page commands to backup Persistent Event Log as the baseline.

  2. That the data in the Persistent Event Log Page (LID 0Dh) persists across Format NVM commands by performing the following checks:

    1. That all reserved and unsupported fields are cleared to 0 and do not change.

    2. That all statically defined fields remain unchanged.

    3. Verify that the Total Number of Events field in the Log Page data following successful Format NVM completion has increased as expected.

    4. Verify that the event data in the Log Page has persisted.

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

STD-LOG-9/10/20/21/22/23

DSSD_25_PEL_Data_Persistence_Across_Sanitize_Operations_Test_Case.py

The objectives for the Data Persistence during Sanitize Operation test case are to verify the following:

  1. That the device processes the Get Log Page commands to backup Persistent Event Log Page as the baseline.

  2. That the data in Persistent Event Log Page (LID 0Dh) persists across the Sanitize operations by performing the following checks:

    1. That all reserved and unsupported fields are cleared to 0 and do not change.

    2. That all statically defined fields remain unchanged.

    3. Verify that the Total Number of Events field in Log Page data following successful Sanitize completion has increased as expected.

    4. Verify that the event data in the Log Page has persisted.

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

STD-LOG-9/10/20/21/22/23

DSSD_25_PEL_Data_Persistence_Across_TCG_Purge_Operations_Test_Case.py

The objectives for this test case are to verify the following:

  1. That the device processes the Get Log Page commands to backup Persistent Event Log as the baseline.

  2. That the data in Persistent Event Log Page (LID 0Dh) has persisted across the previous TCG command by performing the following checks:

    1. That all reserved and unsupported fields are cleared to 0 and do not change.

    2. That all statically defined fields remain unchanged.

    3. That the data in the Persistent Event Log Page should be persisted across the previous TCG commands by checking the ‘Total Number of Events’ field in Log Page data.

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

STD-LOG-9/10/20/21/22/23

postcondition(dut)

Releases PEL reporting context

Parameters:

dut (XML_API) – Device Object Under Test

Return type:

None

DSSD_25_PERST_Test_Case.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.5 requirements referenced by this script:

TTR-20

DSSD_25_PLP_Start_Count_Test_Case.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.5 requirements referenced by this script:

SLOG-1/3/4/10, STD-LOG-23, SMART-1/2/12-28/30-33

DSSD_25_Persistent_Event_Log_Page_Test_Case.py

The objectives for the Persistent Event Log Page test case are to verify the following:

  1. Verify that the Persistent Event Log page is supported by the DUT.

  2. Verify that the maximum size of the Persistent Event log page reported in the Identify Controller data structure is 5 MiB or greater.

  3. 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.

  4. Verify that the Supported Events Bitmap field has bits set to 1 indicating support for the following event logs.

    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

  5. Verify that the Persistent Event log page events are ordered by timestamp.

  6. Verify that each of the following operations increases the TNE in the log page.
    1. power cycle,

    2. controller reset,

    3. subsystem reset,

    4. function level reset,

    5. Format NVM Command.

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

  8. Verify that the persistent event log reporting context is maintained for at least 5 minutes after the last host access to the log.

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

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

STD-LOG-9/10/20/21/22/23

DSSD_25_Physical_Media_Units_Test_Case.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.5 requirements referenced by this script:

SLOG-1/3/4/10, STD-LOG-23, SMART-1/2/12-28/30-33

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

  • lid

  • field_name1

  • field_name2

DSSD_25_Power_Loss_And_Reset_Events_During_Firmware_Activation_Process_Test_Case.py

Test objectives of this test case is to verify that the device is not left in an unusable state if the firmware activation process is interrupted by the events listed below. The device shall either abort the firmware activation and continue running with the firmware revision that was running at the start of the firmware update process or complete the firmware activation and start running with the new firmware revision.

  1. Unsafe Power Cycle,

  2. Controller Level Reset,

  3. NVM Subsystem Reset,

  4. Function Level Reset,

  5. PCIe Warm Reset,

  6. PCIe Hot Reset.

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

FWUP-18

do_fwcommit(dut, slot, thread_flag)

Execute FW Commit command until it fails due to a controller reset

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

  • slot (int) – FW slot for FW Commit

  • thread_flag (threading.Event) – Flag to stop the thread in case the FW Commit never fails

Return type:

None

do_fwcommit_step(dut, slot, reset)

Uses threading to make sure that the FW Commit is interrupted when a reset occurs

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

  • slot (int) – FW slot for FW commit

  • reset (lambda function) – Reset function to execute: unsafe, controller level, subsystem, function level

Return type:

None

enable_fw_update(dut)

Enables FW Update in SMBus command code 90 (byte 91)

Parameters:

dut (XML_API) – Device object under test

Return type:

None

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

steps_22_to_31(dut, prev_fw_rev, OriginalFirmwareRevision, AlternateSlot, OriginallyActiveSlot)

Run steps 22 to 31 to verify reset for revision changes

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

  • prev_fw_rev (str) – The Previous Firmware Revision

  • OriginalFirmwareRevision (str) – The current Firmware Revision

  • AlternateSlot (int) – Alternate writable firmware slot chosen

  • OriginallyActiveSlot (int) – Originally active firmware slot

Returns:

TestSlot – The slot to use for the next iteration

Return type:

int

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

DSSD_25_Power_State_Change_Count_Test_Case.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.5 requirements referenced by this script:

SLOG-1/3/4/10, STD-LOG-23, SMART-1/2/12-28/30-33

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

DSSD_25_Queue_Depth_And_IO_Queue_Pairs_Test_Case.py

This script will run the following tests:
  1. Verify SQES = 6 and CQES = 4

  2. Set controller configuration IOSQES = 6

  3. Set controller configuration IOCQES = 4

  4. Do Set Features for FID 7h with NCQR = NSQR = 511

  5. Verify CAP.MQES >= 1023

  6. Create 512 queues with queue size = 1023

Pass/Fail: Script passes if all tests pass

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

NVMe-CFG-5/6/14/15

DSSD_25_Read_Only_Or_Write_Through_Mode_Feature_Test_Case.py

This script will run the following tests:

The objective is to check that the factory default value of 0xC2 feature is set to Read Only Mode - Get factory default sate of feature 0xC2(ROWTM) and make sure that it is set to RO Mode

For Set feature the objectives are to test the following: a. Get factory default value of feature ROWTM(0xC2) and it should be RO Mode b. Change to Write Through Mode using set feature and using get feature check that the current state and saved state are set to Write Through Mode no later than next power cycle c. Current and saved state should be Write Through Mode even after drive goes through power cycle d. Default state should be Read Only Mode e. Change to Normal Mode using set feature and using get feature check that the current state and saved state are set to Normal Mode no later than next power cycle f. Current and saved state should be Normal Mode even after drive goes through power cycle g. Default state should be Read Only Mode h. Change to Read Only Mode using set feature and using get feature check that the current state and saved state are set to Read Only Mode no later than next power cycle i. Current and saved state should be Read Only Mode even after drive goes through power cycle j. Default state should be Read Only Mode k. If setting this feature is not supported, then a status error code of 0x2 (Invalid Field in Command) shall be returned

For Get feature the objectives are to test the following: a. Check the default state of 0xC2 with SEL=01b.It should be Read Only Mode and should not change over power cycle. Current state selection should not affect the default state. b. Check the capabilities of 0xC2 with SEL=11b and it should be 101b indicating that this feature is savable, changeable, and not name space specific c. Check the current state of 0xC2 with SEL=00b and it should match with Read Only, Write Through or Normal selection made with set feature d. Check the saved state of 0xC2 with SEL=10b e. Check whether smart page critical warning is reflecting ROWTM settings or not f. Check drive is in RO, WT or Normal Mode state by performing IO

Pass/Fail: Script passes if all tests pass

Open Compute Project Datacenter NVMe SSD Spec v2.5 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

DSSD_25_SMBus_Data_TTR_Verification_Test_Case.py

This script will run the following tests:
  1. Do a power cycle

  2. Get timestamp

  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.5 requirements referenced by this script:

SMBUS-1/2/3/4/7/9/10

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

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

  • TimeToIdentifyRdy (int) – TTR-1 value from DP-CFG-8 in ADP

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

DSSD_25_SMBus_Data_Verification_256_Bytes_Test_Case.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.5 requirements referenced by this script:

SMBUS-1/2/3/5/6/9/10

DSSD_25_SMBus_Data_Verification_Cmd_Code_0_Test_Case.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.5 requirements referenced by this script:

SMBUS-1/2/3/9/10

DSSD_25_SMBus_Data_Verification_Cmd_Code_154_Test_Case.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.5 requirements referenced by this script:

SMBUS-1/2/3/8/9/10

DSSD_25_SMBus_Data_Verification_Cmd_Code_167_Test_Case.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.5 requirements referenced by this script:

SMBUS-1/2/3/9/10

DSSD_25_SMBus_Data_Verification_Cmd_Code_242_Test_Case.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.5 requirements referenced by this script:

SMBUS-1/2/3/5/9/10

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

DSSD_25_SMBus_Data_Verification_Cmd_Code_248_Test_Case.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.5 requirements referenced by this script:

SMBUS-1/2/3/9/10

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

DSSD_25_SMBus_Data_Verification_Cmd_Code_32_Test_Case.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.5 requirements referenced by this script:

SMBUS-1/2/39/10

DSSD_25_SMBus_Data_Verification_Cmd_Code_50_Test_Case.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.5 requirements referenced by this script:

SMBUS-1/2/3/9/10

DSSD_25_SMBus_Data_Verification_Cmd_Code_8_Test_Case.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.5 requirements referenced by this script:

SMBUS-1/2/3/9/10

DSSD_25_SMBus_Data_Verification_Cmd_Code_90_Test_Case.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.5 requirements referenced by this script:

SMBUS-1/2/3/4/9/10, FB-CONF-6, MS-CONF-6

DSSD_25_SMBus_Data_Verification_Cmd_Code_96_Test_Case.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.5 requirements referenced by this script:

SMBUS-1/2/3/9/10

DSSD_25_SMBus_Firmware_Update_Verification_Test_Case.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.5 requirements referenced by this script:

SMBUS-1/3/4/5/6/7/9/10, FB-CONF-6, MS-CONF-6

DSSD_25_SMBus_Invalid_Transaction_Test_Case.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.5 requirements referenced by this script:

SMBUS-1/2/3/4/7/9/10

DSSD_25_SMBus_Secure_Boot_Failure_Verification_Test_Case.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.5 requirements referenced by this script:

SMBUS-1/3/5/6/9/10

DSSD_25_Sanitize_Operation_Block_Erase_Test_Case.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. Setup AENs

  5. Verify Sanitize command with No-Deallocate After Sanitize = 0 first

  6. Precondition namespace for sanitize

  7. Start block erase sanitize operation

  8. Block erase sanitize operation has ended

  9. Verify the block erase sanitize operation

  10. Verify sanitize command with No-Deallocate After Sanitize = 1

  11. Delete and recreate original namespace

  12. Verify that block erase completes within 10s per TB of capacity

Pass/Fail: Script passes if all tests pass

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

NVMe-AD-7/8/17/18, SEC-4, STD-LOG-9/10, CTO-8, NVMe v2.0d Section 5.16.1.25/5.27.1.19/5.24/8.21

exit_sanitize_failure(dut)

Performs the necessary steps to exit sanitize failure mode

Parameters:

dut (XML_API) – Device object under test

Return type:

None

postcondition(dut, wait=7200, fail=True)

Performs the necessary postcondition steps to restore DUT back to original state

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

  • wait (int) – Estimated time to wait for Sanitize Operation if Get Log Page with LID=81h fails

  • fail (bool) – If True, print ERROR message and exit the script; if False, print DETAIL message

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

DSSD_25_Sanitize_Operation_Crypto_Erase_Test_Case.py

This script will run the following tests:
  1. Verify support for sanitize crypto erase command

  2. Verify initial sanitize state

  3. Delete and recreate smaller fixed size namespace

  4. Setup AENs

  5. Verify Sanitize command with No-Deallocate After Sanitize = 0 first

  6. Precondition namespace for sanitize

  7. Start crypto erase sanitize operation

  8. Crypto erase sanitize operation has ended

  9. Verify the crypto erase sanitize operation

  10. Verify sanitize command with No-Deallocate After Sanitize = 1

  11. Delete and recreate original namespace

Pass/Fail: Script passes if all tests pass

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

NVMe-AD-7/8/18, SEC-4, STD-LOG-9/10, NVMe v2.0d Section 5.16.1.25/5.27.1.19/5.24/8.21

execute_IO_Profile(dut, test_type, io_profile, io_runtime=-1, io_pattern=1, config=None)
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

  • config (dict) – Configuration parameters for the I/O

Return type:

dict

exit_sanitize_failure(dut)

Performs the necessary steps to exit sanitize failure mode

Parameters:

dut (XML_API) – Device object under test

Return type:

None

postcondition(dut, wait=7200, fail=True)

Performs the necessary postcondition steps to restore DUT back to original state

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

  • wait (int) – Estimated time to wait for Sanitize Operation if Get Log Page with LID=81h fails

  • fail (bool) – If True, print ERROR message and exit the script; if False, print DETAIL message

Return type:

None

verify_ios(io_tests, fail_type='warn')

Verifies the succession of an I/O command

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

  • fail_type (str) – fail type upon I/O failure

Returns:

io_failed – Returns failed if any io test failed

Return type:

bool

DSSD_25_Sanitize_Operation_Overwrite_Erase_Test_Case.py

This script will run the following tests:
  1. Verify support for sanitize overwrite command

  2. Verify initial sanitize state

  3. Delete and recreate smaller fixed size namespace

  4. Setup AENs

  5. Verify Sanitize command with No-Deallocate After Sanitize = 0 first

  6. Precondition namespace for sanitize

  7. Start overwrite sanitize operation

  8. Overwrite sanitize operation has ended

  9. Verify the overwrite sanitize operation

  10. Verify sanitize command with No-Deallocate After Sanitize = 1

  11. Delete and recreate original namespace

Pass/Fail: Script passes if all tests pass

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

NVMe-AD-7/8/18, SEC-4, STD-LOG-9/10, NVMe v2.0d Section 5.16.1.25/5.27.1.19/5.24/8.21

execute_IO_Profile(dut, test_type, io_profile, io_runtime=-1, io_pattern=1, config=None)
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

  • config (dict) – Configuration parameters for the I/O

Return type:

dict

exit_sanitize_failure(dut)

Performs the necessary steps to exit sanitize failure mode

Parameters:

dut (XML_API) – Device object under test

Return type:

None

postcondition(dut, wait=7200, fail=True)

Performs the necessary postcondition steps to restore DUT back to original state

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

  • wait (int) – Estimated time to wait for Sanitize Operation if Get Log Page with LID=81h fails

  • fail (bool) – If True, print ERROR message and exit the script; if False, print DETAIL message

Return type:

None

verify_ios(io_tests, fail_type='warn')

Verifies the succession of an I/O command

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

  • fail_type (str) – fail type upon I/O failure

Returns:

io_failed – Returns failed if any io test failed

Return type:

bool

DSSD_25_Sector_Size_Test_Case.py

This script will run the following tests:
  1. The device supports both 512-byte and 4096-byte sector sizes

  2. The device is configured from the factory with the default sector size specified by OCP requirements per form factor

Pass/Fail: Script passes if all tests pass

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

SECTOR-4, MS-CONF-1/2, NSM-2/3

DSSD_25_Security_Version_Number_Test_Case.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.5 requirements referenced by this script:

SLOG-1/3/4/10, STD-LOG-23, SMART-1/2/12-28/30-33

DSSD_25_Set_Get_Feature_Telemetry_Profile_C8h_Test_Case.py

This script will run the following tests:
  1. Send the Set Feature command with FID C8h to set each telemetry profile type

  2. Verify that the correct profile is then reported in the Telemetry Area 1 data.

  3. Verify that the SEL field is ignored with the Get Feature command with FID C8h

Pass/Fail: Script passes if all tests pass

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

TEL-16/17, TEL-CFG-SF-1/2/3/4/5/6/7/8/9/10/11/12/13/14/15/16/17, TEL-CFG-GF-1

cleanup_action(filenames)

Deletes temporary files before ending script

Parameters:

list[str] (filenames) – temporary file names to remove

Return type:

None

get_data_area_1_fields(filename)

Parses OCP 2.5 Telemetry Data Format (see Datacenter NVMe SSD spec section 4.9.16.1)

Parameters:

filename (str) – Filename of raw binary output from get log page command

Returns:

result – Result dictionary with fields parsed out similar to api_core.py and core.json

Return type:

dict

parse_thi_output(cmd_output, filename)

Parses out the data from the GetLogPage hexdump and appends it to the proper file. Ignores data that is not hex-dumped like CQE.

Parameters:
  • cmd_output (List) – List of hex-dump strings to parse

  • filename (str) – File to append to

Returns:

Number of blocks read

Return type:

int

read_seq_blocks_from_log(dut, mdtsb, data_area_blks, depth, filename)

Reads data_area_blks from the telemetry host log. Assumes the header (512 Bytes) has already been parsed. A MDTS value that is not a multiple of 512 bytes will produce undefined behavior, although all valid MDTS alues should be multiples of 512 bytes.

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

  • mdtsb (int) – Maximum Data Transfer Size in Bytes

  • data_area_blks (int) – Number of data area blocks left to read

  • depth (int) – multiplier for offset for subsequent get log page command calls

  • filename – File to append binary data from get log page command to

Returns:

True if all-around success, else False

Return type:

bool

DSSD_25_Shutdown_Notification_And_Status_Test_Case.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.5 requirements referenced by this script:

TTR-5/6/23

DSSD_25_Subsystem_Reset_Test_Case.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.5 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

DSSD_25_TCG_Activity_Events_For_Persistent_Event_Log_Test_Case.py

The objective for the TCG Persistent Event Log is to verify the following:

  1. Perform all TCG methods according to TCGHST-PE-2 requirements.
    1. Level 0 Discovery

    2. Start Session

    3. Authenticate method (entries only recorded when the authority specified is not locked out)

    4. Close Session by the host when it sends an End-Of-Session token

    5. Close Session due to timeout

    6. Properties method

    7. Stack Reset

    8. TPer Reset

    9. Get method

    10. Set method

    11. GenKey method

    12. Random method

    13. Activate method

    14. Revert method

    15. RevertSP method

    16. Reactivate method

    17. Erase method

    18. Block SID Authentication

    19. Assign method

    20. Deassign method

  2. To generate a sufficient number of persistent log entries (at least 100 entries), the Assign and Deassign methods will be invoked multiple times.

  3. Utilize the Get Log Page command to retrieve the persistence event log page.

  4. Verify that the “Total Number of Events” increment at least 100.

  5. Verify that all methods invoked above are logged in the event log entries except SyncSession method.

  6. Verify that all the TCG Activity PEL entries comply with OCP 2.5 requirements in the TCG Activity Event Format Table.

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

TCGHST-PE-1 - TCGHST-PE-5 TCGCE-1 - TCGCE-24 TCG-AUTHM-1 - TCG-AUTHM-3 TCG-ACT-1 TCG-ACT-2 TCG-RACT-1 TCG-RACT-2 TCG-ASGN-1 TCG-ASGN-2 TCG-BSID-1 TCG-BSID-2

DSSD_25_TCG_Configuration_Log_Page_C7h_Block_SID_Authentication_Test_Case.py

The objective for the TCG Block SID Authentication is to verify the following:

  1. Verify that the “C_PIN_SID Authentication Blocked”, TCGL-1 bit[1], will be set to 1(Blocked) upon successful completion of the Block SID Authentication command.

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

TCGL-1

DSSD_25_TCG_Configuration_Log_Page_C7h_Programmatic_Count_Test_Case.py

The objective for the TCG Programmatic count is to verify the following:

  1. Verify that the Programmatic TCG Reset Count(TCGL -17) and Programmatic TCG Reset Lock Count(TCGL -18) have been updated correctly after performing a programmatic reset.

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

TCGL-17 - TCGL-18

DSSD_25_TCG_Configuration_Log_Page_C7h_Test_Case.py

The objective for the TCG Configuration Log Page C7h is to verify the following:

  1. Verify that the default values of the log page shall be cleared to 0.

  2. Perform TCG activate method to locking SP.

  3. Perform TCG assign method to assign Namespace non-Global Range Locking object for all Namespaces exist on the device.

  4. Verify that the number of Locking Objects, Number of Range Provisioned Locking Objects, and Number of Namespace Provisioned Locking Objects have been updated accordingly and correctly.

  5. Perform TCG set method to enable ReadLockEnabled, WriteLockEnabled, ReadLocked, and WriteLocked.

  6. Verify that the Number of Read Locked Locking Objects, Number of Write Locked Locking Objects, Number of Read Unlocked Locking Objects, and Number of Write Unlocked Locking Objects have been updated accordingly and correctly.

  7. Perform TCG revertSP method to locking SP.

  8. Verify that the TPer Revert Count has increased.

  9. Perform TCG revert method to Admin SP.

  10. Verify that the TPer Revert Count has increased.

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

TCGL-1 - TCGL-16, TCGL-19 - TCGL-21

DSSD_25_TCG_Operation_Execution_Time_Verification_Test_Case.py

TCG Operation Execution Time Verification Test Case:

For the TCG operations listed in the TCG Operation Table, the CTO test objectives are to verify that each validly formatted TCG command completes successfully within 10 seconds under the following scenarios:

  1. Host level TCG commands executed sequentially resulting in TCG Operations being sent to DUT via Security Send/Receive commands,

  2. Host level TCG commands issued in the presence of a stressing background I/O workload.

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

CTO-1

DSSD_25_The_Expected_Value_Of_NSID_Field_Of_Set_Get_Feature_ROWTM_Test_Case.py

This script will run the following tests:
  1. Issue Identify Controller command and get value of NN field

  2. Issue Get Features command for FID = C2h and save Dword0 bits 2:0

  3. Issue Set Features command for FID = C2h with NSID = FFFFFFFFh to set drive to EOL behavior from Get Features and verify it’s successful

  4. Repeat step 3 with NSID = 1 and verify it fails

  5. Repeat step 3 with NSID = NN + 1 and verify it fails

Pass/Fail: Script passes if all tests pass

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

SROWTM-6

DSSD_25_Time_To_Admin_And_IO_Ready_Test_Case.py

The objectives of the Time to Admin and IO Ready test case are as follows:

  1. Perform a controller reset and verify that the device successfully responds to Identify commands within DP-CFG-8 seconds (from Adaptation data) after setting CC.EN=1.

  2. Perform a controller reset and verify that the device successfully responds to I/O commands within DP-CFG-9 seconds (from Adaptation data) of setting CC.EN=1.

  3. Perform a safe power cycle and verify that the device successfully responds to Identify commands within DP-CFG-8 seconds (from Adaptation data) after setting CC.EN=1.

  4. Perform a safe power cycle and verify that the device successfully responds to I/O commands within DP-CFG-9 seconds (from Adaptation data) of setting CC.EN=1.

  5. Perform an unsafe safe power cycle and verify that the device successfully responds to Identify

commands within DP-CFG-8 seconds (from Adaptation data) after setting CC.EN=1.

  1. Perform an unsafe power cycle and verify that the device successfully responds to I/O commands within DP-CFG-9 seconds (from Adaptation data) of setting CC.EN=1.

  2. Ensure that device complies TTR-4 and with DP-CFG-10 is if column B is supported.

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

TTR-1/2/4, DP-CFG-8/9/10

DSSD_25_Timestamp_Feature_Test_Case.py

The objectives of the test case are as follows:

  1. Default state
    1. Get the Identify Controller Data for DUT and verify that the timestamp feature is set as supported in ONCS field.

    2. Issue a Get Features command with select field set to 011b for timestamp feature(0Eh) and verify that feature is changeable and not namespace specific from the command status.

  2. Basic functionality
    1. Using set features for Timestamp feature (0Eh), set the timestamp to X milliseconds and using Get Features check that the value returned is greater than X for all subsequent Get features before NVM Subsystem Reset or power cycle.

    2. Verify that Timestamp Origin value in Timestamp Attribute field is not set to 000b before NVM Subsystem reset or power cycle is issued.

    3. Verify that Synch value in Timestamp Attribute field is not set to 1b.

  3. Reset
    1. Perform a power cycle and using Get Features check that the timestamp value returned has been reset to 0.

    2. Verify that both the Timestamp Origin value and the Synch value in Timestamp Attribute field are cleared to 0b after a power cycle is issued.

    3. Perform NVM Subsystem Reset and using Get Features verify that the timestamp value has been reset to 0.

    4. Verify that both the Timestamp Origin value and the Synch value in Timestamp Attribute field are cleared to 0b after NVM Subsystem Reset is issued.

  4. Persistence
    1. Issue Controller Level Reset and verify the timestamp value read after reset not been reset to 0.

    2. Also verify the Synch value is not set in the Get Features command status indicating timestamp did not stop during reset handling.

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

NVMe-OPT-2/4/5

get_nvme_timestamp_feature_value()

Returns the value of /sys/module/nvme_core/parameters/nvme_timestamp_feature

Parameters:

None

Return type:

Integer value

power_cycle_nssr_steps(dut, TimeToIdentifyRdy, iteration)

Executes steps 23-35 for power cycle and steps 36-37 for NSSR in the testplan

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

  • TimeToIdentifyRdy (int) – TimeToIdentifyRdy value

  • iteration (int) – 1 = execute power cycle steps, 2 = execute NSSR steps

Return type:

None

DSSD_25_Total_NUSE_Test_Case.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.5 requirements referenced by this script:

SLOG-1/3/4/10, STD-LOG-23, SMART-1/2/12-28/30-33

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, endgid, 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

DSSD_25_UUID_Test_Case.py

This script will run the following tests:
  1. Verify that the UUID List obtained by using the NVMe Identify Command using CNS=17h contains the UUID value C194D55BE0944794A21D29998F56BE6F in big endian format as shown below:

    [——————–Bytes——————–] 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00 6F BE 56 8F 99 29 1d A2 94 47 94 E0 5B D5 94 C1

  2. Verify that sending Get/Set Feature commands with vendor unique FIDs and the UUID index = matching UUID Index complete successfully.

  3. Verify that Get/Set Feature commands with valid vendor unique FIDs and UUID index = 0 complete successfully.

  4. Verify that Get/Set Feature commands with valid vendor unique FIDs and UUID index = invalid index fail with Invalid Field in Command status.

  5. Verify that the Get Log Page commands with valid vendor unique LIDs and the UUID index = matching UUID Index complete successfully.

  6. Verify that the Get Log Page commands with valid vendor unique LIDs and the UUID index = 0 complete successfully.

  7. Verify that the Get Log Page commands with valid vendor unique LIDs and invalid UUID index fail with Invalid Field in Command status.

Pass/Fail: Script passes if all tests pass

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

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

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, starting_step, check_sc=False, orig_values=None, orig_values_pristine=None)

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

  • starting_step (int) – Step to start incrementing from throughout the loop

  • check_sc (bool) – bool flag to check for expected failure status

  • orig_values (list) – List of original feature values to check against

  • orig_values_pristine (list) – List of original feature values (before reversing the bit order for use in Set Features) to check against

Returns:

get_feat_values

Return type:

list

issue_log_pages(dut, uuid_index, starting_step, 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

  • starting_step (int) – Step to start incrementing from throughout the loop

  • check_sc (bool) – bool flag to check for expected failure status

Return type:

None

issue_set_features(dut, uuid_index, get_feat_values, starting_step, 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, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xC3

  • starting_step (int) – Step to start incrementing from throughout the loop

  • check_sc (bool) – bool flag to check for expected failure status

  • data_buffer (hex) – Data buffer

Return type:

None

obtain_values(current_states)

Returns valid values to set in the Set Features commands from the Get Features values

Parameters:

current_states (dict) – Dictionary of FID to value

Returns:

  • get_feat_values (dict)

  • get_feat_values_pristine (dict)

DSSD_25_Unaligned_IO_Test_Case.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.5 requirements referenced by this script:

SLOG-1/3/4/10, STD-LOG-23, SMART-1/2/12-28/30-33

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

DSSD_25_Unsafe_Shutdowns_Verification_Test_Case.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.5 requirements referenced by this script:

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

DSSD_25_Unsupported_Command_Verification_Test_Case.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.5 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

DSSD_25_Unsupported_Feature_Verification_Test_Case.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.5 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

DSSD_25_Unsupported_Log_Pages_Verification_Test_Case.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.5 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

DSSD_25_Unsupported_Requirements_Log_Page_Test_Case.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.5 requirements referenced by this script:

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

DSSD_25_Verify_NSID_Value_In_Get_Set_DSSD_Asynchronous_Event_Feature_Test_Case.py

This script will run the following tests:
  1. Using NSID = 0 in the set features command passes as expected.

  2. Using NSID = FFFFFFFFh in the set features command passes as expected.

  3. Using NSID = NN+1 (invalid NSID) fails with Invalid Field in Command status.

  4. NSID = any NSID between 1 and NN (valid NSID) fails with Feature Not Namespace Specific status.

Pass/Fail: Script passes if all tests pass

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

SDAEC-6

DSSD_25_Write_Read_Command_And_Data_Verification_Test_Case.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.5 requirements referenced by this script:

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

DSSD_25_Write_Uncorrectable_Test_Case.py

The objective of this test case is to verify the NVME IO requirements NVMe-IO-10 and NVMe-IO-14

  1. The device’s support for NVMe Write Uncorrectable command is verified by issuing the NVMe Write Uncorrectable command.

  2. LBAs that were written using the Write Uncorrectable command should fail read operations. These read errors should not increase the value of the SMART/Health information field Media field.

  3. The case where the WUSL field in the Identify Controller dataset(CNS==6) is 0 and bit-1 of the ONCS field in the Identify Controller dataset(CNS==1) is also 0 shall be treated as a controller error and test case failure.

  4. In the case where the WUSL field in the Identify Controller dataset(CNS==6) is greater than 0, WUSL shall be used to set the value of MAXLBAS using Identify Controller(CNS==1) and Identify Namespace(CNS==0) data as 2^(WUSL + 12 + CAP.MPSMIN) / 2^LBA Format[FLBAS].

  5. Verify that when the WUSL field in the Identify controller dataset(CNS==6) is greater than 0 and bit-1 of the ONCS field in the Identify Controller dataset is 0 and the host sends a Write Uncorrectable command with an NLB value greater than that specified by the value of WUSL, the controller shall abort the Write Uncorrectable command with Invalid Field in Command.

  6. The case where the WUSL field in the Identify Controller dataset(CNS==6) is 0 and bit-1 of the ONCS field in the Identify Controller dataset(CNS==1) is 1 shall be treated as the controller is not specifying a maximum size. In this scenario, MAXLBAS shall be computed using Identify Controller(CNS==1) and Identify Namespace(CNS==0) data as 2^(MDTS + 12 + CAP.MPSMIN) / 2^LBA Format[FLBAS].

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

NVMe-IO-1/3/4/5/6/7/8/9/10/11/12/13/14, GETF-2

DSSD_25_Write_Zeroes_Test_Case.py

The objective of this test case is to verify the NVME IO requirements NVMe-IO-4, NVMe-IO-5, NVMe-IO-6 and NVMe-IO-7.

  1. The device’s support for NVMe write zeroes commands is checked by issuing NVMe Write Zeros command.

  2. Verify that the NVMe read command send after the NVMe Write Zeroes command with DEAC=0 and FUA=0 returns all zeros.

  3. Verify that the NVMe read command send after the NVMe Write Zeroes command with DEAC=0 and FUA=1 returns all zeros.

  4. Verify that the NVMe read command send after the NVMe Write Zeroes command with DEAC=1 and FUA=0 returns all zeros.

  5. Verify that the NVMe read command send after the NVMe Write Zeroes command with DEAC=1 and FUA=0 returns all zeros.

  6. Verify that the NVMe Write Zeroes command with DEAC=1, FUA=0, can deallocate the full capacity of the DUT in less than 1 minute.

  7. The case where the WZSL field in the Identify Controller dataset(CNS==6) is 0 and bit-3 of the ONCS field in the Identify Controller dataset(CNS==1) is also 0 shall be treated as an error and test case failure.

  8. In the case where the WZSL field in the Identify Controller dataset(CNS==6) is greater than 0, WZSL shall be used to set the value of MAXLBAS using Identify Controller(CNS==1) and Identify Namespace(CNS==0) data as 2^(WZSL + 12 + CAP.MPSMIN) / 2^LBA Format[FLBAS].

  9. Verify that when the WZSL field in the Identify controller dataset(CNS==6) is greater than 0 and bit-3 of the ONCS field in the Identify Controller dataset is 0 and the host sends a Write Zeroes command with an NLB value greater than that specified by the value of WZSL, the controller shall abort the Write Zeroes command with Invalid Field in Command.

  10. The case where the WZSL field in the Identify Controller dataset(CNS==6) is 0 and bit-3 of the ONCS field in the Identify Controller dataset(CNS==1) is 1 shall be treated as the controller is not specifying a maximum size. In this scenario, MAXLBAS shall be computed using Identify Controller(CNS==1) and Identify Namespace(CNS==0) data as 2^(MDTS + 12 + CAP.MPSMIN) / 2^LBA Format[FLBAS].

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

NVMe-IO-1/3/4/5/6/7/8/9/10/11/12/13/14, GETF-2