blob: 7e07d551a3b7b6c8f8a9b636e114f63790541a26 [file] [log] [blame]
Sridevi Rameshfe52e402020-02-05 00:15:24 -06001*** Settings ***
2
3Documentation Module to test PLDM FRU (Field Replaceable Unit) commands.
4
5Library ../lib/pldm_utils.py
6Variables ../data/pldm_variables.py
7Resource ../lib/openbmc_ffdc.robot
8
9Test Setup Printn
10Test Teardown FFDC On Test Case Fail
11
Matt Fischer6fb70d92023-10-24 19:06:33 -060012Test Tags Pldm_FRU
George Keishing54316852023-10-16 14:03:29 +053013
Sridevi Rameshfe52e402020-02-05 00:15:24 -060014*** Test Cases ***
15
16Verify GetFruRecordTableMetadata
George Keishingc7ff1cd2020-02-27 07:04:58 -060017 [Documentation] Verify get fru record table meta data response message.
Sridevi Rameshfe52e402020-02-05 00:15:24 -060018 [Tags] Verify_GetFruRecordTableMetadata
19
20 # pldm_output:
Sridevi Rameshfe52e402020-02-05 00:15:24 -060021 # [frudatamajorversion]: 1
Sridevi Rameshfe52e402020-02-05 00:15:24 -060022 # [frudataminorversion]: 0
Sridevi Rameshfe52e402020-02-05 00:15:24 -060023 # [frutablemaximumsize]: 4294967295
Sridevi Ramesh8bb2f5e2020-02-27 07:19:39 -060024 # [frutablelength]: 60
25 # [total_number_of_record_set_identifiers_in_table]: 1
26 # [total_number_of_records_in_table]: 1
Sridevi Rameshfe52e402020-02-05 00:15:24 -060027
28 ${pldm_output}= Pldmtool fru GetFruRecordTableMetadata
29 Rprint Vars pldm_output
Sridevi Ramesh8bb2f5e2020-02-27 07:19:39 -060030
Sridevi Ramesh961050b2020-11-12 11:04:30 -060031 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 Ramesh3ca4f642020-07-14 01:15:30 -050037
38Verify 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
46Verify 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 Ramesh961050b2020-11-12 11:04:30 -060061 ${fru_rec_id}= Convert To Integer ${pldm_output['Total number of Record Set Identifiers in table']}
Sridevi Ramesh3ca4f642020-07-14 01:15:30 -050062 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