Sridevi Ramesh | b180c9f | 2017-08-06 10:27:41 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Documentation This suite tests checkstop operations through HOST. |
| 3 | Resource ../lib/utils.robot |
| 4 | Resource ../lib/openbmc_ffdc.robot |
| 5 | Resource ../lib/ras/host_utils.robot |
| 6 | Resource ../lib/resource.txt |
| 7 | Resource ../lib/state_manager.robot |
| 8 | Resource ../lib/openbmc_ffdc_methods.robot |
| 9 | Resource ../lib/boot_utils.robot |
| 10 | Variables ../lib/ras/variables.py |
| 11 | |
| 12 | Library DateTime |
| 13 | Library OperatingSystem |
Sridevi Ramesh | 0d88ab3 | 2017-09-21 11:07:28 -0500 | [diff] [blame] | 14 | Library random |
| 15 | Library Collections |
Sridevi Ramesh | b180c9f | 2017-08-06 10:27:41 -0500 | [diff] [blame] | 16 | |
| 17 | Suite Setup RAS Suite Setup |
| 18 | Test Setup RAS Test Setup |
| 19 | Test Teardown FFDC On Test Case Fail |
| 20 | Suite Teardown RAS Suite Cleanup |
| 21 | |
| 22 | *** Variables *** |
| 23 | ${stack_mode} normal |
| 24 | |
| 25 | *** Test Cases *** |
| 26 | |
| 27 | # Memory channel (MCACALIFIR) related error injection. |
| 28 | |
| 29 | Verify Recoverable Callout Handling For MCA With Threshold 1 |
| 30 | [Documentation] Verify recoverable callout handling for MCACALIFIR with |
| 31 | ... threshold 1. |
| 32 | [Tags] Verify_Recoverable_Callout_Handling_For_MCA_With_Threshold_1 |
| 33 | |
| 34 | ${value}= Get From Dictionary ${ERROR_INJECT_DICT} MCACALIFIR_RECV1 |
| 35 | ${err_log_path}= Catenate ${RAS_LOG_DIR_PATH}mcacalfir_th1 |
| 36 | Inject Recoverable Error With Threshold Limit Through Host |
| 37 | ... ${value[0]} ${value[1]} 1 ${value[2]} ${err_log_path} |
| 38 | |
| 39 | Verify Recoverable Callout Handling For MCA With Threshold 32 |
| 40 | [Documentation] Verify recoverable callout handling for MCACALIFIR with |
| 41 | ... threshold 32. |
| 42 | [Tags] Verify_Recoverable_Callout_Handling_For_MCA_With_Threshold_32 |
| 43 | |
| 44 | ${value}= Get From Dictionary ${ERROR_INJECT_DICT} MCACALIFIR_RECV32 |
| 45 | ${err_log_path}= Catenate ${RAS_LOG_DIR_PATH}mcacalfir_th32 |
| 46 | Inject Recoverable Error With Threshold Limit Through Host |
| 47 | ... ${value[0]} ${value[1]} 32 ${value[2]} ${err_log_path} |
| 48 | |
Sridevi Ramesh | b180c9f | 2017-08-06 10:27:41 -0500 | [diff] [blame] | 49 | Verify Unrecoverable Callout Handling For MCA |
| 50 | [Documentation] Verify unrecoverable callout handling for MCACALIFIR. |
| 51 | [Tags] Verify_Unrecoverable_Callout_Handling_For_MCA |
| 52 | |
| 53 | ${value}= Get From Dictionary ${ERROR_INJECT_DICT} MCACALIFIR_UE |
| 54 | ${err_log_path}= Catenate ${RAS_LOG_DIR_PATH}mcacalfir |
| 55 | Inject Unrecoverable Error Through Host |
| 56 | ... ${value[0]} ${value[1]} 1 ${value[2]} ${err_log_path} |
| 57 | |
| 58 | # Memory buffer (MCIFIR) related error injection. |
| 59 | |
| 60 | Verify Recoverable Callout Handling For MCI With Threshold 1 |
| 61 | [Documentation] Verify recoverable callout handling for mci with |
| 62 | ... threshold 1. |
| 63 | [Tags] Verify_Recoverable_Callout_Handling_For_MCI_With_Threshold_1 |
| 64 | |
| 65 | ${value}= Get From Dictionary ${ERROR_INJECT_DICT} MCS_RECV1 |
| 66 | ${err_log_path}= Catenate ${RAS_LOG_DIR_PATH}mcifir_th1 |
| 67 | Inject Recoverable Error With Threshold Limit Through Host |
| 68 | ... ${value[0]} ${value[1]} 1 ${value[2]} ${err_log_path} |
| 69 | |
| 70 | Verify Unrecoverable Callout Handling For MCI |
| 71 | [Documentation] Verify unrecoverable callout handling for mci. |
| 72 | [Tags] Verify_Unrecoverable_Callout_Handling_For_MCI |
| 73 | |
| 74 | ${value}= Get From Dictionary ${ERROR_INJECT_DICT} MCS_UE |
| 75 | ${err_log_path}= Catenate ${RAS_LOG_DIR_PATH}mcifir |
| 76 | Inject Unrecoverable Error Through Host |
| 77 | ... ${value[0]} ${value[1]} 1 ${value[2]} ${err_log_path} |
| 78 | |
Sridevi Ramesh | b180c9f | 2017-08-06 10:27:41 -0500 | [diff] [blame] | 79 | # CAPP accelerator (CXAFIR) related error injection. |
| 80 | |
| 81 | Verify Recoverable Callout Handling For CXA With Threshold 5 |
| 82 | [Documentation] Verify recoverable callout handling for CXA with |
| 83 | ... threshold 5. |
| 84 | [Tags] Verify_Recoverable_Callout_Handling_For_CXA_With_Threshold_5 |
| 85 | |
| 86 | ${value}= Get From Dictionary ${ERROR_INJECT_DICT} CXA_RECV5 |
| 87 | ${err_log_path}= Catenate ${RAS_LOG_DIR_PATH}cxafir_th5 |
| 88 | Inject Recoverable Error With Threshold Limit Through Host |
| 89 | ... ${value[0]} ${value[1]} 5 ${value[2]} ${err_log_path} |
| 90 | |
| 91 | Verify Recoverable Callout Handling For CXA With Threshold 32 |
| 92 | [Documentation] Verify recoverable callout handling for CXA with |
| 93 | ... threshold 32. |
| 94 | [Tags] Verify_Recoverable_Callout_Handling_For_CXA_With_Threshold_32 |
| 95 | |
| 96 | ${value}= Get From Dictionary ${ERROR_INJECT_DICT} CXA_RECV32 |
| 97 | ${err_log_path}= Catenate ${RAS_LOG_DIR_PATH}cxafir_th32 |
| 98 | Inject Recoverable Error With Threshold Limit Through Host |
| 99 | ... ${value[0]} ${value[1]} 32 ${value[2]} ${err_log_path} |
| 100 | |
| 101 | # OBUSFIR related error injection. |
| 102 | |
| 103 | Verify Recoverable Callout Handling For OBUS With Threshold 32 |
| 104 | [Documentation] Verify recoverable callout handling for OBUS with |
| 105 | ... threshold 32. |
| 106 | [Tags] Verify_Recoverable_Callout_Handling_For_OBUS_With_Threshold_32 |
| 107 | |
| 108 | ${value}= Get From Dictionary ${ERROR_INJECT_DICT} OBUS_RECV32 |
| 109 | ${err_log_path}= Catenate ${RAS_LOG_DIR_PATH}obusfir_th32 |
| 110 | Inject Recoverable Error With Threshold Limit Through Host |
| 111 | ... ${value[0]} ${value[1]} 32 ${value[2]} ${err_log_path} |
| 112 | |
| 113 | # Nvidia graphics processing units (NPU0FIR) related error injection. |
| 114 | |
| 115 | Verify Recoverable Callout Handling For NPU0 With Threshold 32 |
| 116 | [Documentation] Verify recoverable callout handling for NPU0 with |
| 117 | ... threshold 32. |
| 118 | [Tags] Verify_Recoverable_Callout_Handling_For_NPU0_With_Threshold_32 |
| 119 | |
| 120 | ${value}= Get From Dictionary ${ERROR_INJECT_DICT} NPU0_RECV32 |
| 121 | ${err_log_path}= Catenate ${RAS_LOG_DIR_PATH}npu0fir_th32 |
| 122 | Inject Recoverable Error With Threshold Limit Through Host |
| 123 | ... ${value[0]} ${value[1]} 32 ${value[2]} ${err_log_path} |
| 124 | |
Sridevi Ramesh | 6bd6b4c | 2017-10-10 04:38:30 -0500 | [diff] [blame] | 125 | # Nest accelerator NXDMAENGFIR related error injection. |
| 126 | |
| 127 | Verify Recoverable Callout Handling For NXDMAENG With Threshold 1 |
| 128 | [Documentation] Verify recoverable callout handling for NXDMAENG with |
| 129 | ... threshold 1. |
| 130 | [Tags] Verify_Recoverable_Callout_Handling_For_NXDMAENG_With_Threshold_1 |
| 131 | |
| 132 | ${value}= Get From Dictionary ${ERROR_INJECT_DICT} NX_RECV1 |
| 133 | ${err_log_path}= Catenate ${RAS_LOG_DIR_PATH}nxfir_th1 |
| 134 | Inject Recoverable Error With Threshold Limit Through Host |
| 135 | ... ${value[0]} ${value[1]} 1 ${value[2]} ${err_log_path} |
| 136 | |
| 137 | |
| 138 | Verify Recoverable Callout Handling For NXDMAENG With Threshold 32 |
| 139 | [Documentation] Verify recoverable callout handling for NXDMAENG with |
| 140 | ... threshold 32. |
| 141 | [Tags] Verify_Recoverable_Callout_Handling_For_NXDMAENG_With_Threshold_32 |
| 142 | |
| 143 | ${value}= Get From Dictionary ${ERROR_INJECT_DICT} NX_RECV32 |
| 144 | ${err_log_path}= Catenate ${RAS_LOG_DIR_PATH}nxfir_th32 |
| 145 | Inject Recoverable Error With Threshold Limit Through Host |
| 146 | ... ${value[0]} ${value[1]} 32 ${value[2]} ${err_log_path} |
| 147 | |
| 148 | Verify Unrecoverable Callout Handling For NXDMAENG |
| 149 | [Documentation] Verify unrecoverable callout handling for NXDMAENG. |
| 150 | [Tags] Verify_Unrecoverable_Callout_Handling_For_NXDMAENG |
| 151 | |
| 152 | ${value}= Get From Dictionary ${ERROR_INJECT_DICT} NX_UE |
| 153 | ${err_log_path}= Catenate ${RAS_LOG_DIR_PATH}nxfir_ue |
| 154 | Inject Unrecoverable Error Through Host |
| 155 | ... ${value[0]} ${value[1]} 1 ${value[2]} ${err_log_path} |
| 156 | |
Sridevi Ramesh | b180c9f | 2017-08-06 10:27:41 -0500 | [diff] [blame] | 157 | *** Keywords *** |
| 158 | |
| 159 | Inject Error Through HOST |
| 160 | [Documentation] Inject checkstop on processor through HOST. |
| 161 | ... Test sequence: |
| 162 | ... 1. Boot To HOST |
| 163 | ... 2. Clear any existing gard records |
| 164 | ... 3. Inject Error on processor/centaur |
Sridevi Ramesh | 0d88ab3 | 2017-09-21 11:07:28 -0500 | [diff] [blame] | 165 | [Arguments] ${fir} ${chip_address} ${threshold_limit} |
Sridevi Ramesh | b180c9f | 2017-08-06 10:27:41 -0500 | [diff] [blame] | 166 | # Description of argument(s): |
Sridevi Ramesh | 0d88ab3 | 2017-09-21 11:07:28 -0500 | [diff] [blame] | 167 | # fir FIR (Fault isolation register) value (e.g. 2011400). |
Sridevi Ramesh | b180c9f | 2017-08-06 10:27:41 -0500 | [diff] [blame] | 168 | # chip_address chip address (e.g 2000000000000000). |
| 169 | # threshold_limit Threshold limit (e.g 1, 5, 32). |
| 170 | |
| 171 | Delete Error Logs |
| 172 | Login To OS Host |
| 173 | Gard Operations On OS clear all |
| 174 | |
| 175 | # Fetch processor chip IDs. |
Sridevi Ramesh | 0d88ab3 | 2017-09-21 11:07:28 -0500 | [diff] [blame] | 176 | ${chip_ids}= Get ProcChipId From OS Processor |
Sridevi Ramesh | b180c9f | 2017-08-06 10:27:41 -0500 | [diff] [blame] | 177 | ${proc_ids}= Split String ${chip_ids} |
| 178 | ${proc_id}= Get From List ${proc_ids} 1 |
| 179 | |
| 180 | ${threshold_limit}= Convert To Integer ${threshold_limit} |
| 181 | :FOR ${i} IN RANGE ${threshold_limit} |
Sridevi Ramesh | 0d88ab3 | 2017-09-21 11:07:28 -0500 | [diff] [blame] | 182 | \ Run Keyword Putscom Operations On OS ${proc_id} ${fir} ${chip_address} |
Sridevi Ramesh | b180c9f | 2017-08-06 10:27:41 -0500 | [diff] [blame] | 183 | # Adding delay after each error injection. |
Sridevi Ramesh | 6bd6b4c | 2017-10-10 04:38:30 -0500 | [diff] [blame] | 184 | \ Sleep 10s |
Sridevi Ramesh | b180c9f | 2017-08-06 10:27:41 -0500 | [diff] [blame] | 185 | # Adding delay to get error log after error injection. |
Sridevi Ramesh | 6bd6b4c | 2017-10-10 04:38:30 -0500 | [diff] [blame] | 186 | Sleep 120s |
Sridevi Ramesh | b180c9f | 2017-08-06 10:27:41 -0500 | [diff] [blame] | 187 | |
| 188 | Verify And Clear Gard Records On HOST |
| 189 | [Documentation] Verify And Clear gard records on HOST. |
| 190 | |
Sridevi Ramesh | b180c9f | 2017-08-06 10:27:41 -0500 | [diff] [blame] | 191 | ${output}= Gard Operations On OS list |
| 192 | Should Not Contain ${output} 'No GARD entries to display' |
| 193 | Gard Operations On OS clear all |
| 194 | |
| 195 | Verify Error Log Entry |
| 196 | [Documentation] Verify error log entry & signature description. |
| 197 | [Arguments] ${signature_desc} ${log_prefix} |
| 198 | # Description of argument(s): |
| 199 | # signature_desc Error log signature description. |
| 200 | # log_prefix Log path prefix. |
| 201 | |
| 202 | ${resp}= OpenBMC Get Request ${BMC_LOGGING_ENTRY}/list |
| 203 | Should Not Be Equal As Strings ${resp.status_code} ${HTTP_NOT_FOUND} |
| 204 | |
| 205 | Collect eSEL Log ${log_prefix} |
| 206 | ${error_log_file_path}= Catenate ${log_prefix}esel.txt |
| 207 | ${rc} ${output} = Run and Return RC and Output |
Sridevi Ramesh | 6bd6b4c | 2017-10-10 04:38:30 -0500 | [diff] [blame] | 208 | ... grep -i ${signature_desc} ${error_log_file_path} |
Sridevi Ramesh | b180c9f | 2017-08-06 10:27:41 -0500 | [diff] [blame] | 209 | Should Not Be Empty ${output} |
| 210 | |
| 211 | Inject Recoverable Error With Threshold Limit Through Host |
| 212 | [Documentation] Inject and verify recoverable error on processor through |
| 213 | ... host. |
| 214 | ... Test sequence: |
| 215 | ... 1. Enable Auto Reboot Setting |
| 216 | ... 2. Inject Error on processor/centaur |
| 217 | ... 3. Check If HOST is running. |
| 218 | ... 4. Verify error log entry & signature description. |
| 219 | ... 4. Verify & clear gard records. |
Sridevi Ramesh | 0d88ab3 | 2017-09-21 11:07:28 -0500 | [diff] [blame] | 220 | [Arguments] ${fir} ${chip_address} ${threshold_limit} |
Sridevi Ramesh | b180c9f | 2017-08-06 10:27:41 -0500 | [diff] [blame] | 221 | ... ${signature_desc} ${log_prefix} |
| 222 | # Description of argument(s): |
Sridevi Ramesh | 0d88ab3 | 2017-09-21 11:07:28 -0500 | [diff] [blame] | 223 | # fir FIR (Fault isolation register) value (e.g. 2011400). |
Sridevi Ramesh | b180c9f | 2017-08-06 10:27:41 -0500 | [diff] [blame] | 224 | # chip_address Chip address (e.g 2000000000000000). |
| 225 | # threshold_limit Threshold limit (e.g 1, 5, 32). |
| 226 | # signature_desc Error log signature description. |
| 227 | # log_prefix Log path prefix. |
| 228 | |
| 229 | Set Auto Reboot 1 |
Sridevi Ramesh | 0d88ab3 | 2017-09-21 11:07:28 -0500 | [diff] [blame] | 230 | Inject Error Through HOST ${fir} ${chip_address} ${threshold_limit} |
Sridevi Ramesh | b180c9f | 2017-08-06 10:27:41 -0500 | [diff] [blame] | 231 | Is Host Running |
| 232 | ${output}= Gard Operations On OS list |
| 233 | Should Contain ${output} No GARD |
| 234 | Verify Error Log Entry ${signature_desc} ${log_prefix} |
| 235 | |
| 236 | |
| 237 | Inject Unrecoverable Error Through Host |
| 238 | [Documentation] Inject and verify recoverable error on processor through |
| 239 | ... host. |
| 240 | ... Test sequence: |
| 241 | ... 1. Enable Auto Reboot Setting |
| 242 | ... 2. Inject Error on processor/centaur |
| 243 | ... 3. Check If HOST is rebooted. |
| 244 | ... 4. Verify error log entry & signature description. |
| 245 | ... 4. Verify & clear gard records. |
Sridevi Ramesh | 0d88ab3 | 2017-09-21 11:07:28 -0500 | [diff] [blame] | 246 | [Arguments] ${fir} ${chip_address} ${threshold_limit} |
Sridevi Ramesh | b180c9f | 2017-08-06 10:27:41 -0500 | [diff] [blame] | 247 | ... ${signature_desc} ${log_prefix} |
| 248 | # Description of argument(s): |
Sridevi Ramesh | 0d88ab3 | 2017-09-21 11:07:28 -0500 | [diff] [blame] | 249 | # fir FIR (Fault isolation register) value (e.g. 2011400). |
Sridevi Ramesh | b180c9f | 2017-08-06 10:27:41 -0500 | [diff] [blame] | 250 | # chip_address Chip address (e.g 2000000000000000). |
| 251 | # threshold_limit Threshold limit (e.g 1, 5, 32). |
| 252 | # signature_desc Error Log signature description. |
| 253 | # (e.g 'mcs(n0p0c0) (MCFIR[0]) mc internal recoverable') |
| 254 | # log_prefix Log path prefix. |
| 255 | |
| 256 | Set Auto Reboot 1 |
Sridevi Ramesh | 0d88ab3 | 2017-09-21 11:07:28 -0500 | [diff] [blame] | 257 | Inject Error Through HOST ${fir} ${chip_address} ${threshold_limit} |
Sridevi Ramesh | b180c9f | 2017-08-06 10:27:41 -0500 | [diff] [blame] | 258 | Wait Until Keyword Succeeds 500 sec 20 sec Is Host Rebooted |
| 259 | Wait for OS |
| 260 | Verify And Clear Gard Records On HOST |
| 261 | Verify Error Log Entry ${signature_desc} ${log_prefix} |
| 262 | |
Sridevi Ramesh | 0d88ab3 | 2017-09-21 11:07:28 -0500 | [diff] [blame] | 263 | Fetch FIR Address Translation Value |
| 264 | [Documentation] Fetch FIR address translation value through HOST. |
| 265 | [Arguments] ${proc_chip_id} ${fir} ${target_type} |
| 266 | # Description of argument(s): |
| 267 | # proc_chip_id Processor chip ID (e.g '0', '8'). |
| 268 | # fir FIR (Fault isolation register) value (e.g. 2011400). |
| 269 | # core_id Core ID (e.g. 9). |
| 270 | # target_type Target type (e.g. 'EX', 'EQ', 'C'). |
| 271 | |
| 272 | Login To OS Host |
| 273 | Copy Address Translation Utils To HOST OS |
| 274 | |
| 275 | ${core_ids}= Get Core IDs From OS 0 |
| 276 | # Ignoring master core ID. |
| 277 | ${output}= Get Slice From List ${core_ids} 1 |
| 278 | # Feth random non-master core ID. |
| 279 | ${core_ids_sub_list}= Evaluate random.sample(${core_ids}, 1) random |
| 280 | ${core_id}= Get From List ${core_ids_sub_list} 0 |
| 281 | ${translated_fir_addr}= FIR Address Translation Through HOST |
| 282 | ... ${fir} ${core_id} ${target_type} |
| 283 | |
| 284 | [Return] ${translated_fir_addr} |
Sridevi Ramesh | b180c9f | 2017-08-06 10:27:41 -0500 | [diff] [blame] | 285 | |
| 286 | RAS Test SetUp |
| 287 | [Documentation] Validates input parameters. |
| 288 | |
| 289 | Should Not Be Empty |
| 290 | ... ${OS_HOST} msg=You must provide DNS name/IP of the OS host. |
| 291 | Should Not Be Empty |
| 292 | ... ${OS_USERNAME} msg=You must provide OS host user name. |
| 293 | Should Not Be Empty |
| 294 | ... ${OS_PASSWORD} msg=You must provide OS host user password. |
| 295 | |
| 296 | # Boot to OS. |
Sridevi Ramesh | 6bd6b4c | 2017-10-10 04:38:30 -0500 | [diff] [blame] | 297 | REST Power On quiet=${1} |
Sridevi Ramesh | 0d88ab3 | 2017-09-21 11:07:28 -0500 | [diff] [blame] | 298 | # Adding delay to after host bring up. |
| 299 | Sleep 60s |
Sridevi Ramesh | b180c9f | 2017-08-06 10:27:41 -0500 | [diff] [blame] | 300 | |
| 301 | RAS Suite Setup |
| 302 | [Documentation] Create RAS log directory to store all RAS test logs. |
| 303 | |
| 304 | ${RAS_LOG_DIR_PATH}= Catenate ${EXECDIR}/RAS_logs/ |
| 305 | Set Suite Variable ${RAS_LOG_DIR_PATH} |
| 306 | Create Directory ${RAS_LOG_DIR_PATH} |
| 307 | OperatingSystem.Directory Should Exist ${RAS_LOG_DIR_PATH} |
| 308 | Empty Directory ${RAS_LOG_DIR_PATH} |
| 309 | |
| 310 | RAS Suite Cleanup |
| 311 | [Documentation] Perform RAS suite cleanup and verify that host |
| 312 | ... boots after test suite run. |
| 313 | |
| 314 | # Boot to OS. |
Sridevi Ramesh | 6bd6b4c | 2017-10-10 04:38:30 -0500 | [diff] [blame] | 315 | REST Power On quiet=${1} |
Sridevi Ramesh | b180c9f | 2017-08-06 10:27:41 -0500 | [diff] [blame] | 316 | Delete Error Logs |
Sridevi Ramesh | b180c9f | 2017-08-06 10:27:41 -0500 | [diff] [blame] | 317 | Gard Operations On OS clear all |