blob: c002c63edb56f45b93cf0078a77ce52af26a8b64 [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
14
15Suite Setup RAS Suite Setup
16Test Setup RAS Test Setup
17Test Teardown FFDC On Test Case Fail
18Suite Teardown RAS Suite Cleanup
19
20*** Variables ***
21${stack_mode} normal
22
23*** Test Cases ***
24
25# Memory channel (MCACALIFIR) related error injection.
26
27Verify Recoverable Callout Handling For MCA With Threshold 1
28 [Documentation] Verify recoverable callout handling for MCACALIFIR with
29 ... threshold 1.
30 [Tags] Verify_Recoverable_Callout_Handling_For_MCA_With_Threshold_1
31
32 ${value}= Get From Dictionary ${ERROR_INJECT_DICT} MCACALIFIR_RECV1
33 ${err_log_path}= Catenate ${RAS_LOG_DIR_PATH}mcacalfir_th1
34 Inject Recoverable Error With Threshold Limit Through Host
35 ... ${value[0]} ${value[1]} 1 ${value[2]} ${err_log_path}
36
37Verify Recoverable Callout Handling For MCA With Threshold 32
38 [Documentation] Verify recoverable callout handling for MCACALIFIR with
39 ... threshold 32.
40 [Tags] Verify_Recoverable_Callout_Handling_For_MCA_With_Threshold_32
41
42 ${value}= Get From Dictionary ${ERROR_INJECT_DICT} MCACALIFIR_RECV32
43 ${err_log_path}= Catenate ${RAS_LOG_DIR_PATH}mcacalfir_th32
44 Inject Recoverable Error With Threshold Limit Through Host
45 ... ${value[0]} ${value[1]} 32 ${value[2]} ${err_log_path}
46
47
48Verify Unrecoverable Callout Handling For MCA
49 [Documentation] Verify unrecoverable callout handling for MCACALIFIR.
50 [Tags] Verify_Unrecoverable_Callout_Handling_For_MCA
51
52 ${value}= Get From Dictionary ${ERROR_INJECT_DICT} MCACALIFIR_UE
53 ${err_log_path}= Catenate ${RAS_LOG_DIR_PATH}mcacalfir
54 Inject Unrecoverable Error Through Host
55 ... ${value[0]} ${value[1]} 1 ${value[2]} ${err_log_path}
56
57# Memory buffer (MCIFIR) related error injection.
58
59Verify Recoverable Callout Handling For MCI With Threshold 1
60 [Documentation] Verify recoverable callout handling for mci with
61 ... threshold 1.
62 [Tags] Verify_Recoverable_Callout_Handling_For_MCI_With_Threshold_1
63
64 ${value}= Get From Dictionary ${ERROR_INJECT_DICT} MCS_RECV1
65 ${err_log_path}= Catenate ${RAS_LOG_DIR_PATH}mcifir_th1
66 Inject Recoverable Error With Threshold Limit Through Host
67 ... ${value[0]} ${value[1]} 1 ${value[2]} ${err_log_path}
68
69Verify Unrecoverable Callout Handling For MCI
70 [Documentation] Verify unrecoverable callout handling for mci.
71 [Tags] Verify_Unrecoverable_Callout_Handling_For_MCI
72
73 ${value}= Get From Dictionary ${ERROR_INJECT_DICT} MCS_UE
74 ${err_log_path}= Catenate ${RAS_LOG_DIR_PATH}mcifir
75 Inject Unrecoverable Error Through Host
76 ... ${value[0]} ${value[1]} 1 ${value[2]} ${err_log_path}
77
Sridevi Rameshb180c9f2017-08-06 10:27:41 -050078
79# 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
165 [Arguments] ${fri} ${chip_address} ${threshold_limit}
166 # Description of argument(s):
167 # fri FRI value (e.g. 2011400).
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.
176 ${chip_ids}= Get ChipID From OS Processor
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}
182 \ Run Keyword Putscom Through OS ${proc_id} ${fri} ${chip_address}
183 # 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
191 Login To OS Host
192 ${output}= Gard Operations On OS list
193 Should Not Contain ${output} 'No GARD entries to display'
194 Gard Operations On OS clear all
195
196Verify Error Log Entry
197 [Documentation] Verify error log entry & signature description.
198 [Arguments] ${signature_desc} ${log_prefix}
199 # Description of argument(s):
200 # signature_desc Error log signature description.
201 # log_prefix Log path prefix.
202
203 ${resp}= OpenBMC Get Request ${BMC_LOGGING_ENTRY}/list
204 Should Not Be Equal As Strings ${resp.status_code} ${HTTP_NOT_FOUND}
205
206 Collect eSEL Log ${log_prefix}
207 ${error_log_file_path}= Catenate ${log_prefix}esel.txt
208 ${rc} ${output} = Run and Return RC and Output
Sridevi Ramesh6bd6b4c2017-10-10 04:38:30 -0500209 ... grep -i ${signature_desc} ${error_log_file_path}
Sridevi Rameshb180c9f2017-08-06 10:27:41 -0500210 Should Not Be Empty ${output}
211
212Inject Recoverable Error With Threshold Limit Through Host
213 [Documentation] Inject and verify recoverable error on processor through
214 ... host.
215 ... Test sequence:
216 ... 1. Enable Auto Reboot Setting
217 ... 2. Inject Error on processor/centaur
218 ... 3. Check If HOST is running.
219 ... 4. Verify error log entry & signature description.
220 ... 4. Verify & clear gard records.
221 [Arguments] ${fri} ${chip_address} ${threshold_limit}
222 ... ${signature_desc} ${log_prefix}
223 # Description of argument(s):
224 # fri FRI(Fault isolation register) value (e.g. 2011400).
225 # chip_address Chip address (e.g 2000000000000000).
226 # threshold_limit Threshold limit (e.g 1, 5, 32).
227 # signature_desc Error log signature description.
228 # log_prefix Log path prefix.
229
230 Set Auto Reboot 1
231 Inject Error Through HOST ${fri} ${chip_address} ${threshold_limit}
232 Is Host Running
233 ${output}= Gard Operations On OS list
234 Should Contain ${output} No GARD
235 Verify Error Log Entry ${signature_desc} ${log_prefix}
236
237
238Inject Unrecoverable Error Through Host
239 [Documentation] Inject and verify recoverable error on processor through
240 ... host.
241 ... Test sequence:
242 ... 1. Enable Auto Reboot Setting
243 ... 2. Inject Error on processor/centaur
244 ... 3. Check If HOST is rebooted.
245 ... 4. Verify error log entry & signature description.
246 ... 4. Verify & clear gard records.
247 [Arguments] ${fri} ${chip_address} ${threshold_limit}
248 ... ${signature_desc} ${log_prefix}
249 # Description of argument(s):
250 # fri FRI value (e.g. 2011400).
251 # chip_address Chip address (e.g 2000000000000000).
252 # threshold_limit Threshold limit (e.g 1, 5, 32).
253 # signature_desc Error Log signature description.
254 # (e.g 'mcs(n0p0c0) (MCFIR[0]) mc internal recoverable')
255 # log_prefix Log path prefix.
256
257 Set Auto Reboot 1
258 Inject Error Through HOST ${fri} ${chip_address} ${threshold_limit}
259 Wait Until Keyword Succeeds 500 sec 20 sec Is Host Rebooted
260 Wait for OS
261 Verify And Clear Gard Records On HOST
262 Verify Error Log Entry ${signature_desc} ${log_prefix}
263
264
265RAS Test SetUp
266 [Documentation] Validates input parameters.
267
268 Should Not Be Empty
269 ... ${OS_HOST} msg=You must provide DNS name/IP of the OS host.
270 Should Not Be Empty
271 ... ${OS_USERNAME} msg=You must provide OS host user name.
272 Should Not Be Empty
273 ... ${OS_PASSWORD} msg=You must provide OS host user password.
274
275 # Boot to OS.
276
Sridevi Ramesh6bd6b4c2017-10-10 04:38:30 -0500277 REST Power On quiet=${1}
Sridevi Rameshb180c9f2017-08-06 10:27:41 -0500278
279RAS Suite Setup
280 [Documentation] Create RAS log directory to store all RAS test logs.
281
282 ${RAS_LOG_DIR_PATH}= Catenate ${EXECDIR}/RAS_logs/
283 Set Suite Variable ${RAS_LOG_DIR_PATH}
284 Create Directory ${RAS_LOG_DIR_PATH}
285 OperatingSystem.Directory Should Exist ${RAS_LOG_DIR_PATH}
286 Empty Directory ${RAS_LOG_DIR_PATH}
287
288RAS Suite Cleanup
289 [Documentation] Perform RAS suite cleanup and verify that host
290 ... boots after test suite run.
291
292 # Boot to OS.
Sridevi Ramesh6bd6b4c2017-10-10 04:38:30 -0500293 REST Power On quiet=${1}
Sridevi Rameshb180c9f2017-08-06 10:27:41 -0500294 Delete Error Logs
295 Login To OS Host
296 Gard Operations On OS clear all