OCP_DatacenterSSD_2_5

OCP_DCSSD_2_5_AER_BasicVerification.py

This script will run the following tests:
  1. Verify that the value AERL is greater than or equal to 4

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

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

  4. Verify that the value of bit-3 in the LPA field is set to 1b indicating support for sending Telemetry Log Notices

  5. Verify that when attempting to perform an NVMe AER command when there are already AERL+1 Asynchronous Event Request commands pending, the latest AER command shall fail

Pass/Fail: Script passes if all tests pass

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

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

print_aer_status(status, error=False)

Delims the AER status into separate strings for better print formatting

Parameters:
  • status (str) – aer_status from AER return status dictionary

  • error (bool) – decides whether to detail or to error

Return type:

None

OCP_DCSSD_2_5_AER_FWActivationNotice.py

This script will run the following tests:
  1. Verify that if an event occurs for which reporting is enabled and there are no AER commands pending, the device retains the event information for that AE Type and reports it once an AER command is submitted.

  2. Verify that if duplicate events are queued while no AER commands are pending, the duplicate events are reported as a single response to a future AER command.

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

  4. 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 Starting

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

Pass/Fail: Script passes if all tests pass

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

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

print_aer_status(status, error=False)

Delims the AER status into separate strings for better print formatting

Parameters:
  • status (str) – aer_status from AER return status dictionary

  • error (bool) – decides whether to detail or to error

Return type:

None

verify_fwact_ae(aer_status)

Verifies the fields in an AER to be a Firmware Activation Notice

Parameters:

aer_status (str) – AER Status from /var/log/messages

Return type:

None

OCP_DCSSD_2_5_AER_NSAttributeNotice.py

This script will run the following tests:
  1. Verify that the device completes an AER 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 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).

Pass/Fail: Script passes if all tests pass

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

NVMe-OPT-9

find_optimal_lbads(idns_ds, desired_lbads)

Finds an entry with a matching LBADS from the 16 Element LBA Format Support table

Parameters:
  • idns_ds (dict) – Data structure received after a successful identify namespace command

  • desired_lbads (int) – Desired value of LBADS

Returns:

  • idx (int or None) – Format Index in 16 Element LBA Format Support Table, or None if none found

  • selected_entry (dict) – Format Entry in 16 Element LBA Format Support Table, or None if none found

print_aer_status(status, error=False)

Delims the AER status into separate strings for better print formatting

Parameters:
  • status (str) – aer_status from AER return status dictionary

  • error (bool) – decides whether to detail or to error

Return type:

None

verify_nsattr_ae(aer_status)

Verifies the fields in an AER to be a Firmware Activation Notice

Parameters:

aer_status (str) – AER Status from /var/log/messages

Return type:

None

verify_nsid_in_lid_04h(log_ds, desired_nsid)

Indexes through each NSID in the Namespace List returned from Log Page Identifier 04h

Parameters:
  • log_ds (dict) – Namespace List returned from LID 04h

  • desired_nsid (int) – Desired Namespace Identifier to find in the Namespace List

Returns:

True if desired_nsid is in the list, otherwise False

Return type:

bool

OCP_DCSSD_2_5_ContConfig_Arbitration.py

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

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

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

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

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

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

OCP_DCSSD_2_5_ContConfig_FatalStatus.py

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

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

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

NVMe-CFG-3

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

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

OCP_DCSSD_2_5_Dealloc_GarbageCollection.py

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

  2. Run 4KiB random writes for 5 minutes

  3. Verify QoS values match with those in adaptation data

  4. Deallocate 2% of the namespace

  5. Run 4KiB random writes for 1 minute

  6. Verify QoS values match with those in adaptation data

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

Pass/Fail: Script passes if all tests pass

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

TRIM-7

collect_performance_logs(dut, io_test, perf_field)

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

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

  • io_test (dict) – Custom IO dict

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

Returns:

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

Return type:

dict | int

compare_QOS_performance_logs(qos_base_values, read_io_latency)

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

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

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

Return type:

None

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

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

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

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

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

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

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

  • io_profile (str) – IO Profile to be executed

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

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

Return type:

dict

verify_io(io_test, is_verify_step=True)

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

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

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

Returns:

result_msg – msg for later fail_action, or none if passed

Return type:

tuple(func, msg) | none

OCP_DCSSD_2_5_Dealloc_Trim.py

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

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

  3. Send dataset management with IDR, IWR, and AD attributes and verify they’re successful

  4. Verify NPDG is an exact multiple of NPDA

  5. Run 4KiB random writes for 5 minutes

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

  7. Run 4KiB random reads

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

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

  10. Read a randomly chosen LBA from the deallocated region

  11. Verify LBA data is all 0h

  12. Repeat steps 10-11 ten more times

  13. Perform an unsafe power cycle

  14. Read a randomly chosen LBA from the deallocated region

  15. Verify LBA data is all 0h

  16. Repeat steps 14-15 ten more times

  17. Randomly choose a LBA from the deallocated region and write the pattern DEADBEEFh to it

  18. Read the same LBA and verify the data has the pattern DEADBEEFh

  19. Repeat steps 16-17 ten more times

  20. Perform an unsafe power cycle

  21. Read the same LBAs from steps 17-18 and verify the data has the pattern DEADBEEFh

Pass/Fail: Script passes if all tests pass

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

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

collect_performance_logs(dut, test_id)

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

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

  • test_id (int) – IO test ID

  • perf_field (str) – Performance field to be collected

Returns:

perf_vals – Performance values of I/O

Return type:

dict

precondition(dut, pattern=17)

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

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

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

Return type:

None

verify_dlfeat_consistency(read_results)

Verifies data that was read is all zeroes

Parameters:

read_results – Results dictionary from random read

Returns:

pass – If passing or failing the step

Return type:

bool

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

OCP_DCSSD_2_5_FactoryDefault_DefaultValue.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:

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

check_logpage_value(log_page_data, field_name, expected_value)

Verify log page field value matches the expected value

Parameters:
  • log_page_data (dict) – Log page output

  • field_name (str) – Log page field name

  • expected_value (int) – Expected value of the log page field

Return type:

None

OCP_DCSSD_2_5_FormFactor_E1L_PCIeSpeedLaneWidth.py

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

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

Pass/Fail: Script passes if all tests pass

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

FFE1L-2

OCP_DCSSD_2_5_FormFactor_E1L_PWRDIS.py

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

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

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

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

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

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

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

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

Pass/Fail: Script passes if all tests pass

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

FFE1L-9

wait_assert(dut)

Wait for PWRDIS signal to be asserted

Parameters:

dut (XML_API) – Device object under test

Return type:

None

wait_deassert(dut)

Wait for PWRDIS signal to be de-asserted

Parameters:

dut (XML_API) – Device object under test

Return type:

None

OCP_DCSSD_2_5_FormFactor_E1S_PCIeSpeedLaneWidth.py

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

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

Pass/Fail: Script passes if all tests pass

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

FFE1S-2

OCP_DCSSD_2_5_FormFactor_E1S_PWRDIS.py

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

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

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

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

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

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

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

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

Pass/Fail: Script passes if all tests pass

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

FFE1S-9

wait_assert(dut)

Wait for PWRDIS signal to be asserted

Parameters:

dut (XML_API) – Device object under test

Return type:

None

wait_deassert(dut)

Wait for PWRDIS signal to be de-asserted

Parameters:

dut (XML_API) – Device object under test

Return type:

None

OCP_DCSSD_2_5_FormFactor_M2_PCIeSpeedLaneWidth.py

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

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

Pass/Fail: Script passes if all tests pass

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

FFM2-5

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

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

OCP_DCSSD_2_5_ROWTM_Feature.py

This script will run the following tests:
  1. Issue Get Features commands for FID = C2h with SEL = 01b and 11b and verify the results

  2. Issue Set Features command for FID = C2h to set drive to WT mode

  3. Issue Get Features commands for FID = C2h with SEL = 01b, 00b, and 10b and verify the results

  4. Power cycle the device

  5. Repeat step 3

  6. Issue Set Features command for FID = C2h to set drive to Normal mode in case of PLP failure and RO mode at EOL

  7. Repeat step 3

  8. Power cycle the device

  9. Repeat step 3

  10. Issue Set Features command for FID = C2h to set drive to RO mode

  11. Repeat step 3

  12. Power cycle the device

  13. Repeat step 3

Pass/Fail: Script passes if all tests pass

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

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

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

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

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

  • set_feature_cmd (dict) – Set-Feature command output

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

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

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

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

Return type:

None

OCP_DCSSD_2_5_SMARTExtendedLog_Endianness.py

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

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

  3. Verify Log Page GUID is correct

Pass/Fail: Script passes if all tests pass

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

SLOG-3, SMART-22/27/28

OCP_DCSSD_2_5_SMARTExtendedLog_EnduranceEstimate.py

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

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

  3. Verify both values are the same

Pass/Fail: Script passes if all tests pass

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

SMART-25

OCP_DCSSD_2_5_SMARTExtendedLog_NUSE.py

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

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

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

  4. Delete the namespace

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

  6. Power cycle the device and delay for 10 minutes

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

  8. Delete all of the namespaces

  9. Create and attach a new namespace

Pass/Fail: Script passes if all tests pass

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

SMART-23

get_ID_NS_DATA_1(params)

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

Parameters:

params (dict) – ADP parameter values

Returns:

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

  • create_Namespace (dict)

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

Helper function to create a new Namespace with specific field information

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

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

  • new_ns_capacity (int) – Create Size capacity

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

  • format_index (int)

  • mset (int) – Metadata Settings

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

  • anagrpid (int) – ANA Group Identifier

  • pi (int) – Protection Information

  • pil (int) – Protection Information Location

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

Returns:

create_Namespace

Return type:

dict

OCP_DCSSD_2_5_SMARTExtendedLog_PLPCount.py

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

  2. Power cycle the drive

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

Pass/Fail: Script passes if all tests pass

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

SMART-24

OCP_DCSSD_2_5_SMARTExtendedLog_PowerStateChangeCount.py

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

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

Pass/Fail: Script passes if all tests pass

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

SMART-31

postcondition(dut)

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

Parameters:

dut (XML_API) – Device object under test

Return type:

None

OCP_DCSSD_2_5_SMARTExtendedLog_SecVerNumber.py

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

  2. Check Security Version field against parameterization data

Pass/Fail: Script passes if all tests pass

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

SMART-22

OCP_DCSSD_2_5_SMARTExtendedLog_UnalignedIO.py

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

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

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

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

  5. Power cycle the device

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

Pass/Fail: Script passes if all tests pass

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

SMART-21

perform_cleanup(dut, orig_lbaf)

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

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

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

Returns:

‘test’ – fail_action=’test’

Return type:

str

OCP_DCSSD_2_5_SMARTExtendedLog_UnitsRW.py

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

  2. Perform 128KB sequential writes for 5 minutes

  3. Perform 128KB sequential reads for 5 minutes

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

Pass/Fail: Script passes if all tests pass

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

SMART-1/2

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

  • lid

  • field_name1

  • field_name2

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

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