Sridevi Ramesh | fe52e40 | 2020-02-05 00:15:24 -0600 | [diff] [blame] | 1 | *** Settings *** |
| 2 | |
| 3 | Documentation Module to test PLDM FRU (Field Replaceable Unit) commands. |
| 4 | |
| 5 | Library ../lib/pldm_utils.py |
| 6 | Variables ../data/pldm_variables.py |
| 7 | Resource ../lib/openbmc_ffdc.robot |
| 8 | |
| 9 | Test Setup Printn |
| 10 | Test Teardown FFDC On Test Case Fail |
| 11 | |
Matt Fischer | 6fb70d9 | 2023-10-24 19:06:33 -0600 | [diff] [blame^] | 12 | Test Tags Pldm_FRU |
George Keishing | 5431685 | 2023-10-16 14:03:29 +0530 | [diff] [blame] | 13 | |
Sridevi Ramesh | fe52e40 | 2020-02-05 00:15:24 -0600 | [diff] [blame] | 14 | *** Test Cases *** |
| 15 | |
| 16 | Verify GetFruRecordTableMetadata |
George Keishing | c7ff1cd | 2020-02-27 07:04:58 -0600 | [diff] [blame] | 17 | [Documentation] Verify get fru record table meta data response message. |
Sridevi Ramesh | fe52e40 | 2020-02-05 00:15:24 -0600 | [diff] [blame] | 18 | [Tags] Verify_GetFruRecordTableMetadata |
| 19 | |
| 20 | # pldm_output: |
Sridevi Ramesh | fe52e40 | 2020-02-05 00:15:24 -0600 | [diff] [blame] | 21 | # [frudatamajorversion]: 1 |
Sridevi Ramesh | fe52e40 | 2020-02-05 00:15:24 -0600 | [diff] [blame] | 22 | # [frudataminorversion]: 0 |
Sridevi Ramesh | fe52e40 | 2020-02-05 00:15:24 -0600 | [diff] [blame] | 23 | # [frutablemaximumsize]: 4294967295 |
Sridevi Ramesh | 8bb2f5e | 2020-02-27 07:19:39 -0600 | [diff] [blame] | 24 | # [frutablelength]: 60 |
| 25 | # [total_number_of_record_set_identifiers_in_table]: 1 |
| 26 | # [total_number_of_records_in_table]: 1 |
Sridevi Ramesh | fe52e40 | 2020-02-05 00:15:24 -0600 | [diff] [blame] | 27 | |
| 28 | ${pldm_output}= Pldmtool fru GetFruRecordTableMetadata |
| 29 | Rprint Vars pldm_output |
Sridevi Ramesh | 8bb2f5e | 2020-02-27 07:19:39 -0600 | [diff] [blame] | 30 | |
Sridevi Ramesh | 961050b | 2020-11-12 11:04:30 -0600 | [diff] [blame] | 31 | Valid Value pldm_output['FRUDATAMajorVersion'] [1] |
| 32 | Valid Value pldm_output['FRUDATAMinorVersion'] [0] |
| 33 | Valid Value pldm_output['FRUTableMaximumSize'] [4294967295] |
| 34 | Valid Range pldm_output['FRUTableLength'] 1 |
| 35 | Valid Range pldm_output['Total number of records in table'] 1 |
| 36 | Valid Range pldm_output['Total number of Record Set Identifiers in table'] 1 |
Sridevi Ramesh | 3ca4f64 | 2020-07-14 01:15:30 -0500 | [diff] [blame] | 37 | |
| 38 | Verify GetFruRecordTable |
| 39 | [Documentation] Verify GetFruRecordTable response message. |
| 40 | [Tags] Verify_GetFruRecordTable |
| 41 | |
| 42 | ${pldm_output}= Pldmtool fru GetFruRecordTable |
| 43 | Should Not Be Empty ${pldm_output} |
| 44 | #TODO: Verify the fru table content. |
| 45 | |
| 46 | Verify GetFRURecordByOption |
| 47 | [Documentation] Verify GetFRURecordByOption response message for |
| 48 | ... the available FRU record identifier. |
| 49 | [Tags] Verify_GetFRURecordByOption |
| 50 | |
| 51 | # pldm_output: |
| 52 | # [fru_record_set_identifier]: 2 |
| 53 | # [fru_record_type]: 1(General) |
| 54 | # [number_of_fru_fields]: 4 |
| 55 | # [encoding_type_for_fru_fields]: 1(ASCII) |
| 56 | # [ fru_field_type]: Name |
| 57 | # [ fru_field_length]: 12 |
| 58 | # [ fru_field_value]: BMC PLANAR |
| 59 | |
| 60 | ${pldm_output}= Pldmtool fru GetFruRecordTableMetadata |
Sridevi Ramesh | 961050b | 2020-11-12 11:04:30 -0600 | [diff] [blame] | 61 | ${fru_rec_id}= Convert To Integer ${pldm_output['Total number of Record Set Identifiers in table']} |
Sridevi Ramesh | 3ca4f64 | 2020-07-14 01:15:30 -0500 | [diff] [blame] | 62 | FOR ${i} IN RANGE ${fru_rec_id+1} |
| 63 | ${pldm_output}= Run Keyword Pldmtool fru GetFRURecordByOption -i ${i} -r 0 -f 0 |
| 64 | Run Keyword Rprint Vars pldm_output |
| 65 | Should Not Be Empty ${pldm_output} |
| 66 | END |