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 | |
| 12 | *** Test Cases *** |
| 13 | |
| 14 | Verify GetFruRecordTableMetadata |
George Keishing | c7ff1cd | 2020-02-27 07:04:58 -0600 | [diff] [blame] | 15 | [Documentation] Verify get fru record table meta data response message. |
Sridevi Ramesh | fe52e40 | 2020-02-05 00:15:24 -0600 | [diff] [blame] | 16 | [Tags] Verify_GetFruRecordTableMetadata |
| 17 | |
| 18 | # pldm_output: |
Sridevi Ramesh | fe52e40 | 2020-02-05 00:15:24 -0600 | [diff] [blame] | 19 | # [frudatamajorversion]: 1 |
Sridevi Ramesh | fe52e40 | 2020-02-05 00:15:24 -0600 | [diff] [blame] | 20 | # [frudataminorversion]: 0 |
Sridevi Ramesh | fe52e40 | 2020-02-05 00:15:24 -0600 | [diff] [blame] | 21 | # [frutablemaximumsize]: 4294967295 |
Sridevi Ramesh | 8bb2f5e | 2020-02-27 07:19:39 -0600 | [diff] [blame] | 22 | # [frutablelength]: 60 |
| 23 | # [total_number_of_record_set_identifiers_in_table]: 1 |
| 24 | # [total_number_of_records_in_table]: 1 |
Sridevi Ramesh | fe52e40 | 2020-02-05 00:15:24 -0600 | [diff] [blame] | 25 | |
| 26 | ${pldm_output}= Pldmtool fru GetFruRecordTableMetadata |
| 27 | Rprint Vars pldm_output |
Sridevi Ramesh | 8bb2f5e | 2020-02-27 07:19:39 -0600 | [diff] [blame] | 28 | |
| 29 | Valid Value pldm_output['frudatamajorversion'] ['1'] |
| 30 | Valid Value pldm_output['frudataminorversion'] ['0'] |
| 31 | Valid Value pldm_output['frutablemaximumsize'] ['4294967295'] |
| 32 | Valid Range ${pldm_output['frutablelength']} 1 |
| 33 | Valid Range ${pldm_output['total_number_of_records_in_table']} 1 |
| 34 | 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] | 35 | |
| 36 | Verify GetFruRecordTable |
| 37 | [Documentation] Verify GetFruRecordTable response message. |
| 38 | [Tags] Verify_GetFruRecordTable |
| 39 | |
| 40 | ${pldm_output}= Pldmtool fru GetFruRecordTable |
| 41 | Should Not Be Empty ${pldm_output} |
| 42 | #TODO: Verify the fru table content. |
| 43 | |
| 44 | Verify GetFRURecordByOption |
| 45 | [Documentation] Verify GetFRURecordByOption response message for |
| 46 | ... the available FRU record identifier. |
| 47 | [Tags] Verify_GetFRURecordByOption |
| 48 | |
| 49 | # pldm_output: |
| 50 | # [fru_record_set_identifier]: 2 |
| 51 | # [fru_record_type]: 1(General) |
| 52 | # [number_of_fru_fields]: 4 |
| 53 | # [encoding_type_for_fru_fields]: 1(ASCII) |
| 54 | # [ fru_field_type]: Name |
| 55 | # [ fru_field_length]: 12 |
| 56 | # [ fru_field_value]: BMC PLANAR |
| 57 | |
| 58 | ${pldm_output}= Pldmtool fru GetFruRecordTableMetadata |
| 59 | ${fru_rec_id}= Convert To Integer ${pldm_output['total_number_of_record_set_identifiers_in_table']} |
| 60 | FOR ${i} IN RANGE ${fru_rec_id+1} |
| 61 | ${pldm_output}= Run Keyword Pldmtool fru GetFRURecordByOption -i ${i} -r 0 -f 0 |
| 62 | Run Keyword Rprint Vars pldm_output |
| 63 | Should Not Be Empty ${pldm_output} |
| 64 | END |