OCP_2_0_Group_2
DSSD_20_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:
Admin commands issued sequentially,
Admin commands issued in the presence of a stressing background I/O workload.
DSSD_20_Admin_Command_Extended_Execution_Time_Verification_Test_Case.py
Admin Command Extended Execution Time Verification Test Case:
For the Extended Timeout Value Admin Command Verification, the test objectives are to verify that the following admin commands complete successfully within the per TB specific timeout parameter provided by the vendor in Adaptation Data:
Format NVM
DSSD_20_Arbitration_Test_Case.py
- This script will run the following tests:
Verify that the device’s default arbitration is Round-Robin by reading CC.AMS
Verify that the device supports Weighted round robin with urgent class priority by reading CAP.AMS.
Change the arbitration to Weighted Round Robin by changing CC.AMS field.
Pass/Fail: Script passes if all tests pass
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
NVMe-CFG-1
- clear_bit(value, bit)
Clears a bit to 0
- Parameters:
value (int) – value to be modified
bit (int) – index to be modified
- Return type:
int
- set_cc_ams(dut, ams)
Sets CC.AMS value
- Parameters:
dut (XML_API) – Device object under test
ams (int) – Arbitration Mechanism Selected for setting
- Return type:
None
- verify_bit(value, bit, on=True)
Verifies if a bit is set to 1 or cleared to 0
- Parameters:
value (int) – value to be checked
bit (int) – index to be checked
on (bool) – If checking against 1, true, if 0, false
- Return type:
bool
- verify_cc_ams(dut, expected_ams)
Verifies arbitration mechanism selected is set as expected
- Parameters:
value (int) – Controller Configuration return bits
expected_ams (int) – expected arbitration mechanism selected
- Return type:
None
- verify_cc_en(dut, on, timeout)
Verifies CC.EN is set to a particular value
- Parameters:
dut (XML_API) – Device object under test
on (bool) – If CC.EN should be 1 or 0
timeout (int) – Expected timeout in seconds
- Returns:
end_time – time that CSTS.RDY is expected to transition by
- Return type:
int
- wait_csts_rdy(dut, end_time, rdy_bit)
Waits timeout / 2 seconds for CSTS.RDY bit to transition after changing CC.EN
- Parameters:
dut (XML_API) – Device object under test
end_time (int) – Expected timeout limit (timeout + time.time())
rdy_bit (int) – Expected value for CSTS.RDY to transition to
- Return type:
None
DSSD_20_Basic_Command_And_Data_Verification_Test_Case.py
- This script will run the following tests:
Do GetLogPage for LID 2h with different NSIDs
Check various field values
Do controller reset and repeat steps 1-2
Do FLR and repeat steps 1-2
Do NSSR and repeat steps 1-2
Pass/Fail: Script passes if all tests pass
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
STD-LOG-2/3, SLOG-1/3/4/5/10/11
DSSD_20_Basic_Data_Persistence_Test_Case.py
- This script will run the following tests:
Issue NVMe GetLogPage command with LID = C0h, SMART/Health Information Extended Log Page.
Wait 10 minutes and then power cycle the drive
Verify fixed or reserved values are unchanged
Verify dynamic values are unchanged or have increased
Do controller reset and repeat steps 3-4
Do NSSR and repeat steps 3-4
Do FLR and repeat steps 3-4
Pass/Fail: Script passes if all tests pass
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
SLOG-1/3/4/10, STD-LOG-23, SMART-1/2/12-28/30-33
- parse_logpage_values(dut, lid)
Issues a Get Log Page command and parses into Static and Dynamic dictionaries
- Parameters:
dut (XML_API) – Device object under testing
lid (int) – Integer issued in either hex or decimal, specifies GetLog Page
- Returns:
get_log_x, static_fields, dynamic_fields
- Return type:
dict
DSSD_20_Basic_Namespace_Data_Verification_Test_Case.py
- This script will run the following tests:
Verify that new drives come from the factory configured with exactly one active namespace sized to the maximum capacity of the device.
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.
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.
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.
Verify that support for the NSWG field is indicated in the NSFEAT field in adaptation data.
Verify that the NSWG field in Namespace data is populated and, that the value matches the indirection unit value in Adaptation data.
Pass/Fail: Script passes if all tests pass
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
NSM-4/5/6, NVMe-OPT-7, SECTOR-3
DSSD_20_Boot_Requirements_Test_Case.py
- This script will run the following tests:
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.0 requirements referenced by this script:
BOOT-2
DSSD_20_Clear_FW_Update_History_Test_Case.py
- This script will run the following tests:
Determine the current and alternate firmware slots
Clear the FW Update History log and verify it was cleared
Download the previous firmware image
Alternate committing the previous and current firmware images multiple times
Verify Valid Firmware Activation History Entries count is correct
Clear the FW Update History log and verify it was cleared
Pass/Fail: Script passes if all tests pass
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
CFUH-1 to CFUH-15, GETF-2
DSSD_20_Clear_PCIe_Correctable_Error_Counters_Test_Case.py
- This script will run the following tests:
Issue Set Features to clear PCIe correctable error count
Do GetLogPage for LID C0h and verify PCIe Correctable Error Count is zero
Power cycle the drive
Delay 20 seconds
Do GetLogPage for LID C0h and verify PCIe Correctable Error Count is zero
Issue Set Features with SV = 1
Verify the command aborts with status code 0Dh Feature Identifier Not Savable.
Pass/Fail: Script passes if all tests pass
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
CPCIE-1-15, GETF-2
DSSD_20_Commands_Supported_And_Effects_Log_Page_Test_Case.py
- This script will run the following tests:
Read the Controller Capabilities register and check values of bits 37 and 44
Do GetLogPage for LID 5h
Verify the log page contains an entry for each admin command shown as supported in Table 4 in the testplan
Verify the log page contains an entry for each I/O command shown as supported in Table 5 in the testplan
Check the effects bits in Table 5 in the testplan for I/O commands
Pass/Fail: Script passes if all tests pass
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
STD-LOG-6
- LogPageCheckBitValue(cmd_dict, tag, bit_fieldname, exp_value)
Check value of a particular bit
- Parameters:
cmd_dict (dict) – Command dictionary to use
tag (str) – Bit field name
bit_fieldname (str) – Bit field abbreviation
exp_value (int) – Expected bit value
- Return type:
None
DSSD_20_Compare_Test_Case.py
- This script will run the following tests:
Confirm support and determine maximum I/O size to use
Determine and validate the maximum LBA transfer size
Test individual non-fused commands
Test valid fused operation
Test valid fused operation scenario with incorrect compare pattern
Test fused operation using nonmatching values for NLBs and verify no update performed
Test fused operation using FUSE=1 for both commands and verify no update performed
Test fused operation where first command has FUSE=2 and second command has FUSE=1 and verify no update performed
Test fused operation where second command has FUSE=0
Pass/Fail: Script passes if all tests pass
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
NVMe-IO-1/3/4/5/6/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)
Check status of the fused command
- Parameters:
command (str) – Command to execute (calls fused_compare_and_write() with appropriate parameter values)
expected_type (int) – Error response type in SCT field
expected_status (int) – Error response status code in SCT field
- Return type:
None
- execute_command(command, result_queue)
Execute a command and get the results
- Parameters:
command (str) – Command to execute
result_queue (list) – Response and status code
- Return type:
None
- fused_compare_and_write(dut, compare_slba=0, compare_nlba=1, compare_data='5a', compare_fuse=1, write_slba=0, write_nlba=1, write_data='5a', write_fuse=2)
Execute a fused compare and write command and get the results
- Parameters:
dut (XML_API) – Device object under test
compare_slba (int) – Starting LBA for compare command
compare_nlba (int) – Number of LBAs for compare command
compare_data (str) – Pattern to use for compare command
compare_fuse (int) – Value of FUSE field in Dword 0 for compare command
write_slba (int) – Starting LBA for write command
write_nlba (int) – Number of LBAs for write command
write_data (str) – Pattern to use for write command
write_fuse (int) – Value of FUSE field in Dword 0 for write command
- Return type:
A list containing status code and response for the compare and write commands
- verify_data_buffer(dut, data_pattern, nlb=1, slba=0)
Check status of the fused command
- Parameters:
dut (XML_API) – Device object under test
data_pattern (str) – Pattern to use in the I/O test
nlb (int) – Number of LBAs
slba (int) – Starting LBA
- Returns:
True or False
- Return type:
bool
DSSD_20_Controller_Reset_Test_Case.py
- This script will run the following tests:
Execute controller reset
Verify AQA, ASQ, ACQ, CMBMSC and PMRMSC registers didn’t change
Pass/Fail: Script passes if all tests pass
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
NVMeR-2
DSSD_20_Controller_Status_Ready_Test_Case.py
- This script will run the following tests:
Reset the controller by clearing CC.EN field to zero.
Enable the controller, CC.EN=1.
Device will set CSTS.RDY to 1 when it is ready.
Device should service ADMIN commands as soon as CSTS,RDY = 1.
Pass/Fail: Script passes if all tests pass
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
TTR-3/4
DSSD_20_Dataset_Management_Command_Verification_Test_Case.py
- The objectives of this test case are as follows:
Verify support for the Dataset Management command by checking bit-2 of the ONCS field in the Identify Controller dataset.
Verify the use of the Dataset Management command with Attribute = AD for deallocate.
Verify that data blocks that have been deallocated read back as 0s, 1s or unchanged based on the Adaptation data setting and DLFEAT.
Verify that after an unsafe power cycle, data blocks that have been deallocated continue to read back as 0s, 1s or unchanged.
Open Compute Project Datacenter NVMe SSD Spec v2.5 requirements referenced by this script:
NVMe-IO-2, OCP-TRIM-1/2/3
DSSD_20_Device_Capabilities_Log_Page_Test_Case.py
- This script will run the following tests:
NVMe Get Log Page Command with LID=C4h
NVMe Identify Command with CNS=01h
Verify number of physical PCIe ports matches the corresponding field in adaptation parameters
Verify bytes 1:0 of OOB Management Support field are correct
Verify bytes 1:0 of Write Zeroes Command Support field are correct
Verify bytes 1:0 of Sanitize Command Support field are correct
Verify bytes 1:0 of Dataset Management Command Support field are correct
Verify bytes 1:0 of Write Uncorrectable Command Support field are correct
Verify bytes 1:0 of Fused Operation Support field are correct
Verify various values for DSSD Power States
Pass/Fail: Script passes if all tests pass
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
DCLP-1 to DCLP-12
DSSD_20_Drive_Behavior_In_Case_Of_PLP_Failure_Test_Case.py
- This script will run the following tests:
Perform sequential write/read for five minutes
Inject PLP error
Record EOL-PLP setting
Perform sequential writes for one minute and verify pass/fail based on EOL-PLP setting
Recover the device from the error injection
Check drive performance after it recovers
Pass/Fail: Script passes if all tests pass
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
PLP-9
DSSD_20_Drive_State_After_Firmware_Activation_Without_Reset_Test_Case.py
Test objectives are to verify that Firmware activation without reset should not change Feature state and Log page contents.
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
FWUP-11
- 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_20_E1L_PCIe_Speed_And_Lane_Width_Test_Case.py
- This script will run the following tests:
Verify PCI Express Link Capabilities register (0Ch) lane width and speed
Verify PCI Express Link Status register (12h) lane width and speed
Pass/Fail: Script passes if all tests pass
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
FFE1L-2
DSSD_20_E1L_PWRDIS_Test_Case.py
- This script will run the following tests:
Assert PWRDIS and wait for device to shutdown
De-assert PWRDIS and wait for device to come up
Start sequential write I/O test and assert PWRDIS and wait for device to shutdown
De-assert PWRDIS and wait for device to come up
Run sequential read I/O test for 5 minutes and verify there are no miscompares
Run sequential write I/O test for 5 minutes
Run sequential read I/O test for 5 minutes
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_20_E1S_PCIe_Speed_And_Lane_Width_Test_Case.py
- This script will run the following tests:
Verify PCI Express Link Capabilities register (0Ch) lane width and speed
Verify PCI Express Link Status register (12h) lane width and speed
Pass/Fail: Script passes if all tests pass
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
FFE1S-2
DSSD_20_E1S_PWRDIS_Test_Case.py
- This script will run the following tests:
Assert PWRDIS and wait for device to shutdown
De-assert PWRDIS and wait for device to come up
Start sequential write I/O test and assert PWRDIS and wait for device to shutdown
De-assert PWRDIS and wait for device to come up
Run sequential read I/O test for 5 minutes and verify there are no miscompares
Run sequential write I/O test for 5 minutes
Run sequential read I/O test for 5 minutes
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_20_EUI64_And_NGUID_Test_Case.py
- This script will run the following tests:
Verify Number of Namespaces (NN) >= number of valid NSIDs (from Identify with CNS=2h)
Verify EUI64 and NGUID are both non-zero for each active namespace
Pass/Fail: Script passes if all tests pass
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
NVMe-CFG-7, NVMe-CFG-8
DSSD_20_Endianness_Verification_Test_Case.py
- This script will run the following tests:
Do GetLogPage for LID C0h
Check that byte 0 of Security Version Number and Log Page Version fields is correct
Verify Log Page GUID is correct
Pass/Fail: Script passes if all tests pass
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
SLOG-1/3/4/10, STD-LOG-23, SMART-1/2/12-28/30-33
DSSD_20_Endurance_Estimate_Test_Case.py
- This script will run the following tests:
Do GetLogPage for LID C0h and get Endurance Estimate field value
If endurance groups are supported, do GetLogPage for LID 9h and get Endurance Estimate field value
Verify both values are the same
Pass/Fail: Script passes if all tests pass
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
SLOG-1/3/4/10, STD-LOG-23, SMART-1/2/12-28/30-33
DSSD_20_Error_Information_Log_Page_Test_Case.py
- This script will run the following tests:
Get ELPE field
Do GetLogPage for LID 1h to get error count for each entry
Reset controller
Do IdentifyController
Do GetLogPage for LID 1h to get error count for each entry
Pass/Fail: Script passes if all tests pass
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
STD-LOG-1
DSSD_20_Error_Recovery_Log_Page_Test_Case.py
- This script will run the following tests:
Read Error Information log page to get recovery settings
Verify reserved fields and static fields and make sure device is in error free state
Record performance logs and set AEN before drive goes into error state
Inject error and recover the drive based on reset and recovery actions
Check drive performance after it recovers
Pass/Fail: Script passes if all tests pass
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
EREC-AEN-1, EREC-1 to EREC-15
DSSD_20_Failed_Sanitize_Operations_Test_Case.py
- This script will run the following tests:
Verify that the DUT shall fail all Sanitize commands received while a Firmware Activation is pending and shall return the same non-zero command completion status code that was sent for the firmware commit command when the status code is 0Bh or 10h. For all other Firmware Commit status codes the DUT shall fail the Sanitize Command with command completion status code 1 1h.
Verify that a failed Sanitize Operation can be successfully restarted once the reason for the previous failure is resolved.
Verify that if a DUT fails a Sanitize command for any reason it shall not perform any Sanitize operations and shall not update the Sanitize Status Log Page.
Verify that sending the Sanitize command with Sanitize Action = 001b while the DUT is in the Sanitize Operation failed state causes the DUT to exit the Sanitize Failed state.
Verify that if the DUT receives a Sanitize Command with Sanitize Action = 001b while the DUT is not in the Sanitize Failed state, the DUT shall successfully complete the command regardless of the state and regardless of any values in other Sanitize Command fields.
Verify that a Sanitize Command with an invalid Sanitize Action value received by the DUT the command shall be aborted with status Invalid Field in Command.
Verify that if a Sanitize command sent with Restricted Completion Mode fails, the failure can be recovered by sending another Sanitize command with Restricted Completion Mode and Sanitize Action = 001b. Sending another Sanitize command with Unrestricted Completion Mode shall be aborted with command status Sanitize Failed.
Verify that if a Sanitize command sent with Unrestricted Completion Mode fails, the failure can be recovered from by sending another Sanitize command with either Restricted or Unrestricted Completion Mode and Sanitize Action = 001b.
Pass/Fail: Script passes if all tests pass
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
NVMe v1.4b Section 5.14.1.16.2/5.21.1.23/5.24/8.15
- check_cmd_status(cmd_result, exp_err_code, fail_type='error')
Extract SC field from command results and verify if the value is correct or not
- Parameters:
cmd_result (dict) – Command output
exp_err_code (str) – Expected error code in the form (Xh)
fail_type (str) – Status to have the step end with (default is “error”)
- Returns:
sc_flag – True = Expected error code found, False = Expected error code not found
- Return type:
bool
- check_io_test_status(dut, test_id, wait, expected_fail)
Check I/O test status result
- Parameters:
test_id (str) – I/O testname
- Returns:
io_test_flag (bool) – False = test failed, True = test didn’t fail
expected_fail (bool) – If the I/O test should fail or not
- 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=False)
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 the test should fail or not
- Return type:
None
- steps21_27(dut, commit_action, slot_to_use, time_to_ready)
Runs test steps 21-27
- Parameters:
dut (XML_API) – Device object under test
commit_action (int) – Action for Firmware Commit command
slot_to_use (int) – Slot for Firmware Commit Command
time_to_ready (int) – Time to sleep as per DP-CFG-8 in the Adaptation parameters file
- Returns:
step_flag – If none of the steps failed
- Return type:
bool
- verify_data_buffer(dut, params, config, wait=7200, expected_fail=False)
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
wait (int) – How long to wait for a Sanitize to complete
expected_fail (bool) – If the I/O test should fail or not
- Return type:
None
DSSD_20_Fatal_Status_Test_Case.py
- This script will run the following tests:
Obtain CSTS.CFS and verify it’s set to zero
Pass/Fail: Script passes if register value is set to zero
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
NVMe-CFG-3
DSSD_20_Firmware_Slot_Information_Log_Page_Test_Case.py
- This script will run the following tests:
Get firmware slot info from LID 3h
Get FRMW from Identify Controller
Download and commit the previous firmware image to the starting firmware slot
Verify FRS field for appropriate slot in LID 3h matches the previous firmware image
Verify current and next active firmware slots in LID 3h
Do controller reset
Verify current firmware slot in LID 3h
Repeat steps 3-7 for all supported firmware slots
Commit the current firmware image to the current firmware slot
Clear firmware update history (FID C1h) and verify it’s successful
Pass/Fail: Script passes if all tests pass
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
STD-LOG-5, MS-CONF-6
- verify_slot(dut, start_fw_slot, PARAMS, prev_fw_fn)
Performs steps 10-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_20_Firmware_Update_Test_Case.py
Test objectives are to verify the following:
The firmware Commit command with Commit Action (CA) 000b, 001b, 010b and 011b are supported.
A minimum of 2 slots for firmware update shall be supported by verifying that the value of bits [3:1] in the Firmware Updates (FRMW) field is greater than or equal to 2.
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.
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
FWUP-3/4/6/7
- 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_20_Firmware_Update_Without_Data_Loss_Or_Destruction_Test_Case.py
- Test objectives are to verify the following:
Verify that the device supports repeated Firmware Downloads and Commit operations.
Verify that repeated Firmware Download and Commits shall not cause data to be lost or destroyed.
Pass/Fail: Script passes if all tests pass
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
FWUP-2/10
- download_commit(dut, prev_fw_fn, numd, alt_slot, start_step)
Display the value of a log page field, and if it’s a static value, verify it’s correct
- Parameters:
dut (XML_API) – Device object under test
prev_fw_fn (str) – Previous firmware filename
numd (int) – Value of NUMD
alt_slot (int) – Alternate firmware slot
start_step (int) – Number of the first test step in the function
- Return type:
None
- 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_20_Format_NVM_Crypto_Erase_Test_Case.py
- This script will run the following tests:
Verify support for Format NVM command
Get and save current LBA size
Precondition namespace
Start Format NVM command (SES=2)
Verify format command has ended
Verify the Format NVM results
Pass/Fail: Script passes if all tests pass
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
NVMe-AD-2/5, SEC-4, NVMe Format NVM Command 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_20_Format_NVM_No_Secure_Erase_Test_Case.py
- This script will run the following tests:
Verify support for Format NVM command
Get and save current LBA size
Precondition namespace
Start Format NVM command (SES=0)
Verify format command has ended
Verify the Format NVM results
Pass/Fail: Script passes if all tests pass
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
NVMe-AD-2/5, SEC-4, NVMe Format NVM Command 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_20_Format_NVM_User_Data_Erase_Test_Case.py
- This script will run the following tests:
Verify support for Format NVM command
Determine if the controller will use crypto erase instead of user data erase
Get and save current LBA size
Precondition namespace
Start Format NVM command (SES=1)
Verify format command has ended
Verify the Format NVM results
Pass/Fail: Script passes if all tests pass
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
NVMe-AD-2/5, SEC-4, NVMe Format NVM Command 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_20_Get_Set_Feature_C6_PLP_Health_Check_Interval_Test_Case.py
- This script will run the following tests:
Get factory default value of feature PLP Health Check Interval (0xC6) and it should be 000Fh.
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.
Current and saved state should be Xh even after drive goes through power cycle.
Default state should be 000Fh.
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.
Current and saved state should be 0h even after drive goes through power cycle.
Default state should be 000Fh.
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.
Current and saved state should be 000Fh even after drive goes through power cycle.
Default state should be 000Fh.
If setting this feature is not supported by the controller then a status error code of 0x2 (Invalid Field in Command) shall be returned.
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.
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.
Check the current state of 0xC6 with sel=00b and it should match with Interval selection made with set feature.
Check the saved state of 0xC6 with sel=10b.
If this feature is not supported by the controller, then a status error code of 0x2 (Invalid Field in Command) shall be returned
Pass/Fail: Script passes if all tests pass
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
SPLPI-1 to SPLPI-15, GPLPI-1/2, GETF-1/2, PLP-7
DSSD_20_IEEE1667_Feature_Test_Case.py
- This script will run the following tests:
Check default state of IEEE1667 from Adaptation Parameter File
Disable/Enable IEEE1667 Silo, check from get feature that current state and saved state match
Check again after power cycle
Default state should match
Reverse state of IEEE1667 (Disable/Enable), check from get feature that current state and saved state match
Check again after power cycle
Default state should match
Pass/Fail: Script passes if all tests pass
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
S1667-1 to S1667-15, GETF-1/2
DSSD_20_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:
That when executing a stressing I/O workload over the course of 1 hour no single I/O takes longer than 8s to complete.
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.
- check_io_test_status(dut, test_id)
Check I/O test status result
- Parameters:
dut (XML_API) – Device object under test
test_id (str) – I/O testname
- Returns:
io_test_flag – 0 = test failed, 1 = test didn’t fail
- Return type:
int
- get_sb_filter_timestamp(dut, test_id, timestamp_type)
Get the starting or ending timestamp and format it for use in sb_filter
- Parameters:
dut (XML_API) – Device object under test
test_id (str) – I/O testname
timestamp_type (str) – “StartTime” or “EndTime”
- Returns:
timestamp – Timestamp formatted for sb_filter
- Return type:
str
DSSD_20_Incomplete_Shutdown_Test_Case.py
- This script will run the following tests:
Perform sequential write and read for five minutes and collect performance logs
Issue GetLogPage for LID 2h and check Critical Warning bits 3-4
Issue GetLogPage for LID C0h and record Incomplete Shutdowns field
Create INCS scenario on the drive
Perform 4KB random writes with a queue depth of 128
Issue Identify command and verify it passes
Issue GetLogPage for LID C0h and check Incomplete Shutdowns field
Issue GetLogPage for LID 2h and check Critical Warning bit 3
Issue GetLogPage for LID C1h and check various fields
Perform sequential writes and verify they fail
Perform sequential reads and check if they pass or fail
Format the drive
Set CC.EN=1
Issue GetLogPage for LID C1h and check Panic ID field
Issue Identify command and verify it passes
Perform sequential write and read for five minutes and collect performance logs
Pass/Fail: Script passes if all tests pass
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
INCS-1/4/5/6
DSSD_20_Little_Endian_Verification_Test_Case.py
- This script will run the following tests:
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
Issue four write and read commands, each with 251 blocks
Power cycle the drive
Do GetLogPage for LID 2h and verify Data Units Read/Written and Host Read/Write Commands values increased by at least 1
Surprise power cycle the drive
Do GetLogPage for LID 2h and verify Power Cycle Count and Unsafe Shutdowns values increased by at least 1
Perform 4KB random reads and writes for 65 minutes
Do GetLogPage for LID 2h and verify Power On Hours value increased by at least 1
Verify Controller Busy Time value stayed the same or increased by at least 1
Pass/Fail: Script passes if all tests pass
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
STD-LOG-2/3, SLOG-1/3/4/5/10/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_20_Low_Power_Modes_Requirements_Test_Case.py
- This script will run the following tests:
If Active State Power Management (ASPM) is supported, the default firmware state shall be disabled. Verify this by reading ASPMS and ASPMC.
Pass/Fail: Script passes if all tests pass
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
LPWR-1
DSSD_20_M2_PCIe_Speed_And_Lane_Width_Test_Case.py
- This script will run the following tests:
Verify PCI Express Link Capabilities register (0Ch) lane width and speed
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_20_Maximum_Data_Transfer_Size_Test_Case.py
- This script will run the following tests:
Verify MDTS >= 256KB
Verify NPWG and NOWS <= MDTS
Do Write commands with transfer size < MDTS, = MDTS and > MDTS
Pass/Fail: Script passes if all tests pass
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
NVMe-CFG-2
DSSD_20_NVMe_Commands_Received_During_Sanitize_Operation_Test_Case.py
The objectives for the Commands Prohibited During Sanitize Operation test case are to verify the following:
Once the Sanitize Operation begins, the device shall abort any active or subsequently received commands that are not allowed during Sanitize Operations with status Sanitize in Progress. Refer to the Commands Supported Table below for commands that are allowed and prohibited.
Once the Sanitize Operation begins, the device successfully completed any active or subsequently received commands that are allowed during Sanitize Operations. Refer to the Commands Supported Table below for commands that are allowed and prohibited.
That while in the Sanitize Failed state, the DUT aborts all commands submitted that are prohibited during a Sanitize Operation with status Sanitize Failed. Note that supporting this will require error injection capability.
That all Admin/NVM commands not allowed during a sanitize operation also are aborted while the DUT is in a sanitize failed state.
Once the DUT exits the Sanitize Failed state it shall successfully complete all supported commands received including those that are prohibited during Sanitize Operations.
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
NVMe v1.4b Section 8.15.1
- check_cmd_status(cmd_result, exp_err_code, fail_type='error')
Extract SC field from command results and verify if the value is correct or not
- Parameters:
cmd_result (dict) – Command output
exp_err_code (str) – Expected error code in the form (Xh)
fail_type (str) – Status to have the step end with (default is “error”)
- Returns:
sc_flag – True = Expected error code found, False = Expected error code not found
- 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
- 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=False)
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 the test should fail or not
- Return type:
None
- restart_sanitize(dut, sanact)
Restart sanitize operation if it has completed
- Parameters:
dut (XML_API) – Device object under test
sanact (bin) – Sanitize action to use when starting sanitize operation
- Return type:
None
- send_and_check_sanitize(dut, sanact)
Sends a sanitize command and checks for its completion
- Parameters:
dut (XML_API) – Device object under test
sanact (int) – Sanitize CDW10
- Return type:
None
- verify_io_status(dut, 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
- wait_for_sanitize(dut, end_time)
Polls the Sanitize Log Page until the Sanitize operation is completed
- Parameters:
dut (XML_API) – Device object under test
end_time (int) – The max time to wait for a Sanitize operation to complete
- Returns:
Sanitize status
- Return type:
int
DSSD_20_Namespace_Attachment_Command_Verification_Test_Case.py
- This script will run the following tests:
Verify Identify data appropriately updates based on current state of namespaces.
Verify that when attaching an namespace to a controller that it shifts to active.
Verify that when deleting an attached namespace from an controller that it shifts to inactive.
Verify maximum allowed namespaces can be created, attached, and appropriate Identify data reflects changes.
Based on support, see if EUI64 and NGUID differs from stored namespace data of vendor parameters file.
Pass/Fail: Script passes if all tests pass
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
NVMe-AD-4, NUSE-1, NSM-1/2/3/4/5/6/7
- check_contains_0s(nsid_list, struct_type)
Checks on either the returned Active or Allocated Namespace List
- nsid_list: dict
Either an Actice NS ID List or an Allocated NS ID List
- struct_type: str
The String name associated with the command, intended for log printing
- Return type:
None
- namespace_management(dut, id_ns, sel, format_index, mset, new_ns_capacity=0, max_ns_count=1, is_private=0, pi=0, pil=0)
Helper function to create a new Namespace with specific field information
- Parameters:
dut (XML) – Device object under test
id_ns (dict) – Identify Namespace command dictionary
sel (int) – Select Field for namespace management action
new_ns_capacity (int) – Create Size capacity
max_ns_count (int) – Count of namespaces to be made
format_index (int) –
mset (int) – Metadata Settings
is_private (int) – Determines if namespace is private or not
pi (int) – Protection Information
pil (int) – Protection Information Location
- Returns:
create_Namespace
- Return type:
dict
DSSD_20_Namespace_Management_Command_Verification_Test_Case.py
- This script will run the following tests:
Verify ability to create maxmimum allowed namespaces on DUT, accounting for NS Granularity
Verify namespace management behavior across all namespaces.
Verify Identify data updates accordingly with unattached namespaces.
Pass/Fail: Script passes if all tests pass
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
NVMe-AD-3, NSM-1/2/3/4/5/6/7
- namespace_management(dut, id_ns, sel, format_index, mset, new_ns_capacity=0, max_ns_count=1, is_private=0, pi=0, pil=0)
Helper function to create a new Namespace with specific field information
- Parameters:
dut (XML) – Device object under test
id_ns (dict) – Identify Namespace command dictionary
sel (int) – Select Field for namespace management action
new_ns_capacity (int) – Create Size capacity
max_ns_count (int) – Count of namespaces to be made
format_index (int) –
mset (int) – Metadata Settings
is_private (int) – Determines if namespace is private or not
pi (int) – Protection Information
pil (int) – Protection Information Location
- Returns:
create_Namespace
- Return type:
dict
DSSD_20_Namespace_Support_Test_Case.py
- This script will run the following tests:
Issue Identify command with CNS = 1 and verify MNAN/NN values
Issue Identify command with CNS = 2 and verify active NSID list contains one NSID
Issue Identify command with CNS = 0
Verify MaxBlks = NSZE = NCAP
Pass/Fail: Script passes if all tests pass
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
SECTOR-3
DSSD_20_PCIe_Max_Payload_Size_Requirements_Test_Case.py
- This script will run the following tests:
Verify PCI express Device Capabilities register (04h) max payload size
Verify PCI Express Link Status register (08h) max read request size through power cycle
Pass/Fail: Script passes if all tests pass
- Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
PCI-1
DSSD_20_PCIe_Resets_Requirements_Test_Case.py
- This script will run the following tests:
While I/O is running, issue FLR for multiple instances and verify that the drive recovers and that I/O is still running
Issue cold reset for multiple instances and verify that the drive recovers
Issue warm reset for multiple instances and verify drive recovers
While I/O is running, issue hot reset for multiple instances and verify that the drive recovers and that I/O is still running
Pass/Fail: Script passes if all tests pass
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
PCI-5/6
DSSD_20_PCIe_TLP_Completion_Timeout_Requirements_Test_Case.py
- This script will run the following tests:
The TLP completion timeout is programmable to different supportable ranges by programming the timeout to a different subset range.
Disable the TLP completion timeout and verify that it was successful.
Pass/Fail: Script passes if all tests pass
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
PCI-2/3/4
DSSD_20_PERST_Test_Case.py
- This script will run the following tests:
Assert and de-assert PERST on the drive
Verify CSTS.RDY transitions to 0 within one second
Verify Identify command is successful
Perform sequential write and read for five minutes and collect performance logs
Pass/Fail: Script passes if all tests pass
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
TTR-20
DSSD_20_PLP_Start_Count_Test_Case.py
- This script will run the following tests:
Do GetLogPage for LID C0h and get PLP Start Count field value
Power cycle the drive
Do GetLogPage for LID C0h and get PLP Start Count field value and verify it increased by 1
Pass/Fail: Script passes if all tests pass
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
SLOG-1/3/4/10, STD-LOG-23, SMART-1/2/12-28/30-33
DSSD_20_Persistent_Event_Log_Page_Test_Case.py
- This script will run the following tests:
Verify that reading the Persistent Event Log page is supported by a device.
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.
- Verify that the Supported Events Bitmap field has bits set to 1 indicating support that the following event logs:
Thermal Excursion Event
Telemetry Log Create Event
Sanitize Completion Event
Sanitize Start Event
Format NVM Completion Event
Format NVM Start Event
Change Namespace Event
NVM Subsystem Hardware Error Event
Power-on or Reset Event
Timestamp Change Event
Firmware Commit Event
SMART / Health Log Snapshot Event
Power Cycle the drive and then perform Controller Level Reset on drive. Verify that these two actions have increased the “Total Number of Events” field in Log Page data.
Verify that mandatory events that occur while a reporting context is active are not reported in that reporting context.
Verify that mandatory events that occur while a reporting context is not active are reported when the next reporting context is created.
Pass/Fail: Script passes if all tests pass
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
STD-LOG-9/10
DSSD_20_Physical_Media_Units_Test_Case.py
- This script will run the following tests:
Do GetLogPage for LID C0h and get physical media units written and read values
Perform 128KB sequential writes for 5 minutes
Perform 128KB sequential reads for 5 minutes
Do GetLogPage for LID C0h and verify physical media units written and read values increased
Pass/Fail: Script passes if all tests pass
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
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_20_Power_State_Change_Count_Test_Case.py
- This script will run the following tests:
Verify Power State Change Count reported in the SMART/Health Information Extended Log has increased by the number of NVMe Power state changes
Verify Power State Change Count reported in the SMART/Health Information Extended Log has increased by the number of DSSD Power State changes
Pass/Fail: Script passes if all tests pass
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
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_20_Queue_Depth_And_IO_Queue_Pairs_Test_Case.py
- This script will run the following tests:
Verify SQES and CQES values
Verify CC.IOSQES and CC.IOCQES values
Create 64 queues with a queue depth of 1024
Verify CAP.MQES value
Get CAP.CQR value
Create 64 queues with a queue depth of 1024 and Physical Contiguous bit = CAP.CQR
Pass/Fail: Script passes if all tests pass
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
NVMe-CFG-5, NVMe-CFG-6
DSSD_20_Read_Only_Or_Write_Through_Mode_Test_Case.py
- This script will run the following tests:
Issue an NVMe Get-Feature command with FID = C2h with the SEL field set to the following: 01b, 11b, 00b, 10b
Issue an NVMe Set-Feature command with FID = C2h, setting Dword11 field to the following: 10b, 01b
Power Cycle device
Pass/Fail: Script passes if all tests pass
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
ROWTM-1, SROWTM-1 to SROWTM-15, GROWTM-1 to GROWTM-15, GETF-1/2
- check_set_feature_result(dut, set_feature_cmd, fid, sv=0, data=None, cdw11=None)
Receives the values stored in a Set-Feature Log, and verifies the feature command’s execution
- Parameters:
dut (XML_API) – Device object under test
set_feature_cmd (dict) – Set-Feature command output
fid (int) – FID field value for the set-feature command
sv (int) – The Selection field for the set-feature command
data (int|None) – Data Pointer for the Set-feature, intended for original set-feature value at start of test
cdw11 (int|None) – Command DWord 11 for the Set-Feature, intended for original set-feature value at start of test
- Return type:
None
DSSD_20_SMBus_Data_TTR_Verification_Test_Case.py
- This script will run the following tests:
Do a power cycle
Get timestamp
Poll MI Basic subsystem management data structure command code 0 until it’s successful
Get timestamp
Verify MI Basic subsystem management data structure command code 0 info is correct
Verify difference between timestamps is within CAP.TO
Repeat steps 1-6 using controller reset
Repeat steps 1-6 using NSSR
Repeat steps 1-6 using FLR
Pass/Fail: Script passes if all info is correct
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
SMBUS-1/2/3/4/7/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
DSSD_20_SMBus_Data_Verification_256_Bytes_Test_Case.py
- This script will run the following tests:
Get MI Basic subsystem management data structure with offset 0 and length 154 bytes
Get MI Basic subsystem management data structure with offset 154 and length 102 bytes
Verify various fields return correct info
Pass/Fail: Script passes if all info is correct
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
SMBUS-1/2/3/5/6/9/10
DSSD_20_SMBus_Data_Verification_Cmd_Code_0_Test_Case.py
- This script will run the following tests:
Get MI Basic subsystem management data structure command code 0 and verify it returns correct info
Pass/Fail: Script passes if all info is correct
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
SMBUS-1/2/3/9/10
DSSD_20_SMBus_Data_Verification_Cmd_Code_154_Test_Case.py
- This script will run the following tests:
Get MI Basic subsystem management data structure command code 154 and verify it returns correct info
Pass/Fail: Script passes if all info is correct
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
SMBUS-1/2/3/8/9/10
DSSD_20_SMBus_Data_Verification_Cmd_Code_167_Test_Case.py
- This script will run the following tests:
Get MI Basic subsystem management data structure command code 167 and verify it returns correct info
Pass/Fail: Script passes if all info is correct
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
SMBUS-1/2/3/9/10
DSSD_20_SMBus_Data_Verification_Cmd_Code_242_Test_Case.py
- This script will run the following tests:
Get MI Basic subsystem management data structure command code 242 and verify it returns correct info
Pass/Fail: Script passes if all info is correct
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
SMBUS-1/2/3/5/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_20_SMBus_Data_Verification_Cmd_Code_248_Test_Case.py
- This script will run the following tests:
Get MI Basic subsystem management data structure command code 248 and verify it returns correct info
Pass/Fail: Script passes if all info is correct
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
SMBUS-1/2/3/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_20_SMBus_Data_Verification_Cmd_Code_32_Test_Case.py
- This script will run the following tests:
Get MI Basic subsystem management data structure command code 32 and verify it returns correct info
Pass/Fail: Script passes if all info is correct
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
SMBUS-1/2/3/9/10
DSSD_20_SMBus_Data_Verification_Cmd_Code_50_Test_Case.py
- This script will run the following tests:
Get MI Basic subsystem management data structure command code 50 and verify it returns correct info
Pass/Fail: Script passes if all info is correct
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
SMBUS-1/2/3/9/10
DSSD_20_SMBus_Data_Verification_Cmd_Code_8_Test_Case.py
- This script will run the following tests:
Get MI Basic subsystem management data structure command code 8 and verify it returns correct info
Pass/Fail: Script passes if all info is correct
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
SMBUS-1/2/3/9/10
DSSD_20_SMBus_Data_Verification_Cmd_Code_90_Test_Case.py
- This script will run the following tests:
Get MI Basic subsystem management data structure command code 90 and verify it returns correct info
Pass/Fail: Script passes if all info is correct
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
SMBUS-1/2/3/4/9/10, FB-CONF-6, MS-CONF-6
DSSD_20_SMBus_Data_Verification_Cmd_Code_96_Test_Case.py
- This script will run the following tests:
Get MI Basic subsystem management data structure command code 96 and verify it returns correct info
Pass/Fail: Script passes if all info is correct
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
SMBUS-1/2/3/9/10
DSSD_20_SMBus_Firmware_Update_Verification_Test_Case.py
- This script will run the following tests:
Verify disabling Firmware Update using Basic Management SMBus Block Write command and verifying using SMBus Read Byte command.
Verify enabling Firmware Update using the SMBus Write Byte protocol
Pass/Fail: Script passes if all info is correct
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
SMBUS-1/3/4/5/6/7/9/10, FB-CONF-6, MS-CONF-6
DSSD_20_SMBus_Invalid_Transaction_Test_Case.py
- This script will run the following tests:
Send the NVMe Basic Management Block Read command with any invalid SMBus slave address
Verify that NVMe Basic Management command does not complete successfully
Pass/Fail: Script passes if all info is correct
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
SMBUS-1/2/3/4/7/9/10
DSSD_20_SMBus_Secure_Boot_Failure_Verification_Test_Case.py
- This script will run the following tests:
Get MI Basic subsystem management data structure command code 242 and verify it returns correct info
Inject secure boot failure
Power cycle the drive
Issue Identify command and verify it passes
Get MI Basic subsystem management data structure command code 242 and verify it returns correct info
Get MI Basic subsystem management data structure command code 0 and verify it returns correct info
Power cycle the drive
Issue Identify command and verify it passes
Pass/Fail: Script passes if all tests pass
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
SMBUS-1/3/5/6/9/10
DSSD_20_Sanitize_Operation_Block_Erase_Test_Case.py
The objectives for the Sanitize Operation Block Erase test case are to verify the following:
That the device properly indicates support for the Sanitize Block Erase operation in Identify Controller data.
That the Sanitize Status Log Page correctly reports the Sanitize Operation status.
That the Sanitize command completed successfully.
That the Sanitize Operation Block Erase completed successfully.
That if AERs are submitted and AENs enabled by the host, the device sends a correctly formatted AEN to the host on successful completion of the sanitize operation.
When the Sanitize Operation is completed successfully the previously written namespace data cannot be read back.
That reads to sanitized LBAs complete successfully and return data that is all 0s or 1s (FFFFFFFFh) regardless of whether the LBAs were previously written, unwritten, or deallocated.
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
NVMe-AD-7/8/9, SEC-4, NVMe v2.0d Section 5.14.1.16.2/5.21.1.23/5.24/8.15
- exit_sanitize_failure(dut)
Performs the necessary steps to exit sanitize failure mode
DSSD_20_Sanitize_Operation_Crypto_Erase_Test_Case.py
The objectives for the Sanitize Operation Crypto Erase test case are to verify the following:
That the device properly indicates support for the Sanitize Crypto Erase operation in Identify Controller data.
That the Sanitize Status Log Page correctly reports the Sanitize Operation status.
That the Sanitize command completed successfully.
That the Sanitize Operation Crypto Erase completed successfully.
That if AERs are submitted and AENs enabled by the host, the device sends a correctly formatted AEN to the host on successful completion of the sanitize operation.
When the Sanitize Operation Crypto Erase is completed successfully the previously written namespace data cannot be read back.
That reads of sanitized LBAs complete successfully and return data that is randomized garbage regardless of whether the LBA were previously written, unwritten, or deallocated.
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
NVMe-AD-7/8/9, SEC-4, NVMe v2.0d Section 5.14.1.16.2/5.21.1.23/5.24/8.15
- exit_sanitize_failure(dut)
Performs the necessary steps to exit sanitize failure mode
DSSD_20_Sanitize_Operation_Overwrite_Erase_Test_Case.py
The objectives for the Sanitize Operation Overwrite Erase test case are to verify the following:
That, if supported, the device properly indicates support for the Sanitize Overwrite Erase operation in Identify Controller data and as per Adaptation data.
That the Sanitize Status Log Page correctly reports the Sanitize Operation status.
That the Sanitize command completed successfully.
That the Sanitize Operation Overwrite Erase completed successfully.
That if AERs are submitted and AENs enabled by the host, the device sends a correctly formatted AEN to the host on successful completion of the sanitize operation.
If the Sanitize Operation Overwrite Erase is completed successfully, the previously written namespace data cannot be read back.
That reads to sanitized LBAs return data that matches the overwrite pattern used regardless of whether the LBA were previously written, unwritten, or deallocated.
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
NVMe-AD-7/8/9, SEC-4, NVMe v2.0d Section 5.14.1.16.2/5.21.1.23/5.24/8.15
- exit_sanitize_failure(dut)
Performs the necessary steps to exit sanitize failure mode
DSSD_20_Sector_Size_Test_Case.py
- This script will run the following tests:
The device supports both 512-byte and 4096-byte sector sizes
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.0 requirements referenced by this script:
SECTOR-4, MS-CONF-1/2, NSM-2/3
DSSD_20_Security_Version_Number_Test_Case.py
- This script will run the following tests:
Do GetLogPage for LID C0h
Check Security Version field against parameterization data
Pass/Fail: Script passes if all tests pass
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
SLOG-1/3/4/10, STD-LOG-23, SMART-1/2/12-28/30-33
DSSD_20_Shutdown_Notification_And_Status_Test_Case.py
- This script will run the following tests:
Do Identify Controller and verify it’s successful
Check RTD3 Entry Latency field value
Execute normal shutdown process and verify CC.SHN and CSTS.SHST values
Execute abrupt shutdown process and verify CC.SHN and CSTS.SHST values
Pass/Fail: Script passes if all tests pass
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
TTR-5/6
DSSD_20_Subsystem_Reset_Test_Case.py
- This script will run the following tests:
Execute NSSR
Pass/Fail: Script passes if NSSR is successful
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
NVMeR-1
- steps_1_8(dut)
Allows steps 1-8 to easily loop
- Parameters:
dut (XML_API) – Device object under test
- Returns:
nssro (int) – CSTS.NSSRO register bit value
cap_to – Controller Timeout, converted to seconds
DSSD_20_TCG_Operation_Execution_Time_Verification_Test_Case.py
TCG Operation Execution Time Verification Test Case:
For the TCG operations listed in Table 5, the CTO test objectives are to verify that each validly formatted TCG command completed successfully within 10 seconds under the following scenarios:
Host level TCG commands executed sequentially resulting in TCG Operations being sent to DUT via Security Send/Receive commands,
Host level TCG commands issued in the presence of a stressing background I/O workload.
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
CTO-1
DSSD_20_Time_To_Admin_And_IO_Ready_Test_Case.py
- This script will run the following tests:
Disable the controller by setting CC.EN=0
Enable the controller by setting CC.EN=1
Verify that the device responds to identify command and read/write commands within Time defined by DP-CFG-8 and DP-CFG-9, respectively
Pass/Fail: Script passes if all tests pass
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
TTR-1/2
DSSD_20_Total_NUSE_Test_Case.py
- This script will run the following tests:
Precondition the device to have a single namespace
Verify that the values of NUSE in Identify Namespace and Total NUSE in LID C0h are the same
Calculate the temporary namespace capacity to use, factoring in the namespace granularity descriptor size
Delete the namespace
Create, attach and write to namespaces, from 1 to MNAN/NN value
Power cycle the device and delay for 10 minutes
Verify that the Total NUSE value reported in LID C0h is equal to the value of total NUSE summed over all the namespaces created
Delete all of the namespaces
Create and attach a new namespace
Pass/Fail: Script passes if all tests pass
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
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_20_UUID_Test_Case.py
- This script will run the following tests:
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
Verify that sending Get/Set Feature commands with vendor unique FIDs and the UUID index = matching UUID Index complete successfully.
Verify that Get/Set Feature commands with valid vendor unique FIDs and UUID index = 0 complete successfully.
Verify that Get/Set Feature commands with valid vendor unique FIDs and UUID index = invalid index fail with Invalid Field in Command status.
Verify that the Get Log Page commands with valid vendor unique LIDs and the UUID index = matching UUID Index complete successfully.
Verify that the Get Log Page commands with valid vendor unique LIDs and the UUID index = 0 complete successfully.
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.0 requirements referenced by this script:
UUID-1/2/3/4/5
- get_latency_monitor_values(dut, get_log_c3_input=None)
Receives the values stored in a Latency Monitoring Log (C3h), returning each field
- Parameters:
dut (XML_API) – Device object under test
get_log_c3_input (dict) – Latency Monitor Log Page dictionary
- Returns:
data – Value of all lmdata fields
- Return type:
int
- issue_get_features(dut, uuid_index, 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, 0xC6, 0xC7
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_20_Unaligned_IO_Test_Case.py
- This script will run the following tests:
Power cycle the device
Do GetLogPage for LID C0h and verify Unaligned I/O field is 0
Send 10 4KB sequential write I/O commands starting at LBA 1
Do GetLogPage for LID C0h and verify Unaligned I/O field increased by at least 10
Power cycle the device
Do GetLogPage for LID C0h and verify Unaligned I/O field is 0
Pass/Fail: Script passes if all tests pass
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
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_20_Unsafe_Shutdowns_Verification_Test_Case.py
- This script will run the following tests:
Do GetLogPage for LID 2h and get Unsafe Shutdowns field value
Surprise power cycle the drive 10 times
Do GetLogPage for LID 2h and get Unsafe Shutdowns field value and verify it increased by 1
Pass/Fail: Script passes if all tests pass
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
STD-LOG-2/3, SLOG-1/3/4/5/10/11
DSSD_20_Unsupported_Command_Verification_Test_Case.py
- This script will run the following tests:
Verify reserved Admin and NVM opcodes in the table return an “invalid command opcode” error
Verify unsupported optional Admin and NVM opcodes in the table return an “invalid command opcode” error
Verify unsupported vendor unique Admin opcodes in the table return an “invalid command opcode” error
Verify every supported vendor unique Admin opcode that requires challenge-response action to unlock returns an error
Verify unsupported vendor unique NVM in the table return an “invalid command opcode” error
Verify every supported vendor unique NVM that requires challenge-response action to unlock returns an error
Pass/Fail: Script passes if all tests pass
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
SEC-19
- check_opcode_optional(dut, opcode_list, admin_nvm_flag, num_cmds_supp, cmds_supp, cmds_supp_len)
Verify unsupported optional opcode returns INVALID_OPCODE error
- Parameters:
dut (XML_API) – Device object under test
opcode_list (list) – List of opcodes (in integer format) to loop through
admin_nvm_flag (int) – 0 = Execute Admin command, 1 = Execute NVM command
num_cmds_supp (int) – Value of NUM_OPT_ADM_CMDS_SUPPORTED or NUM_OPT_NVM_CMDS_SUPPORTED
cmds_supp (list) – List of OPT_ADM_CMD_OPCODES or OPT_NVM_CMD_OPCODES
cmds_supp_len (int) – Length of OPT_ADM_CMD_OPCODES or OPT_NVM_CMD_OPCODES
- Return type:
None
- check_opcode_reserved(dut, nvme_ver, opcode_list, admin_nvm_flag)
Verify reserved opcode returns INVALID_OPCODE error
- Parameters:
dut (XML_API) – Device object under test
nvme_ver (int) – NVMe version supported by the controller
opcode_list (list) – List of opcodes (in integer format) to loop through
admin_nvm_flag (int) – 0 = Execute Admin command, 1 = Execute NVM command
- Return type:
None
- check_opcode_vendor_unique(dut, opcode_list, admin_nvm_flag, num_cmds_supp, cmds_supp, cmds_supp_len, num_req_cra_cmds_supp, req_cra_cmds_supp, req_cra_cmds_supp_len)
Verify unsupported vendor unique opcode returns INVALID_OPCODE error
- Parameters:
dut (XML_API) – Device object under test
opcode_list (list) – List of opcodes (in integer format) to loop through
admin_nvm_flag (int) – 0 = Execute Admin command, 1 = Execute NVM command
num_cmds_supp (int) – Value of NUM_OPT_ADM_CMDS_SUPPORTED or NUM_OPT_NVM_CMDS_SUPPORTED
cmds_supp (list) – List of OPT_ADM_CMD_OPCODES or OPT_NVM_CMD_OPCODES
cmds_supp_len (int) – Length of OPT_ADM_CMD_OPCODES or OPT_NVM_CMD_OPCODES
num_req_cra_cmds_supp (int) – Value of NUM_VU_ADMIN_CMDS_SUP_REQ_CRA or NUM_VU_NVM_CMDS_SUP_REQ_CRA
req_cra_cmds_supp (list) – List of VU_ADMIN_CMD_OPC_VALS_REQ_CRA or VU_NVM_CMD_OPC_VALS_REQ_CRA
req_cra_cmds_supp_len (int) – Length of VU_ADMIN_CMD_OPC_VALS_REQ_CRA or VU_NVM_CMD_OPC_VALS_REQ_CRA
- Return type:
None
- check_opcode_vendor_unique_locked(dut, num_req_cra_cmds_supp, req_cra_cmds_supp, admin_nvm_flag)
Verify unsupported vendor unique LID returns an error
- Parameters:
dut (XML_API) – Device object under test
num_req_cra_cmds_supp (int) – Value of NUM_VU_ADMIN_CMDS_SUP_REQ_CRA or NUM_VU_NVM_CMDS_SUP_REQ_CRA
req_cra_cmds_supp (list) – List of VU_ADMIN_CMD_OPC_VALS_REQ_CRA or VU_NVM_CMD_OPC_VALS_REQ_CRA
admin_nvm_flag (int) – 0 = Execute Admin command, 1 = Execute NVM command
- Return type:
None
- print_cmds_supp_hex(param_name, cmds_supp_hex, cmds_supp_len_hex)
Print a hexadecimal list of controller-supported opcodes
- Parameters:
param_name (str) – Parameter name (e.g. OPT_ADM_CMD_OPCODES or OPT_NVM_CMD_OPCODES or VU_ADM_CMD_OPCODES or VU_NVM_CMD_OPCODES or VU_ADMIN_CMD_OPC_VALS_REQ_CRA or VU_NVM_CMD_OPC_VALS_REQ_CRA)
cmds_supp_hex (list) – List of OPT_ADM_CMD_OPCODES or OPT_NVM_CMD_OPCODES or VU_ADM_CMD_OPCODES or VU_NVM_CMD_OPCODES or VU_ADMIN_CMD_OPC_VALS_REQ_CRA or VU_NVM_CMD_OPC_VALS_REQ_CRA
cmds_supp_len_hex (int) – Length of OPT_ADM_CMD_OPCODES or OPT_NVM_CMD_OPCODES or VU_ADM_CMD_OPCODES or VU_NVM_CMD_OPCODES or VU_ADMIN_CMD_OPC_VALS_REQ_CRA or VU_NVM_CMD_OPC_VALS_REQ_CRA
- Return type:
None
DSSD_20_Unsupported_Feature_Verification_Test_Case.py
- This script will run the following tests:
Do GetFeatures and SetFeatures for every reserved FID in the table and verify “invalid field” error is returned
Do GetFeatures and SetFeatures for every unsupported optional FID in the table and verify “invalid field” error is returned
Do GetFeatures and SetFeatures for every unsupported vendor unique FID in the table and verify “invalid field” error is returned
Do GetFeatures and SetFeatures for every supported vendor unique FID that requires challenge-response action to unlock and verify an error is returned
Pass/Fail: Script passes if all tests pass
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
SEC-19
- check_fid_optional(dut, fid_list, num_fids_supp, fids_supp, fids_supp_len)
Verify unsupported optional FID returns INVALID_FIELD error
- Parameters:
dut (XML_API) – Device object under test
fid_list (list) – List of FIDs (in integer format) to loop through
num_fids_supp (int) – Value of NUM_OPT_FIDS_SUPPORTED
fids_supp (list) – List of OPT_FIDS_SUPPORTED
fids_supp_len (int) – Length of OPT_FIDS_SUPPORTED
- Return type:
None
- check_fid_reserved(dut, nvme_ver, fid_list)
Verify reserved FID returns INVALID_FIELD error
- Parameters:
dut (XML_API) – Device object under test
nvme_ver (int) – NVMe version supported by the controller
fid_list (list) – List of FIDs (in integer format) to loop through
- Return type:
None
- check_fid_vendor_unique(dut, fid_list, num_fids_supp, fids_supp, fids_supp_len, num_req_cra_fids_supp, req_cra_fids_supp, req_cra_fids_supp_len)
Verify unsupported vendor unique FID returns INVALID_FIELD error
- Parameters:
dut (XML_API) – Device object under test
fid_list (list) – List of FIDs (in integer format) to loop through
num_fids_supp (int) – Value of NUM_VU_FIDS_SUPPORTED
fids_supp (list) – List of VU_FIDS_SUPPORTED
fids_supp_len (int) – Length of VU_FIDS_SUPPORTED
num_req_cra_fids_supp (int) – Value of NUM_VU_FIDS_SUP_REQ_CRA
req_cra_fids_supp (list) – List of VU_FID_VALS_REQ_CRA
req_cra_fids_supp_len (int) – Length of VU_FID_VALS_REQ_CRA
- Return type:
None
- check_fid_vendor_unique_locked(dut, num_req_cra_fids_supp, req_cra_fids_supp)
Verify unsupported vendor unique FID returns an error
- Parameters:
dut (XML_API) – Device object under test
num_req_cra_fids_supp (int) – Value of NUM_VU_FIDS_SUP_REQ_CRA
req_cra_fids_supp (list) – List of VU_FID_VALS_REQ_CRA
- Return type:
None
- print_fids_supp_hex(param_name, fids_supp_hex, fids_supp_len_hex)
Print a hexadecimal list of controller-supported FIDs
- Parameters:
param_name (str) – Parameter name (e.g. OPT_FIDS_SUPPORTED or VU_FIDS_SUPPORTED or VU_FID_VALS_REQ_CRA)
fids_supp_hex (list) – List of OPT_FIDS_SUPPORTED or VU_FIDS_SUPPORTED or VU_FID_VALS_REQ_CRA
fids_supp_len_hex (int) – Length of OPT_FIDS_SUPPORTED or VU_FIDS_SUPPORTED or VU_FID_VALS_REQ_CRA
- Return type:
None
DSSD_20_Unsupported_Log_Pages_Verification_Test_Case.py
- This script will run the following tests:
Do GetLogPage for every reserved LID in the table and verify “invalid log page” error is returned
Do GetLogPage for every unsupported optional LID in the table and verify “invalid log page” error is returned
Do GetLogPage for every unsupported vendor unique LID in the table and verify “invalid log page” error is returned
Do GetLogPage for every supported vendor unique LID that requires challenge-response action to unlock and verify an error is returned
Pass/Fail: Script passes if all tests pass
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
SEC-19
- check_lid_optional(dut, lid_list, num_lids_supp, lids_supp, lids_supp_len)
Verify unsupported optional LID returns INVALID_LOG_PAGE error
- Parameters:
dut (XML_API) – Device object under test
lid_list (list) – List of LIDs (in integer format) to loop through
num_lids_supp (int) – Value of NUM_OPT_LIDS_SUPPORTED
lids_supp (list) – List of OPT_LIDS_SUPPORTED
lids_supp_len (int) – Length of OPT_LIDS_SUPPORTED
- Return type:
None
- check_lid_reserved(dut, nvme_ver, lid_list)
Verify reserved LID returns INVALID_LOG_PAGE error
- Parameters:
dut (XML_API) – Device object under test
nvme_ver (int) – NVMe version supported by the controller
lid_list (list) – List of LIDs (in integer format) to loop through
- Return type:
None
- check_lid_vendor_unique(dut, lid_list, num_lids_supp, lids_supp, lids_supp_len, num_req_cra_lids_supp, req_cra_lids_supp, req_cra_lids_supp_len)
Verify unsupported vendor unique LID returns INVALID_LOG_PAGE error
- Parameters:
dut (XML_API) – Device object under test
lid_list (list) – List of LIDs (in integer format) to loop through
num_lids_supp (int) – Value of NUM_VU_LIDS_SUPPORTED
lids_supp (list) – List of VU_LIDS_SUPPORTED
lids_supp_len (int) – Length of VU_LIDS_SUPPORTED
num_req_cra_lids_supp (int) – Value of NUM_VU_LIDS_SUP_REQ_CRA
req_cra_lids_supp (list) – List of VU_LID_VALS_REQ_CRA
req_cra_lids_supp_len (int) – Length of VU_LID_VALS_REQ_CRA
- Return type:
None
- check_lid_vendor_unique_locked(dut, num_req_cra_lids_supp, req_cra_lids_supp)
Verify unsupported vendor unique LID returns an error
- Parameters:
dut (XML_API) – Device object under test
num_req_cra_lids_supp (int) – Value of NUM_VU_LIDS_SUP_REQ_CRA
req_cra_lids_supp (list) – List of VU_LID_VALS_REQ_CRA
- Return type:
None
- print_lids_supp_hex(param_name, lids_supp_hex, lids_supp_len_hex)
Print a hexadecimal list of controller-supported LIDs
- Parameters:
param_name (str) – Parameter name (e.g. OPT_LIDS_SUPPORTED or VU_LIDS_SUPPORTED or VU_LID_VALS_REQ_CRA)
lids_supp_hex (list) – List of OPT_LIDS_SUPPORTED or VU_LIDS_SUPPORTED or VU_LID_VALS_REQ_CRAD
lids_supp_len_hex (int) – Length of OPT_LIDS_SUPPORTED or VU_LIDS_SUPPORTED or VU_LID_VALS_REQ_CRAD
- Return type:
None
DSSD_20_Unsupported_Requirements_Log_Page_Test_Case.py
- This script will run the following tests:
- Verify Unsupported Requirements Log Page, LID = C5h, default values are set to values as specified in OCP document.
Reserved fields “URLP-2” and “URLP-4” are cleared to zero.
Log Page Version field “URLP-5” is set to one.
Log Page GUID field “URLP-6” is set to C7BB98B7D0324863BB2C23990E9C722Fh
Collection Unsupported Count, “URLP-1.” Verify that nonzero values in Unsupported Requirement list matches with Unsupported Count.
Verify that Requirement IDs in Unsupported Requirements list matches with Unsupported Requirement ID passed in Adaptation Parameters file.
Pass/Fail: Script passes if all tests pass
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
URLP-1/2/3/4/5/6
DSSD_20_Write_Read_Command_And_Data_Verification_Test_Case.py
- This script will run the following tests:
Do GetLogPage for LID 2h and get values of various fields
Perform 4KB random reads and writes for 65 minutes
Do GetLogPage for LID 2h and verify the various fields increased
Pass/Fail: Script passes if all tests pass
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
STD-LOG-2/3, SLOG-1/3/4/5/10/11
DSSD_20_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
The device’s support for NVMe Write Uncorrectable command is checked by issuing NVMe command to do Uncorrectable write operation.
LBAs that were written using uncorrectable command should fail read operations. These read errors should not increase the value of the SMART/Health information field Media field.
Open Compute Project Datacenter NVMe SSD Spec v2.5 requirements referenced by this script:
NVMe-IO-1/3/4/5/6/8/9/10/11/12/13/14, GETF-2
DSSD_20_Write_Zeroes_Test_Case.py
- This script will run the following tests:
Get LogPage for LID C4h to read Device Capabilities
Issue a NVMe Identify Command with CNS=1 for the Identify Controller data structure
Issue a NVMe Identify Command with CNS=0 for the Identify Namespace data structure
Verify Write Zeroes Command Support field DCLP-3 is set to 801Fh
Write Zeroes command with NSID=1, SLBA=LBA-X, NLB=1, DEAC=0, FUA=0
Write Zeroes command with NSID=1, SLBA=LBA-X, NLB=1, DEAC=0, FUA=1
Write Zeroes command with NSID=1, SLBA=LBA-X, NLB=1, DEAC=1, FUA=0
Write Zeroes command with NSID=1, SLBA=LBA-X, NLB=1, DEAC=1, FUA=1
Pass/Fail: Script passes if all tests pass
Open Compute Project Datacenter NVMe SSD Spec v2.0 requirements referenced by this script:
NVMe-IO-1/3/4/5/6/8/9/10/11/12/13/14, GETF-2
- get_slba_x(max_lba)
Get a random SLBA value
- Parameters:
max_lba (int) – Max I/O blocks value from get_max_blocks()
- Returns:
lba_x – Random SLBA value
- Return type:
int
- verify_data_buffer(dut, data_pattern, nlb=1, slba=0)
Run reverify I/O test and check whether it passed or failed
- Parameters:
dut (XML_API) – Device object under test
data_pattern (int) – Data pattern to be verified
nlb (int) – Number of logical blocks
slba (hex) – Starting LBA value
fail (bool) – If the test should fail or not
- Returns:
True (test passed) or False (test failed)
- Return type:
boolean