xref: /openbmc/openbmc-test-automation/openpower/ras/test_host_ras.robot (revision b80523a0845269b84c26cc4f213b22322399f31f)
1*** 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.robot
7Resource            ../../lib/state_manager.robot
8Resource            ../../lib/openbmc_ffdc_methods.robot
9Resource            ../../lib/boot_utils.robot
10Variables           ../../lib/ras/variables.py
11Variables           ../../data/variables.py
12Resource            ../../lib/dump_utils.robot
13Resource            ../../openpower/ras/ras_utils.robot
14
15Library             DateTime
16Library             OperatingSystem
17Library             random
18Library             Collections
19
20Suite Setup         RAS Suite Setup
21Test Setup          RAS Test Setup
22Test Teardown       FFDC On Test Case Fail
23Suite Teardown      RAS Suite Cleanup
24
25Force Tags          Host_RAS
26*** Variables ***
27${stack_mode}       normal
28
29*** Test Cases ***
30# Memory channel (MCACALIFIR) related error injection.
31
32Verify Recoverable Callout Handling For MCA With Threshold 1
33    [Documentation]  Verify recoverable callout handling for MCACALIFIR with
34    ...              threshold 1.
35    [Tags]  Verify_Recoverable_Callout_Handling_For_MCA_With_Threshold_1
36
37    ${value}=  Get From Dictionary  ${ERROR_INJECT_DICT}  MCACALIFIR_RECV1
38    ${err_log_path}=  Catenate  ${RAS_LOG_DIR_PATH}mcacalfir_th1
39    Inject Recoverable Error With Threshold Limit
40    ...  HOST  ${value[0]}  ${value[1]}  1  ${value[2]}  ${err_log_path}
41
42Verify Recoverable Callout Handling For MCA With Threshold 32
43    [Documentation]  Verify recoverable callout handling for MCACALIFIR with
44    ...              threshold 32.
45    [Tags]  Verify_Recoverable_Callout_Handling_For_MCA_With_Threshold_32
46
47    ${value}=  Get From Dictionary  ${ERROR_INJECT_DICT}  MCACALIFIR_RECV32
48    ${err_log_path}=  Catenate  ${RAS_LOG_DIR_PATH}mcacalfir_th32
49    Inject Recoverable Error With Threshold Limit
50    ...  HOST  ${value[0]}  ${value[1]}  32  ${value[2]}  ${err_log_path}
51
52#  Memory buffer (MCIFIR) related error injection.
53
54Verify Recoverable Callout Handling For MCI With Threshold 1
55    [Documentation]  Verify recoverable callout handling for mci with
56    ...              threshold 1.
57    [Tags]  Verify_Recoverable_Callout_Handling_For_MCI_With_Threshold_1
58
59    ${value}=  Get From Dictionary  ${ERROR_INJECT_DICT}  MCS_RECV1
60    ${err_log_path}=  Catenate  ${RAS_LOG_DIR_PATH}mcifir_th1
61    Inject Recoverable Error With Threshold Limit
62    ...  HOST  ${value[0]}  ${value[1]}  1  ${value[2]}  ${err_log_path}
63
64# CAPP accelerator (CXAFIR) related error injection.
65
66Verify Recoverable Callout Handling For CXA With Threshold 5
67    [Documentation]  Verify recoverable callout handling for  CXA with
68    ...              threshold 5.
69    [Tags]  Verify_Recoverable_Callout_Handling_For_CXA_With_Threshold_5
70
71    ${value}=  Get From Dictionary  ${ERROR_INJECT_DICT}  CXA_RECV5
72    ${err_log_path}=  Catenate  ${RAS_LOG_DIR_PATH}cxafir_th5
73    Inject Recoverable Error With Threshold Limit
74    ...  HOST  ${value[0]}  ${value[1]}  5  ${value[2]}  ${err_log_path}
75
76Verify Recoverable Callout Handling For CXA With Threshold 32
77    [Documentation]  Verify recoverable callout handling for  CXA with
78    ...              threshold 32.
79    [Tags]  Verify_Recoverable_Callout_Handling_For_CXA_With_Threshold_32
80
81    ${value}=  Get From Dictionary  ${ERROR_INJECT_DICT}  CXA_RECV32
82    ${err_log_path}=  Catenate  ${RAS_LOG_DIR_PATH}cxafir_th32
83    Inject Recoverable Error With Threshold Limit
84    ...  HOST  ${value[0]}  ${value[1]}  32  ${value[2]}  ${err_log_path}
85
86
87#  OBUSFIR  related error injection.
88
89Verify Recoverable Callout Handling For OBUS With Threshold 32
90    [Documentation]  Verify recoverable callout handling for  OBUS with
91    ...              threshold 32.
92    [Tags]  Verify_Recoverable_Callout_Handling_For_OBUS_With_Threshold_32
93
94    ${value}=  Get From Dictionary  ${ERROR_INJECT_DICT}  OBUS_RECV32
95    ${err_log_path}=  Catenate  ${RAS_LOG_DIR_PATH}obusfir_th32
96    Inject Recoverable Error With Threshold Limit
97    ...  HOST  ${value[0]}  ${value[1]}  32  ${value[2]}  ${err_log_path}
98
99# Nvidia graphics processing units (NPU0FIR) related error injection.
100
101Verify Recoverable Callout Handling For NPU0 With Threshold 32
102    [Documentation]  Verify recoverable callout handling for  NPU0 with
103    ...              threshold 32.
104    [Tags]  Verify_Recoverable_Callout_Handling_For_NPU0_With_Threshold_32
105
106    ${value}=  Get From Dictionary  ${ERROR_INJECT_DICT}  NPU0_RECV32
107    ${err_log_path}=  Catenate  ${RAS_LOG_DIR_PATH}npu0fir_th32
108    Inject Recoverable Error With Threshold Limit
109    ...  HOST  ${value[0]}  ${value[1]}  32  ${value[2]}  ${err_log_path}
110
111#  Nest accelerator NXDMAENGFIR related error injection.
112
113Verify Recoverable Callout Handling For NXDMAENG With Threshold 1
114    [Documentation]  Verify recoverable callout handling for  NXDMAENG with
115    ...              threshold 1.
116    [Tags]  Verify_Recoverable_Callout_Handling_For_NXDMAENG_With_Threshold_1
117
118    ${value}=  Get From Dictionary  ${ERROR_INJECT_DICT}  NX_RECV1
119    ${err_log_path}=  Catenate  ${RAS_LOG_DIR_PATH}nxfir_th1
120    Inject Recoverable Error With Threshold Limit
121    ...  HOST  ${value[0]}  ${value[1]}  1  ${value[2]}  ${err_log_path}
122
123
124Verify Recoverable Callout Handling For NXDMAENG With Threshold 32
125    [Documentation]  Verify recoverable callout handling for  NXDMAENG with
126    ...              threshold 32.
127    [Tags]  Verify_Recoverable_Callout_Handling_For_NXDMAENG_With_Threshold_32
128
129    ${value}=  Get From Dictionary  ${ERROR_INJECT_DICT}  NX_RECV32
130    ${err_log_path}=  Catenate  ${RAS_LOG_DIR_PATH}nxfir_th32
131    Inject Recoverable Error With Threshold Limit
132    ...  HOST  ${value[0]}  ${value[1]}  32  ${value[2]}  ${err_log_path}
133
134
135#  L2FIR related error injection.
136
137Verify Recoverable Callout Handling For L2FIR With Threshold 1
138    [Documentation]  Verify recoverable callout handling for L2FIR with
139    ...              threshold 1.
140    [Tags]  Verify_Recoverable_Callout_Handling_For_L2FIR_With_Threshold_1
141
142    ${value}=  Get From Dictionary  ${ERROR_INJECT_DICT}  L2FIR_RECV1
143    ${translated_fir}=  Fetch FIR Address Translation Value  ${value[0]}  EX
144    ${err_log_path}=  Catenate  ${RAS_LOG_DIR_PATH}l2fir_th1
145    Inject Recoverable Error With Threshold Limit
146    ...  HOST  ${translated_fir}  ${value[1]}  1  ${value[2]}  ${err_log_path}
147
148Verify Recoverable Callout Handling For L2FIR With Threshold 32
149    [Documentation]  Verify recoverable callout handling for L2FIR with
150    ...              threshold 32.
151    [Tags]  Verify_Recoverable_Callout_Handling_For_L2FIR_With_Threshold_32
152
153    ${value}=  Get From Dictionary  ${ERROR_INJECT_DICT}  L2FIR_RECV32
154    ${translated_fir}=  Fetch FIR Address Translation Value  ${value[0]}  EX
155    ${err_log_path}=  Catenate  ${RAS_LOG_DIR_PATH}l2fir_th32
156    Inject Recoverable Error With Threshold Limit
157    ...  HOST  ${translated_fir}  ${value[1]}  32  ${value[2]}  ${err_log_path}
158
159
160#  L3FIR related error injection.
161
162Verify Recoverable Callout Handling For L3FIR With Threshold 1
163    [Documentation]  Verify recoverable callout handling for L3FIR with
164    ...              threshold 1.
165    [Tags]  Verify_Recoverable_Callout_Handling_For_L3FIR_With_Threshold_1
166
167    ${value}=  Get From Dictionary  ${ERROR_INJECT_DICT}  L3FIR_RECV1
168    ${translated_fir}=  Fetch FIR Address Translation Value  ${value[0]}  EX
169    ${err_log_path}=  Catenate  ${RAS_LOG_DIR_PATH}l3fir_th1
170    Inject Recoverable Error With Threshold Limit
171    ...  HOST  ${translated_fir}  ${value[1]}  1  ${value[2]}  ${err_log_path}
172
173Verify Recoverable Callout Handling For L3FIR With Threshold 32
174    [Documentation]  Verify recoverable callout handling for L3FIR with
175    ...              threshold 32.
176    [Tags]  Verify_Recoverable_Callout_Handling_For_L3FIR_With_Threshold_32
177
178    ${value}=  Get From Dictionary  ${ERROR_INJECT_DICT}  L3FIR_RECV32
179    ${translated_fir}=  Fetch FIR Address Translation Value  ${value[0]}  EX
180    ${err_log_path}=  Catenate  ${RAS_LOG_DIR_PATH}l3fir_th32
181    Inject Recoverable Error With Threshold Limit
182    ...  HOST  ${translated_fir}  ${value[1]}  32  ${value[2]}  ${err_log_path}
183
184
185# On chip controller (OCCFIR) related error injection.
186
187Verify Recoverable Callout Handling For OCC With Threshold 1
188    [Documentation]  Verify recoverable callout handling for OCCFIR with
189    ...              threshold 1.
190    [Tags]  Verify_Recoverable_Callout_Handling_For_OCC_With_Threshold_1
191
192    ${value}=  Get From Dictionary  ${ERROR_INJECT_DICT}  OCCFIR_RECV1
193    ${err_log_path}=  Catenate  ${RAS_LOG_DIR_PATH}occfir_th1
194    Inject Recoverable Error With Threshold Limit
195    ...  HOST  ${value[0]}  ${value[1]}  1  ${value[2]}  ${err_log_path}
196
197# Core management engine (CMEFIR) related error injection.
198
199Verify Recoverable Callout Handling For CMEFIR With Threshold 1
200    [Documentation]  Verify recoverable callout handling for CMEFIR with
201    ...              threshold 1.
202    [Tags]  Verify_Recoverable_Callout_Handling_For_CMEFIR_With_Threshold_1
203
204    ${value}=  Get From Dictionary  ${ERROR_INJECT_DICT}  CMEFIR_RECV1
205    ${translated_fir}=  Fetch FIR Address Translation Value  ${value[0]}  EX
206    ${err_log_path}=  Catenate  ${RAS_LOG_DIR_PATH}cmefir_th1
207    Inject Recoverable Error With Threshold Limit
208    ...  HOST  ${translated_fir}  ${value[1]}  1  ${value[2]}  ${err_log_path}
209
210# Nest control vunit (NCUFIR) related error injection.
211
212Verify Recoverable Callout Handling For NCUFIR With Threshold 1
213    [Documentation]  Verify recoverable callout handling for NCUFIR with
214    ...              threshold 1.
215    [Tags]  Verify_Recoverable_Callout_Handling_For_NCUFIR_With_Threshold_1
216
217    ${value}=  Get From Dictionary  ${ERROR_INJECT_DICT}  NCUFIR_RECV1
218    ${translated_fir}=  Fetch FIR Address Translation Value  ${value[0]}  EX
219    ${err_log_path}=  Catenate  ${RAS_LOG_DIR_PATH}ncufir_th1
220    Inject Recoverable Error With Threshold Limit
221    ...  HOST  ${translated_fir}  ${value[1]}  1  ${value[2]}  ${err_log_path}
222
223
224# Core FIR related error injection.
225
226Verify Recoverable Callout Handling For CoreFIR With Threshold 5
227    [Documentation]  Verify recoverable callout handling for CoreFIR with
228    ...              threshold 5.
229    [Tags]  Verify_Recoverable_Callout_Handling_For_CoreFIR_With_Threshold_5
230
231    ${value}=  Get From Dictionary  ${ERROR_INJECT_DICT}  COREFIR_RECV5
232    ${translated_fir}=  Fetch FIR Address Translation Value  ${value[0]}  EX
233    Disable CPU States Through HOST
234    ${err_log_path}=  Catenate  ${RAS_LOG_DIR_PATH}corefir_th5
235    Inject Recoverable Error With Threshold Limit
236    ...  HOST  ${value[0]}  ${value[1]}  5  ${value[2]}  ${err_log_path}
237
238Verify Recoverable Callout Handling For CoreFIR With Threshold 1
239    [Documentation]  Verify recoverable callout handling for CoreFIR with
240    ...              threshold 1.
241    [Tags]  Verify_Recoverable_Callout_CoreFIR_Handling_For_With_Threshold_1
242
243    ${value}=  Get From Dictionary  ${ERROR_INJECT_DICT}  COREFIR_RECV1
244    ${translated_fir}=  Fetch FIR Address Translation Value  ${value[0]}  EX
245    Disable CPU States Through HOST
246    ${err_log_path}=  Catenate  ${RAS_LOG_DIR_PATH}corefir_th1
247    Inject Recoverable Error With Threshold Limit
248    ...  HOST  ${value[0]}  ${value[1]}  1  ${value[2]}  ${err_log_path}
249
250Verify Recoverable Callout Handling For EQFIR With Threshold 32
251    [Documentation]  Verify recoverable callout handling for L3FIR with
252    ...              threshold 32.
253    [Tags]  Verify_Recoverable_Callout_Handling_For_EQFIR_With_Threshold_32
254
255    ${value}=  Get From Dictionary  ${ERROR_INJECT_DICT}  EQFIR_RECV32
256    ${translated_fir}=  Fetch FIR Address Translation Value  ${value[0]}  EQ
257    ${err_log_path}=  Catenate  ${RAS_LOG_DIR_PATH}eqfir_th32
258    Inject Recoverable Error With Threshold Limit
259    ...  HOST  ${translated_fir}  ${value[1]}  32  ${value[2]}  ${err_log_path}
260