Rahul Maheshwari | 77ab160 | 2018-02-28 07:21:55 -0600 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Documentation Test IPMI sensor IDs. |
| 3 | |
George Keishing | d6bc1c1 | 2019-03-08 12:59:29 -0600 | [diff] [blame] | 4 | Resource ../lib/rest_client.robot |
| 5 | Resource ../lib/ipmi_client.robot |
| 6 | Resource ../lib/openbmc_ffdc.robot |
| 7 | Resource ../lib/boot_utils.robot |
| 8 | Resource ../lib/bmc_redfish_resource.robot |
Rahul Maheshwari | bad5e82 | 2019-07-30 12:36:27 -0500 | [diff] [blame] | 9 | Library ../lib/ipmi_utils.py |
nagarjunb22 | 87138e6 | 2022-04-19 16:49:16 +0530 | [diff] [blame] | 10 | Library ../lib/utilities.py |
| 11 | Variables ../data/ipmi_raw_cmd_table.py |
Rahul Maheshwari | 77ab160 | 2018-02-28 07:21:55 -0600 | [diff] [blame] | 12 | |
| 13 | Suite setup Suite Setup Execution |
George Keishing | 2d0edad | 2021-08-18 11:44:10 -0500 | [diff] [blame] | 14 | Suite Teardown Redfish.Logout |
Rahul Maheshwari | 77ab160 | 2018-02-28 07:21:55 -0600 | [diff] [blame] | 15 | Test Teardown Test Teardown Execution |
| 16 | |
| 17 | Force Tags SDR_Test |
| 18 | |
| 19 | |
| 20 | *** Test Cases *** |
| 21 | |
Rahul Maheshwari | bad5e82 | 2019-07-30 12:36:27 -0500 | [diff] [blame] | 22 | Verify SDR Info |
| 23 | [Documentation] Verify sdr info command output. |
| 24 | [Tags] Verify_SDR_Info |
| 25 | # Example of SDR info command output: |
| 26 | # SDR Version : 0x51 |
| 27 | # Record Count : 216 |
| 28 | # Free Space : unspecified |
| 29 | # Most recent Addition : |
| 30 | # Most recent Erase : |
| 31 | # SDR overflow : no |
| 32 | # SDR Repository Update Support : unspecified |
| 33 | # Delete SDR supported : no |
| 34 | # Partial Add SDR supported : no |
| 35 | # Reserve SDR repository supported : no |
| 36 | # SDR Repository Alloc info supported : no |
| 37 | |
nagarjunb22 | 87138e6 | 2022-04-19 16:49:16 +0530 | [diff] [blame] | 38 | # Check if delete, partially add, reserve SDR and get SDR alloc info command are supported or not. |
| 39 | ${support_delete_sdr}= Fetch IPMI Command Support Status |
| 40 | ... ${IPMI_RAW_CMD['SDR']['Delete SDR'][0]} |
| 41 | ${support_partial_add}= Fetch IPMI Command Support Status |
| 42 | ... ${IPMI_RAW_CMD['SDR']['Partially Add SDR'][0]} |
| 43 | ${support_reserve_sdr_repository}= Fetch IPMI Command Support Status |
| 44 | ... ${IPMI_RAW_CMD['SDR']['Reserve SDR Repository'][0]} |
| 45 | ${support_sdr_repository_alloc_info}= Fetch IPMI Command Support Status |
| 46 | ... ${IPMI_RAW_CMD['SDR']['Get SDR allocation Info'][0]} |
| 47 | |
Rahul Maheshwari | bad5e82 | 2019-07-30 12:36:27 -0500 | [diff] [blame] | 48 | ${sdr_info}= Get SDR Info |
| 49 | Should Be Equal ${sdr_info['sdr_version']} 0x51 |
| 50 | |
| 51 | # Get sensor count from "sdr elist all" command output. |
| 52 | ${sensor_count}= Get Sensor Count |
| 53 | Should Be Equal As Strings |
| 54 | ... ${sdr_info['record_count']} ${sensor_count} |
| 55 | |
| 56 | Should Be Equal ${sdr_info['free_space']} unspecified |
nagarjunb22 | 87138e6 | 2022-04-19 16:49:16 +0530 | [diff] [blame] | 57 | Should Not Be Equal ${sdr_info['most_recent_addition']} ${EMPTY} |
| 58 | Should Not Be Equal ${sdr_info['most_recent_erase']} ${EMPTY} |
| 59 | Should Be Equal ${sdr_info['sdr_overflow']} yes |
Rahul Maheshwari | bad5e82 | 2019-07-30 12:36:27 -0500 | [diff] [blame] | 60 | Should Be Equal ${sdr_info['sdr_repository_update_support']} unspecified |
nagarjunb22 | 87138e6 | 2022-04-19 16:49:16 +0530 | [diff] [blame] | 61 | Should Be Equal ${sdr_info['delete_sdr_supported']} ${support_delete_sdr} |
| 62 | Should Be Equal ${sdr_info['partial_add_sdr_supported']} ${support_partial_add} |
| 63 | Should Be Equal ${sdr_info['reserve_sdr_repository_supported']} ${support_reserve_sdr_repository} |
| 64 | Should Be Equal ${sdr_info['sdr_repository_alloc_info_supported']} ${support_sdr_repository_alloc_info} |
Rahul Maheshwari | bad5e82 | 2019-07-30 12:36:27 -0500 | [diff] [blame] | 65 | |
Rahul Maheshwari | 77ab160 | 2018-02-28 07:21:55 -0600 | [diff] [blame] | 66 | |
| 67 | Test CPU Core SDR Info At Power On |
George Keishing | d6bc1c1 | 2019-03-08 12:59:29 -0600 | [diff] [blame] | 68 | [Documentation] Verify CPU core SDR info via IPMI and Redfish at power on. |
Rahul Maheshwari | 77ab160 | 2018-02-28 07:21:55 -0600 | [diff] [blame] | 69 | |
| 70 | [Tags] Test_CPU_Core_SDR_Info_At_Power_On |
| 71 | |
George Keishing | d6bc1c1 | 2019-03-08 12:59:29 -0600 | [diff] [blame] | 72 | Redfish Power On stack_mode=skip quiet=1 |
Rahul Maheshwari | 77ab160 | 2018-02-28 07:21:55 -0600 | [diff] [blame] | 73 | Test SDR Info core |
| 74 | |
| 75 | |
| 76 | Test DIMM SDR Info At Power On |
George Keishing | d6bc1c1 | 2019-03-08 12:59:29 -0600 | [diff] [blame] | 77 | [Documentation] Verify DIMM SDR info via IPMI and Redfish at power on. |
Rahul Maheshwari | 77ab160 | 2018-02-28 07:21:55 -0600 | [diff] [blame] | 78 | |
| 79 | [Tags] Test_DIMM_SDR_Info_At_Power_On |
| 80 | |
George Keishing | d6bc1c1 | 2019-03-08 12:59:29 -0600 | [diff] [blame] | 81 | Redfish Power On stack_mode=skip quiet=1 |
Rahul Maheshwari | 77ab160 | 2018-02-28 07:21:55 -0600 | [diff] [blame] | 82 | Test SDR Info dimm |
| 83 | |
Rahul Maheshwari | cd7b19c | 2018-04-10 07:35:56 -0500 | [diff] [blame] | 84 | |
| 85 | Test GPU SDR Info At Power On |
George Keishing | d6bc1c1 | 2019-03-08 12:59:29 -0600 | [diff] [blame] | 86 | [Documentation] Verify GPU SDR info via IPMI and Redfish at power on. |
Rahul Maheshwari | cd7b19c | 2018-04-10 07:35:56 -0500 | [diff] [blame] | 87 | |
| 88 | [Tags] Test_GPU_SDR_Info_At_Power_On |
| 89 | |
George Keishing | d6bc1c1 | 2019-03-08 12:59:29 -0600 | [diff] [blame] | 90 | Redfish Power On stack_mode=skip quiet=1 |
Rahul Maheshwari | cd7b19c | 2018-04-10 07:35:56 -0500 | [diff] [blame] | 91 | Test SDR Info gv100card |
| 92 | |
| 93 | |
Rahul Maheshwari | 77ab160 | 2018-02-28 07:21:55 -0600 | [diff] [blame] | 94 | Test CPU Core SDR Info At Power Off |
George Keishing | d6bc1c1 | 2019-03-08 12:59:29 -0600 | [diff] [blame] | 95 | [Documentation] Verify CPU core SDR info via IPMI and Redfish at power off. |
Rahul Maheshwari | 77ab160 | 2018-02-28 07:21:55 -0600 | [diff] [blame] | 96 | |
| 97 | [Tags] Test_CPU_Core_SDR_Info_At_Power_Off |
| 98 | |
George Keishing | d6bc1c1 | 2019-03-08 12:59:29 -0600 | [diff] [blame] | 99 | Redfish Hard Power Off stack_mode=skip quiet=1 |
Rahul Maheshwari | 77ab160 | 2018-02-28 07:21:55 -0600 | [diff] [blame] | 100 | Test SDR Info core |
| 101 | |
| 102 | |
| 103 | Test DIMM SDR Info At Power Off |
George Keishing | d6bc1c1 | 2019-03-08 12:59:29 -0600 | [diff] [blame] | 104 | [Documentation] Verify DIMM SDR info via IPMI and Redfish at power off. |
Rahul Maheshwari | 77ab160 | 2018-02-28 07:21:55 -0600 | [diff] [blame] | 105 | |
| 106 | [Tags] Test_DIMM_SDR_Info_At_Power_Off |
| 107 | |
George Keishing | d6bc1c1 | 2019-03-08 12:59:29 -0600 | [diff] [blame] | 108 | Redfish Hard Power Off stack_mode=skip quiet=1 |
Rahul Maheshwari | 77ab160 | 2018-02-28 07:21:55 -0600 | [diff] [blame] | 109 | Test SDR Info dimm |
| 110 | |
| 111 | |
Rahul Maheshwari | cd7b19c | 2018-04-10 07:35:56 -0500 | [diff] [blame] | 112 | Test Turbo Allowed SDR Info |
George Keishing | d6bc1c1 | 2019-03-08 12:59:29 -0600 | [diff] [blame] | 113 | [Documentation] Verify turbo allowed SDR info via IPMI and Redfish. |
Rahul Maheshwari | cd7b19c | 2018-04-10 07:35:56 -0500 | [diff] [blame] | 114 | [Tags] Test_Turbo_Allowed_SDR_Info |
| 115 | |
| 116 | ${component_uri_list}= Get Component URIs turbo_allowed |
| 117 | ${component_uri}= Get From List ${component_uri_list} 0 |
| 118 | ${state_rest}= Read Attribute ${component_uri} TurboAllowed |
| 119 | |
| 120 | ${state_ipmi}= Get SDR Presence Via IPMI turbo_allowed${SPACE} |
| 121 | |
| 122 | Run Keyword If '${state_ipmi}' == 'Disabled' |
George Keishing | 9a75e68 | 2019-10-24 00:22:08 -0500 | [diff] [blame] | 123 | ... Should Be True ${state_rest} == ${0} |
Rahul Maheshwari | cd7b19c | 2018-04-10 07:35:56 -0500 | [diff] [blame] | 124 | ... ELSE IF '${state_ipmi}' == 'State Asserted' |
George Keishing | 9a75e68 | 2019-10-24 00:22:08 -0500 | [diff] [blame] | 125 | ... Should Be True ${state_rest} == ${1} |
Rahul Maheshwari | cd7b19c | 2018-04-10 07:35:56 -0500 | [diff] [blame] | 126 | |
| 127 | |
| 128 | Test Auto Reboot SDR Info |
George Keishing | d6bc1c1 | 2019-03-08 12:59:29 -0600 | [diff] [blame] | 129 | [Documentation] Verify auto reboot SDR info via IPMI and Redfish. |
Rahul Maheshwari | cd7b19c | 2018-04-10 07:35:56 -0500 | [diff] [blame] | 130 | [Tags] Test_Auto_Reboot_SDR_Info |
| 131 | |
| 132 | |
| 133 | ${component_uri_list}= Get Component URIs auto_reboot |
| 134 | ${component_uri}= Get From List ${component_uri_list} 0 |
| 135 | ${state_rest}= Read Attribute ${component_uri} AutoReboot |
| 136 | |
| 137 | ${state_ipmi}= Get SDR Presence Via IPMI auto_reboot${SPACE} |
| 138 | |
| 139 | Run Keyword If '${state_ipmi}' == 'Disabled' |
George Keishing | 9a75e68 | 2019-10-24 00:22:08 -0500 | [diff] [blame] | 140 | ... Should Be True ${state_rest} == ${0} |
Rahul Maheshwari | cd7b19c | 2018-04-10 07:35:56 -0500 | [diff] [blame] | 141 | ... ELSE IF '${state_ipmi}' == 'State Asserted' |
George Keishing | 9a75e68 | 2019-10-24 00:22:08 -0500 | [diff] [blame] | 142 | ... Should Be True ${state_rest} == ${1} |
Rahul Maheshwari | cd7b19c | 2018-04-10 07:35:56 -0500 | [diff] [blame] | 143 | |
| 144 | |
| 145 | Test TPM Enable SDR Info |
George Keishing | d6bc1c1 | 2019-03-08 12:59:29 -0600 | [diff] [blame] | 146 | [Documentation] Verify auto reboot SDR info via IPMI and Redfish. |
Rahul Maheshwari | cd7b19c | 2018-04-10 07:35:56 -0500 | [diff] [blame] | 147 | [Tags] Test_TPM_Enable_SDR_Info |
| 148 | |
| 149 | |
| 150 | ${component_uri_list}= Get Component URIs TPMEnable |
| 151 | ${component_uri}= Get From List ${component_uri_list} 0 |
| 152 | ${state_rest}= Read Attribute ${component_uri} TPMEnable |
| 153 | |
| 154 | ${state_ipmi}= Get SDR Presence Via IPMI auto_reboot${SPACE} |
| 155 | |
| 156 | Run Keyword If '${state_ipmi}' == 'Disabled' |
George Keishing | 9a75e68 | 2019-10-24 00:22:08 -0500 | [diff] [blame] | 157 | ... Should Be True ${state_rest} == ${0} |
Rahul Maheshwari | cd7b19c | 2018-04-10 07:35:56 -0500 | [diff] [blame] | 158 | ... ELSE IF '${state_ipmi}' == 'State Asserted' |
George Keishing | 9a75e68 | 2019-10-24 00:22:08 -0500 | [diff] [blame] | 159 | ... Should Be True ${state_rest} == ${1} |
Rahul Maheshwari | cd7b19c | 2018-04-10 07:35:56 -0500 | [diff] [blame] | 160 | |
nagarjunb22 | 87138e6 | 2022-04-19 16:49:16 +0530 | [diff] [blame] | 161 | Test Reserve SDR Repository |
| 162 | [Documentation] Verify Reserve SDR Repository IPMI command. |
| 163 | [Tags] Test_Reserve_SDR_Repository |
| 164 | |
| 165 | ${reservation_id}= Get Reservation ID convert_lsb_to_msb=True |
| 166 | |
| 167 | # Getting another Reservation ID and verify it is different from previous Reservation ID. |
| 168 | ${new_reservation_id}= Get Reservation ID convert_lsb_to_msb=True |
| 169 | |
| 170 | Should Not Be Equal ${reservation_id} ${new_reservation_id} |
| 171 | ... msg=Getting same reseravtion ID for second time, reservation ID must be different. |
| 172 | |
| 173 | Test Get SDR Using Reservation ID |
| 174 | [Documentation] Verify get SDR command using reservation ID obtained from Reserve SDR repository. |
| 175 | [Tags] Test_Get_SDR_Using_Reservation_ID |
| 176 | |
| 177 | ${reservation_id}= Get Reservation ID add_prefix=True |
| 178 | |
| 179 | # Get SDR full without using Reservation ID. |
| 180 | Run External IPMI Raw Command ${IPMI_RAW_CMD['SDR']['Get'][0]} |
| 181 | |
| 182 | # Get SDR Partially using Reservation ID. |
| 183 | ${get_sdr_raw_cmd}= Catenate |
| 184 | ... ${IPMI_RAW_CMD['SDR']['Get'][1]} ${reservation_id} ${IPMI_RAW_CMD['SDR']['Get'][2]} |
| 185 | Run External IPMI Raw Command ${get_sdr_raw_cmd} |
| 186 | |
| 187 | # Get SDR partially without using reservation ID and expect error. |
| 188 | Verify Invalid IPMI Command ${IPMI_RAW_CMD['SDR']['Get'][3]} 0xc5 |
| 189 | |
| 190 | |
| 191 | Test Get SDR Using Invalid Reservation ID |
| 192 | [Documentation] Verify get SDR command using invalid reservation ID. |
| 193 | [Tags] Test_Get_SDR_Using_Invalid_Reservation_ID |
| 194 | |
| 195 | # Generate two reservation ID and verify get SDR partial using old reservation ID. |
| 196 | ${first_reservation_id}= Get Reservation ID add_prefix=True |
| 197 | ${second_reservation_id}= Get Reservation ID add_prefix=True |
| 198 | |
| 199 | # Creating raw command with First reservation ID. |
| 200 | ${get_sdr_raw_cmd}= Catenate |
| 201 | ... ${IPMI_RAW_CMD['SDR']['Get'][1]} ${first_reservation_id} ${IPMI_RAW_CMD['SDR']['Get'][2]} |
| 202 | |
| 203 | Verify Invalid IPMI Command ${get_sdr_raw_cmd} 0xc5 |
| 204 | |
| 205 | Test Reserve SDR Repository After BMC Reboot |
| 206 | [Documentation] Verify reserve SDR repository reservation ID after BMC Reboot. |
| 207 | [Tags] Test_Reserve_SDR_Repository_After_BMC_Reboot |
| 208 | |
| 209 | # Get Reservation ID before reboot. |
| 210 | ${reservation_id_before_reboot}= Get Reservation ID add_prefix=True |
| 211 | |
| 212 | # Cold reset BMC |
| 213 | IPMI MC Reset Cold (run) |
| 214 | |
| 215 | # Create Get SDR Partially command using reservation ID which got before reboot. |
| 216 | ${get_sdr_raw_cmd}= Catenate |
| 217 | ... ${IPMI_RAW_CMD['SDR']['Get'][1]} ${reservation_id_before_reboot} ${IPMI_RAW_CMD['SDR']['Get'][2]} |
| 218 | |
| 219 | Verify Invalid IPMI Command ${get_sdr_raw_cmd} 0xc5 |
| 220 | |
| 221 | # Verify get SDR partially with new reservation ID after reboot. |
| 222 | ${reservation_id_after_reboot}= Get Reservation ID add_prefix=True |
| 223 | ${get_sdr_raw_cmd}= Catenate |
| 224 | ... ${IPMI_RAW_CMD['SDR']['Get'][1]} ${reservation_id_after_reboot} ${IPMI_RAW_CMD['SDR']['Get'][2]} |
| 225 | Run External IPMI Raw Command ${get_sdr_raw_cmd} |
| 226 | |
Rahul Maheshwari | cd7b19c | 2018-04-10 07:35:56 -0500 | [diff] [blame] | 227 | |
Rahul Maheshwari | 77ab160 | 2018-02-28 07:21:55 -0600 | [diff] [blame] | 228 | *** Keywords *** |
| 229 | |
nagarjunb22 | 87138e6 | 2022-04-19 16:49:16 +0530 | [diff] [blame] | 230 | Get Reservation ID |
| 231 | [Documentation] Get reservation ID using reserve SDR repository. |
| 232 | [Arguments] ${add_prefix}=False ${convert_lsb_to_msb}=False |
| 233 | |
| 234 | # Description of argument(s): |
| 235 | # add_prefix If True will prefix "0x" to the reservation ID. |
| 236 | # e.g. IPMI response for Reservation ID command will be like 01 00 |
| 237 | # return reservation ID will be "0x01" for above response. |
| 238 | |
| 239 | # convert_lsb_to_msb If True will convert the reservation ID from LSB first to MSB first. |
| 240 | # e.g. IPMI response for reservation ID command will be like 01 0a |
| 241 | # return reservation ID will be "a1" for above response. |
| 242 | |
| 243 | ${reservation_id}= Run External IPMI Raw Command |
| 244 | ... ${IPMI_RAW_CMD['SDR']['Reserve SDR Repository'][0]} |
| 245 | |
| 246 | ${reservation_id}= Run Keyword If ${add_prefix} |
| 247 | ... Add Prefix To String ${reservation_id} 0x |
| 248 | ... ELSE IF ${convert_lsb_to_msb} |
| 249 | ... Convert LSB To MSB ${reservation_id} |
| 250 | ... ELSE |
| 251 | ... Return From Keyword ${reservation_id} |
| 252 | |
| 253 | [Return] ${reservation_id} |
| 254 | |
| 255 | |
Rahul Maheshwari | bad5e82 | 2019-07-30 12:36:27 -0500 | [diff] [blame] | 256 | Get Sensor Count |
| 257 | [Documentation] Get sensors count using "sdr elist all" command. |
| 258 | # Example of "sdr elist all" command output: |
| 259 | # BootProgress | 03h | ok | 34.2 | |
| 260 | # OperatingSystemS | 05h | ok | 35.1 | |
| 261 | # AttemptsLeft | 07h | ok | 34.1 | |
| 262 | # occ0 | 08h | ok | 210.1 | Device Disabled |
| 263 | # occ1 | 09h | ok | 210.2 | Device Disabled |
| 264 | # p0_core0_temp | 11h | ns | 3.1 | Disabled |
| 265 | # cpu0_core0 | 12h | ok | 208.1 | Presence detected |
| 266 | # p0_core1_temp | 14h | ns | 3.2 | Disabled |
| 267 | # cpu0_core1 | 15h | ok | 208.2 | Presence detected |
| 268 | # p0_core2_temp | 17h | ns | 3.3 | Disabled |
| 269 | # .. |
| 270 | # .. |
| 271 | # .. |
| 272 | # .. |
| 273 | # .. |
| 274 | # .. |
| 275 | # fan3 | 00h | ns | 29.4 | Logical FRU @35h |
| 276 | # bmc | 00h | ns | 6.1 | Logical FRU @3Ch |
| 277 | # ethernet | 00h | ns | 1.1 | Logical FRU @46h |
| 278 | |
| 279 | ${output}= Run IPMI Standard Command sdr elist all |
| 280 | ${sensor_list}= Split String ${output} \n |
| 281 | ${sensor_count}= Get Length ${sensor_list} |
| 282 | [Return] ${sensor_count} |
| 283 | |
| 284 | |
Rahul Maheshwari | 77ab160 | 2018-02-28 07:21:55 -0600 | [diff] [blame] | 285 | Get Component URIs |
| 286 | [Documentation] Get URIs for given component from given URIs |
| 287 | ... and return as a list. |
| 288 | [Arguments] ${component_name} ${uri_list}=${SYSTEM_URI} |
| 289 | |
| 290 | # A sample result returned for the "core" component: |
| 291 | # /xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core0 |
| 292 | # /xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core1 |
| 293 | # /xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core10 |
| 294 | # /xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core11 |
| 295 | # /xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0/core12 |
| 296 | # (etc.) |
| 297 | |
| 298 | # Description of argument(s): |
| 299 | # component_name Component name (e.g. "core", "dimm", etc.). |
| 300 | # uri_list URI list. |
| 301 | |
| 302 | ${component_uris}= Get Matches ${uri_list} |
Jayashree-D | 5ddaf9b | 2020-07-15 13:50:02 +0530 | [diff] [blame] | 303 | ... regexp=^.*[0-9a-z_].${component_name}\[_0-9a-z]*$ |
| 304 | ... case_insensitive=${True} |
Rahul Maheshwari | 77ab160 | 2018-02-28 07:21:55 -0600 | [diff] [blame] | 305 | [Return] ${component_uris} |
| 306 | |
| 307 | |
| 308 | Get SDR Presence Via IPMI |
| 309 | [Documentation] Return presence info from IPMI sensor data record. |
| 310 | [Arguments] ${component_name} |
| 311 | |
| 312 | # Description of argument(s): |
| 313 | # component_name Component name (e.g. "cpu0_core0", "dimm0", etc.). |
| 314 | |
| 315 | # Example of IPMI SDR elist output. |
| 316 | # BootProgress | 03h | ok | 34.2 | |
| 317 | # OperatingSystemS | 05h | ok | 35.1 | boot completed - device not specified |
| 318 | # AttemptsLeft | 07h | ok | 34.1 | |
| 319 | # occ0 | 08h | ok | 210.1 | Device Disabled |
| 320 | # occ1 | 09h | ok | 210.2 | Device Disabled |
| 321 | # cpu0_core0 | 12h | ok | 208.1 | Presence detected |
| 322 | # cpu0_core1 | 15h | ok | 208.2 | Disabled |
| 323 | # cpu0_core2 | 18h | ok | 208.3 | Presence detected |
| 324 | # dimm0 | A6h | ok | 32.1 | Presence Detected |
| 325 | # dimm1 | A8h | ok | 32.2 | Presence Detected |
| 326 | # dimm2 | AAh | ok | 32.9 | Presence Detected |
| 327 | # gv100card0 | C5h | ok | 216.1 | 0 unspecified |
| 328 | # gv100card1 | C8h | ok | 216.2 | 0 unspecified |
| 329 | # TPMEnable | D7h | ok | 3.3 | State Asserted |
| 330 | # auto_reboot | DAh | ok | 33.2 | State Asserted |
| 331 | # volatile | DBh | ok | 33.1 | State Deasserted |
| 332 | |
| 333 | ${sdr_elist_output}= Run IPMI Standard Command sdr elist |
| 334 | ${sdr_component_line}= |
| 335 | ... Get Lines Containing String ${sdr_elist_output} ${component_name} |
| 336 | ... case-insensitive |
| 337 | |
| 338 | ${presence_ipmi}= Fetch From Right ${sdr_component_line} | |
| 339 | ${presence_ipmi}= Strip String ${presence_ipmi} |
| 340 | [Return] ${presence_ipmi} |
| 341 | |
| 342 | |
| 343 | Verify SDR |
| 344 | [Documentation] Verify IPMI sensor data record for given component |
George Keishing | d6bc1c1 | 2019-03-08 12:59:29 -0600 | [diff] [blame] | 345 | ... with Redfish. |
Rahul Maheshwari | 77ab160 | 2018-02-28 07:21:55 -0600 | [diff] [blame] | 346 | [Arguments] ${component_name} |
| 347 | |
| 348 | # Description of argument(s): |
| 349 | # component_name Component name (e.g. "cpu0/core0", "dimm0", etc.). |
| 350 | |
| 351 | ${presence_rest}= Read Attribute |
| 352 | ... ${HOST_INVENTORY_URI}system/chassis/motherboard/${component_name} |
| 353 | ... Present |
| 354 | ${functional_rest}= Read Attribute |
| 355 | ... ${HOST_INVENTORY_URI}system/chassis/motherboard/${component_name} |
| 356 | ... Functional |
| 357 | |
| 358 | # Replace "/" with "_" if there is any "/" in component name. |
| 359 | # e.g. cpu0/core0 to cpu0_core0 |
| 360 | ${component_name}= Replace String ${component_name} / _ |
| 361 | ${presence_ipmi}= Get SDR Presence Via IPMI ${component_name}${SPACE} |
| 362 | |
Tim Lee | ada4b0c | 2021-08-25 14:52:42 +0800 | [diff] [blame] | 363 | Run Keyword If '${presence_ipmi}' == 'Disabled' or '${presence_ipmi}' == '' |
George Keishing | 9a75e68 | 2019-10-24 00:22:08 -0500 | [diff] [blame] | 364 | ... Should Be True ${presence_rest} == ${0} and ${functional_rest} == ${0} |
Rahul Maheshwari | 77ab160 | 2018-02-28 07:21:55 -0600 | [diff] [blame] | 365 | ... ELSE IF '${presence_ipmi}' == 'Presence Detected' or '${presence_ipmi}' == 'Presence detected' |
George Keishing | 9a75e68 | 2019-10-24 00:22:08 -0500 | [diff] [blame] | 366 | ... Should Be True ${presence_rest} == ${1} and ${functional_rest} == ${1} |
Rahul Maheshwari | 77ab160 | 2018-02-28 07:21:55 -0600 | [diff] [blame] | 367 | ... ELSE IF '${presence_ipmi}' == 'State Asserted' |
George Keishing | 9a75e68 | 2019-10-24 00:22:08 -0500 | [diff] [blame] | 368 | ... Should Be True ${presence_rest} == ${1} and ${functional_rest} == ${1} |
Rahul Maheshwari | 77ab160 | 2018-02-28 07:21:55 -0600 | [diff] [blame] | 369 | ... ELSE IF '${presence_ipmi}' == 'State Deasserted' |
George Keishing | 9a75e68 | 2019-10-24 00:22:08 -0500 | [diff] [blame] | 370 | ... Should Be True ${presence_rest} == ${1} and ${functional_rest} == ${0} |
Rahul Maheshwari | 77ab160 | 2018-02-28 07:21:55 -0600 | [diff] [blame] | 371 | ... ELSE Fail msg=Invalid Presence${presence_ipmi} |
| 372 | |
| 373 | |
| 374 | Test SDR Info |
| 375 | [Documentation] Test SDR info for given component. |
| 376 | [Arguments] ${component_name} |
| 377 | |
| 378 | # Description of argument(s): |
| 379 | # component_name Component name (e.g. "core", "dimm", etc.). |
| 380 | |
| 381 | ${component_uri_list}= Get Component URIs ${component_name} |
Sushil Singh | ab209cd | 2020-07-01 09:01:14 -0500 | [diff] [blame] | 382 | |
| 383 | FOR ${uri} IN @{component_uri_list} |
| 384 | ${component_name}= Fetch From Right ${uri} motherboard/ |
| 385 | Log To Console ${component_name} |
| 386 | Verify SDR ${component_name} |
| 387 | END |
Rahul Maheshwari | 77ab160 | 2018-02-28 07:21:55 -0600 | [diff] [blame] | 388 | |
nagarjunb22 | 87138e6 | 2022-04-19 16:49:16 +0530 | [diff] [blame] | 389 | Fetch IPMI Command Support Status |
| 390 | [Documentation] Return yes if IPMI command is supported. |
| 391 | [Arguments] ${ipmi_cmd} |
| 392 | |
| 393 | # Description of argument(s): |
| 394 | # ipmi_cmd IPMI command. |
| 395 | |
| 396 | ${resp}= Run External IPMI Raw Command ${ipmi_cmd} fail_on_err=0 |
| 397 | ${resp_code_match}= Get Regexp Matches ${resp} rsp=0xc1 |
| 398 | |
| 399 | ${cmd_support}= Set Variable If ${resp_code_match} != [] no yes |
| 400 | |
| 401 | [Return] ${cmd_support} |
| 402 | |
Rahul Maheshwari | 77ab160 | 2018-02-28 07:21:55 -0600 | [diff] [blame] | 403 | |
| 404 | Suite Setup Execution |
| 405 | [Documentation] Do the initial suite setup. |
| 406 | |
George Keishing | 2d0edad | 2021-08-18 11:44:10 -0500 | [diff] [blame] | 407 | Redfish.Login |
Rahul Maheshwari | b6ebe4c | 2019-07-17 02:02:17 -0500 | [diff] [blame] | 408 | Redfish Power On stack_mode=skip quiet=1 |
Rahul Maheshwari | 77ab160 | 2018-02-28 07:21:55 -0600 | [diff] [blame] | 409 | |
| 410 | ${uri_list}= Read Properties ${OPENBMC_BASE_URI}list |
| 411 | Set Suite Variable ${SYSTEM_URI} ${uri_list} |
| 412 | Log ${uri_list} |
| 413 | |
| 414 | |
| 415 | Test Teardown Execution |
| 416 | [Documentation] Do the post test teardown. |
| 417 | |
| 418 | FFDC On Test Case Fail |