blob: 0192d3646e1fc8479dfaef732e86ce78356e37a2 [file] [log] [blame]
Sridevi Rameshb180c9f2017-08-06 10:27:41 -05001*** Settings ***
2Documentation This suite tests checkstop operations through HOST.
3Resource ../lib/utils.robot
4Resource ../lib/openbmc_ffdc.robot
5Resource ../lib/ras/host_utils.robot
6Resource ../lib/resource.txt
7Resource ../lib/state_manager.robot
8Resource ../lib/openbmc_ffdc_methods.robot
9Resource ../lib/boot_utils.robot
10Variables ../lib/ras/variables.py
11
12Library DateTime
13Library OperatingSystem
Sridevi Ramesh0d88ab32017-09-21 11:07:28 -050014Library random
15Library Collections
Sridevi Rameshb180c9f2017-08-06 10:27:41 -050016
17Suite Setup RAS Suite Setup
18Test Setup RAS Test Setup
19Test Teardown FFDC On Test Case Fail
20Suite Teardown RAS Suite Cleanup
21
22*** Variables ***
23${stack_mode} normal
24
25*** Test Cases ***
26
27# Memory channel (MCACALIFIR) related error injection.
28
29Verify 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
39Verify 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 Rameshb180c9f2017-08-06 10:27:41 -050049Verify 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
60Verify 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
70Verify 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 Rameshb180c9f2017-08-06 10:27:41 -050079# CAPP accelerator (CXAFIR) related error injection.
80
81Verify 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
91Verify 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
103Verify 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
115Verify 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 Ramesh6bd6b4c2017-10-10 04:38:30 -0500125# Nest accelerator NXDMAENGFIR related error injection.
126
127Verify 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
138Verify 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
148Verify 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 Rameshb180c9f2017-08-06 10:27:41 -0500157*** Keywords ***
158
159Inject 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 Ramesh0d88ab32017-09-21 11:07:28 -0500165 [Arguments] ${fir} ${chip_address} ${threshold_limit}
Sridevi Rameshb180c9f2017-08-06 10:27:41 -0500166 # Description of argument(s):
Sridevi Ramesh0d88ab32017-09-21 11:07:28 -0500167 # fir FIR (Fault isolation register) value (e.g. 2011400).
Sridevi Rameshb180c9f2017-08-06 10:27:41 -0500168 # 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 Ramesh0d88ab32017-09-21 11:07:28 -0500176 ${chip_ids}= Get ProcChipId From OS Processor
Sridevi Rameshb180c9f2017-08-06 10:27:41 -0500177 ${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 Ramesh0d88ab32017-09-21 11:07:28 -0500182 \ Run Keyword Putscom Operations On OS ${proc_id} ${fir} ${chip_address}
Sridevi Rameshb180c9f2017-08-06 10:27:41 -0500183 # Adding delay after each error injection.
Sridevi Ramesh6bd6b4c2017-10-10 04:38:30 -0500184 \ Sleep 10s
Sridevi Rameshb180c9f2017-08-06 10:27:41 -0500185 # Adding delay to get error log after error injection.
Sridevi Ramesh6bd6b4c2017-10-10 04:38:30 -0500186 Sleep 120s
Sridevi Rameshb180c9f2017-08-06 10:27:41 -0500187
188Verify And Clear Gard Records On HOST
189 [Documentation] Verify And Clear gard records on HOST.
190
Sridevi Rameshb180c9f2017-08-06 10:27:41 -0500191 ${output}= Gard Operations On OS list
192 Should Not Contain ${output} 'No GARD entries to display'
193 Gard Operations On OS clear all
194
195Verify 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 Ramesh6bd6b4c2017-10-10 04:38:30 -0500208 ... grep -i ${signature_desc} ${error_log_file_path}
Sridevi Rameshb180c9f2017-08-06 10:27:41 -0500209 Should Not Be Empty ${output}
210
211Inject 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 Ramesh0d88ab32017-09-21 11:07:28 -0500220 [Arguments] ${fir} ${chip_address} ${threshold_limit}
Sridevi Rameshb180c9f2017-08-06 10:27:41 -0500221 ... ${signature_desc} ${log_prefix}
222 # Description of argument(s):
Sridevi Ramesh0d88ab32017-09-21 11:07:28 -0500223 # fir FIR (Fault isolation register) value (e.g. 2011400).
Sridevi Rameshb180c9f2017-08-06 10:27:41 -0500224 # 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 Ramesh0d88ab32017-09-21 11:07:28 -0500230 Inject Error Through HOST ${fir} ${chip_address} ${threshold_limit}
Sridevi Rameshb180c9f2017-08-06 10:27:41 -0500231 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
237Inject 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 Ramesh0d88ab32017-09-21 11:07:28 -0500246 [Arguments] ${fir} ${chip_address} ${threshold_limit}
Sridevi Rameshb180c9f2017-08-06 10:27:41 -0500247 ... ${signature_desc} ${log_prefix}
248 # Description of argument(s):
Sridevi Ramesh0d88ab32017-09-21 11:07:28 -0500249 # fir FIR (Fault isolation register) value (e.g. 2011400).
Sridevi Rameshb180c9f2017-08-06 10:27:41 -0500250 # 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 Ramesh0d88ab32017-09-21 11:07:28 -0500257 Inject Error Through HOST ${fir} ${chip_address} ${threshold_limit}
Sridevi Rameshb180c9f2017-08-06 10:27:41 -0500258 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 Ramesh0d88ab32017-09-21 11:07:28 -0500263Fetch 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 Rameshb180c9f2017-08-06 10:27:41 -0500285
286RAS 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 Ramesh6bd6b4c2017-10-10 04:38:30 -0500297 REST Power On quiet=${1}
Sridevi Ramesh0d88ab32017-09-21 11:07:28 -0500298 # Adding delay to after host bring up.
299 Sleep 60s
Sridevi Rameshb180c9f2017-08-06 10:27:41 -0500300
301RAS 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
310RAS Suite Cleanup
311 [Documentation] Perform RAS suite cleanup and verify that host
312 ... boots after test suite run.
313
314 # Boot to OS.
Sridevi Ramesh6bd6b4c2017-10-10 04:38:30 -0500315 REST Power On quiet=${1}
Sridevi Rameshb180c9f2017-08-06 10:27:41 -0500316 Delete Error Logs
Sridevi Rameshb180c9f2017-08-06 10:27:41 -0500317 Gard Operations On OS clear all