Rahul Maheshwari | 2568f87 | 2020-09-23 01:03:39 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | |
| 3 | Documentation Test BMC dump functionality of OpenBMC. |
| 4 | |
George Keishing | 88ec280 | 2021-08-04 03:04:22 -0500 | [diff] [blame] | 5 | Resource ../../lib/bmc_redfish_resource.robot |
| 6 | Resource ../../lib/boot_utils.robot |
Rahul Maheshwari | 2568f87 | 2020-09-23 01:03:39 -0500 | [diff] [blame] | 7 | Resource ../../lib/dump_utils.robot |
George Keishing | 88ec280 | 2021-08-04 03:04:22 -0500 | [diff] [blame] | 8 | Resource ../../lib/openbmc_ffdc.robot |
Rahul Maheshwari | 2568f87 | 2020-09-23 01:03:39 -0500 | [diff] [blame] | 9 | |
George Keishing | f514ccb | 2021-02-02 23:55:56 -0600 | [diff] [blame] | 10 | Suite Setup Redfish.Login |
Rahul Maheshwari | 2568f87 | 2020-09-23 01:03:39 -0500 | [diff] [blame] | 11 | Test Setup Redfish Delete All BMC Dumps |
| 12 | Test Teardown Test Teardown Execution |
| 13 | |
Tim Lee | de2d130 | 2021-06-18 01:24:11 +0800 | [diff] [blame] | 14 | *** Variables *** |
| 15 | |
| 16 | # Total size of the dump in kilo bytes |
| 17 | ${BMC_DUMP_TOTAL_SIZE} ${1024} |
| 18 | |
| 19 | # Minimum space required for one bmc dump in kilo bytes |
| 20 | ${BMC_DUMP_MIN_SPACE_REQD} ${20} |
manashsarma | bd346b3 | 2022-07-20 06:22:58 -0500 | [diff] [blame] | 21 | ${MAX_DUMP_COUNT} ${20} |
manashsarma | 395f880 | 2022-11-17 03:09:02 -0600 | [diff] [blame] | 22 | ${BMC_DUMP_COLLECTOR_PATH} /var/lib/phosphor-debug-collector/dumps |
Rahul Maheshwari | 2568f87 | 2020-09-23 01:03:39 -0500 | [diff] [blame] | 23 | |
| 24 | *** Test Cases *** |
| 25 | |
manashsarma | 4b5b1fa | 2022-11-16 02:36:58 -0600 | [diff] [blame] | 26 | Verify Error Response For Already Deleted Dump Id |
| 27 | [Documentation] Delete non existing BMC dump and expect an error. |
| 28 | [Tags] Verify_Error_Response_For_Already_Deleted_Dump_Id |
| 29 | |
manashsarma | 9dcabad | 2023-02-02 03:55:17 -0600 | [diff] [blame] | 30 | Redfish Power Off stack_mode=skip |
manashsarma | 4b5b1fa | 2022-11-16 02:36:58 -0600 | [diff] [blame] | 31 | ${dump_id}= Create User Initiated BMC Dump Via Redfish |
| 32 | Redfish Delete BMC Dump ${dump_id} |
| 33 | Run Keyword And Expect Error ValueError: * Redfish Delete BMC Dump ${dump_id} |
| 34 | |
| 35 | |
Rahul Maheshwari | 2568f87 | 2020-09-23 01:03:39 -0500 | [diff] [blame] | 36 | Verify User Initiated BMC Dump When Host Powered Off |
| 37 | [Documentation] Create user initiated BMC dump at host off state and |
| 38 | ... verify dump entry for it. |
| 39 | [Tags] Verify_User_Initiated_BMC_Dump_When_Host_Powered_Off |
| 40 | |
| 41 | Redfish Power Off stack_mode=skip |
Rahul Maheshwari | bd38aa4 | 2021-08-04 01:24:39 -0500 | [diff] [blame] | 42 | ${dump_id}= Create User Initiated BMC Dump Via Redfish |
Rahul Maheshwari | bcefdf2 | 2020-10-16 07:51:34 -0500 | [diff] [blame] | 43 | ${dump_entries}= Get BMC Dump Entries |
Rahul Maheshwari | 2568f87 | 2020-09-23 01:03:39 -0500 | [diff] [blame] | 44 | Length Should Be ${dump_entries} 1 |
| 45 | List Should Contain Value ${dump_entries} ${dump_id} |
| 46 | |
Rahul Maheshwari | 2568f87 | 2020-09-23 01:03:39 -0500 | [diff] [blame] | 47 | |
Rahul Maheshwari | e8e9d0c | 2020-10-30 02:39:01 -0500 | [diff] [blame] | 48 | Verify User Initiated BMC Dump Size |
manashsarma | 7831dc2 | 2022-03-08 01:49:36 -0600 | [diff] [blame] | 49 | [Documentation] Verify user initiated BMC dump size is under 20 MB. |
Rahul Maheshwari | e8e9d0c | 2020-10-30 02:39:01 -0500 | [diff] [blame] | 50 | [Tags] Verify_User_Initiated_BMC_Dump_Size |
| 51 | |
Rahul Maheshwari | bd38aa4 | 2021-08-04 01:24:39 -0500 | [diff] [blame] | 52 | ${dump_id}= Create User Initiated BMC Dump Via Redfish |
Rahul Maheshwari | e8e9d0c | 2020-10-30 02:39:01 -0500 | [diff] [blame] | 53 | ${resp}= Redfish.Get Properties /redfish/v1/Managers/bmc/LogServices/Dump/Entries/${dump_id} |
| 54 | |
| 55 | # Example of response from above Redfish GET request. |
| 56 | # "@odata.type": "#LogEntry.v1_7_0.LogEntry", |
| 57 | # "AdditionalDataSizeBytes": 31644, |
| 58 | # "AdditionalDataURI": "/redfish/v1/Managers/bmc/LogServices/Dump/attachment/9", |
| 59 | # "Created": "2020-10-23T06:32:53+00:00", |
| 60 | # "DiagnosticDataType": "Manager", |
| 61 | # "EntryType": "Event", |
| 62 | # "Id": "9", |
| 63 | # "Name": "BMC Dump Entry" |
| 64 | |
manashsarma | 7831dc2 | 2022-03-08 01:49:36 -0600 | [diff] [blame] | 65 | # Max size for dump is 20 MB = 20x1024x1024 Byte. |
| 66 | Should Be True 0 < ${resp["AdditionalDataSizeBytes"]} < 20971520 |
Rahul Maheshwari | e8e9d0c | 2020-10-30 02:39:01 -0500 | [diff] [blame] | 67 | |
| 68 | |
manashsarma | bbc68bc | 2022-12-05 09:55:17 -0600 | [diff] [blame] | 69 | Verify Multiple BMC Dump Creation |
| 70 | [Documentation] Verify that multiple BMC dumps can be created one after |
| 71 | ... another successfully. |
| 72 | [Tags] Verify_Multiple_BMC_Dump_Creation |
| 73 | |
| 74 | ${dump_count}= Evaluate random.randint(5, 10) modules=random |
| 75 | FOR ${INDEX} IN 1 ${dump_count} |
| 76 | Create User Initiated BMC Dump Via Redfish |
| 77 | END |
| 78 | |
| 79 | |
manashsarma | 395f880 | 2022-11-17 03:09:02 -0600 | [diff] [blame] | 80 | Verify BMC Dump Default Location In BMC |
| 81 | [Documentation] Verify that BMC dump is created in its default location of BMC. |
George Keishing | 224e4c7 | 2022-12-14 05:07:58 -0600 | [diff] [blame] | 82 | [Tags] Verify_BMC_Dump_Default_Location_In_BMC |
manashsarma | 395f880 | 2022-11-17 03:09:02 -0600 | [diff] [blame] | 83 | |
| 84 | Redfish Delete All BMC Dumps |
| 85 | ${dump_id}= Create User Initiated BMC Dump Via Redfish |
| 86 | ${dump_file} ${stderr} ${rc}= BMC Execute Command |
| 87 | ... ls ${BMC_DUMP_COLLECTOR_PATH}/${dump_id} |
| 88 | Should Be True ${rc} == 0 |
George Keishing | 952bb0f | 2022-12-12 03:13:35 -0600 | [diff] [blame] | 89 | Should Start With ${dump_file} BMCDUMP |
manashsarma | 395f880 | 2022-11-17 03:09:02 -0600 | [diff] [blame] | 90 | |
| 91 | |
George Keishing | 3d85098 | 2022-07-19 11:03:03 -0500 | [diff] [blame] | 92 | Verify User Initiated BMC Dump When Host Booted |
| 93 | [Documentation] Create user initiated BMC dump at host booted state and |
| 94 | ... verify dump entry for it. |
| 95 | [Tags] Verify_User_Initiated_BMC_Dump_When_Host_Booted |
| 96 | |
| 97 | Redfish Power On stack_mode=skip |
| 98 | ${dump_id}= Create User Initiated BMC Dump Via Redfish |
| 99 | ${dump_entries}= Get BMC Dump Entries |
| 100 | Length Should Be ${dump_entries} 1 |
| 101 | List Should Contain Value ${dump_entries} ${dump_id} |
| 102 | |
| 103 | |
Rahul Maheshwari | 2568f87 | 2020-09-23 01:03:39 -0500 | [diff] [blame] | 104 | Verify Dump Persistency On Dump Service Restart |
| 105 | [Documentation] Create user dump, restart dump manager service and verify dump |
| 106 | ... persistency. |
| 107 | [Tags] Verify_Dump_Persistency_On_Dump_Service_Restart |
| 108 | |
Rahul Maheshwari | bd38aa4 | 2021-08-04 01:24:39 -0500 | [diff] [blame] | 109 | Create User Initiated BMC Dump Via Redfish |
Rahul Maheshwari | 2568f87 | 2020-09-23 01:03:39 -0500 | [diff] [blame] | 110 | ${dump_entries_before}= redfish_utils.get_member_list /redfish/v1/Managers/bmc/LogServices/Dump/Entries |
| 111 | |
| 112 | # Restart dump service. |
| 113 | BMC Execute Command systemctl restart xyz.openbmc_project.Dump.Manager.service |
| 114 | Sleep 10s reason=Wait for BMC dump service to restart properly |
| 115 | |
| 116 | ${dump_entries_after}= redfish_utils.get_member_list /redfish/v1/Managers/bmc/LogServices/Dump/Entries |
| 117 | Lists Should Be Equal ${dump_entries_before} ${dump_entries_after} |
| 118 | |
| 119 | |
| 120 | Verify Dump Persistency On BMC Reset |
| 121 | [Documentation] Create user dump, reset BMC and verify dump persistency. |
| 122 | [Tags] Verify_Dump_Persistency_On_BMC_Reset |
| 123 | |
manashsarma | 8fa9c89 | 2022-10-03 06:20:58 -0500 | [diff] [blame] | 124 | # Power off host so that dump is not offloaded to host OS. |
| 125 | Redfish Power Off stack_mode=skip |
| 126 | |
Rahul Maheshwari | bd38aa4 | 2021-08-04 01:24:39 -0500 | [diff] [blame] | 127 | Create User Initiated BMC Dump Via Redfish |
Rahul Maheshwari | 2568f87 | 2020-09-23 01:03:39 -0500 | [diff] [blame] | 128 | ${dump_entries_before}= redfish_utils.get_member_list /redfish/v1/Managers/bmc/LogServices/Dump/Entries |
| 129 | |
| 130 | # Reset BMC. |
George Keishing | 88ec280 | 2021-08-04 03:04:22 -0500 | [diff] [blame] | 131 | OBMC Reboot (off) stack_mode=skip |
Rahul Maheshwari | 2568f87 | 2020-09-23 01:03:39 -0500 | [diff] [blame] | 132 | |
| 133 | ${dump_entries_after}= redfish_utils.get_member_list /redfish/v1/Managers/bmc/LogServices/Dump/Entries |
| 134 | Lists Should Be Equal ${dump_entries_before} ${dump_entries_after} |
| 135 | |
| 136 | |
Rahul Maheshwari | 95cbceb | 2020-10-21 23:25:08 -0500 | [diff] [blame] | 137 | Delete User Initiated BMC Dump And Verify |
| 138 | [Documentation] Delete user initiated BMC dump and verify. |
| 139 | [Tags] Delete_User_Initiated_BMC_Dump_And_Verify |
| 140 | |
Rahul Maheshwari | bd38aa4 | 2021-08-04 01:24:39 -0500 | [diff] [blame] | 141 | ${dump_id}= Create User Initiated BMC Dump Via Redfish |
Rahul Maheshwari | 95cbceb | 2020-10-21 23:25:08 -0500 | [diff] [blame] | 142 | Redfish Delete BMC Dump ${dump_id} |
| 143 | |
| 144 | ${dump_entries}= Get BMC Dump Entries |
| 145 | Should Be Empty ${dump_entries} |
| 146 | |
| 147 | |
| 148 | Delete All User Initiated BMC Dumps And Verify |
| 149 | [Documentation] Delete all user initiated BMC dumps and verify. |
| 150 | [Tags] Delete_All_User_Initiated_BMC_Dumps_And_Verify |
| 151 | |
manashsarma | 70d840e | 2022-10-18 02:34:45 -0500 | [diff] [blame] | 152 | # Power off host so that dump is not offloaded to host OS. |
| 153 | Redfish Power Off stack_mode=skip |
| 154 | |
Rahul Maheshwari | 95cbceb | 2020-10-21 23:25:08 -0500 | [diff] [blame] | 155 | # Create some BMC dump. |
Rahul Maheshwari | bd38aa4 | 2021-08-04 01:24:39 -0500 | [diff] [blame] | 156 | Create User Initiated BMC Dump Via Redfish |
| 157 | Create User Initiated BMC Dump Via Redfish |
Rahul Maheshwari | 95cbceb | 2020-10-21 23:25:08 -0500 | [diff] [blame] | 158 | |
| 159 | Redfish Delete All BMC Dumps |
| 160 | ${dump_entries}= Get BMC Dump Entries |
| 161 | Should Be Empty ${dump_entries} |
| 162 | |
| 163 | |
Rahul Maheshwari | 4f338ab | 2020-10-21 23:28:40 -0500 | [diff] [blame] | 164 | Create Two User Initiated BMC Dumps |
| 165 | [Documentation] Create two user initiated BMC dumps. |
| 166 | [Tags] Create_Two_User_Initiated_BMC_Dumps |
| 167 | |
Rahul Maheshwari | bd38aa4 | 2021-08-04 01:24:39 -0500 | [diff] [blame] | 168 | ${dump_id1}= Create User Initiated BMC Dump Via Redfish |
| 169 | ${dump_id2}= Create User Initiated BMC Dump Via Redfish |
Rahul Maheshwari | 4f338ab | 2020-10-21 23:28:40 -0500 | [diff] [blame] | 170 | |
| 171 | ${dump_entries}= Get BMC Dump Entries |
| 172 | Length Should Be ${dump_entries} 2 |
| 173 | Should Contain ${dump_entries} ${dump_id1} |
| 174 | Should Contain ${dump_entries} ${dump_id2} |
| 175 | |
| 176 | |
| 177 | Create Two User Initiated BMC Dumps And Delete One |
| 178 | [Documentation] Create two dumps and delete the first. |
| 179 | [Tags] Create_Two_User_Initiated_BMC_Dumps_And_Delete_One |
| 180 | |
Rahul Maheshwari | bd38aa4 | 2021-08-04 01:24:39 -0500 | [diff] [blame] | 181 | ${dump_id1}= Create User Initiated BMC Dump Via Redfish |
| 182 | ${dump_id2}= Create User Initiated BMC Dump Via Redfish |
Rahul Maheshwari | 4f338ab | 2020-10-21 23:28:40 -0500 | [diff] [blame] | 183 | |
| 184 | Redfish Delete BMC Dump ${dump_id1} |
| 185 | |
| 186 | ${dump_entries}= Get BMC Dump Entries |
| 187 | Length Should Be ${dump_entries} 1 |
| 188 | List Should Contain Value ${dump_entries} ${dump_id2} |
| 189 | |
| 190 | |
| 191 | Create And Delete User Initiated BMC Dump Multiple Times |
| 192 | [Documentation] Create and delete user initiated BMC dump multiple times. |
| 193 | [Tags] Create_And_Delete_User_Initiated_BMC_Dump_Multiple_Times |
| 194 | |
| 195 | FOR ${INDEX} IN 1 10 |
Rahul Maheshwari | bd38aa4 | 2021-08-04 01:24:39 -0500 | [diff] [blame] | 196 | ${dump_id}= Create User Initiated BMC Dump Via Redfish |
Rahul Maheshwari | 4f338ab | 2020-10-21 23:28:40 -0500 | [diff] [blame] | 197 | Redfish Delete BMC Dump ${dump_id} |
| 198 | END |
| 199 | |
| 200 | |
Rahul Maheshwari | d709c8d | 2020-11-01 23:03:51 -0600 | [diff] [blame] | 201 | Verify Maximum BMC Dump Creation |
| 202 | [Documentation] Create maximum BMC dump and verify error when dump runs out of space. |
| 203 | [Tags] Verify_Maximum_BMC_Dump_Creation |
| 204 | [Teardown] Redfish Delete All BMC Dumps |
| 205 | |
| 206 | # Maximum allowed space for dump is 1024 KB. BMC typically hold 8-14 dumps |
| 207 | # before running out of this dump space. So trying to create dumps in 20 |
| 208 | # iterations to run out of space. |
manashsarma | bd346b3 | 2022-07-20 06:22:58 -0500 | [diff] [blame] | 209 | # User can key in the Maximum allowed space for bmc dump and how many iteration. |
| 210 | FOR ${n} IN RANGE 0 ${MAX_DUMP_COUNT} |
Rahul Maheshwari | bd38aa4 | 2021-08-04 01:24:39 -0500 | [diff] [blame] | 211 | Create User Initiated BMC Dump Via Redfish |
Rahul Maheshwari | d709c8d | 2020-11-01 23:03:51 -0600 | [diff] [blame] | 212 | ${dump_space}= Get Disk Usage For Dumps |
Tim Lee | de2d130 | 2021-06-18 01:24:11 +0800 | [diff] [blame] | 213 | Exit For Loop If ${dump_space} >= (${BMC_DUMP_TOTAL_SIZE} - ${BMC_DUMP_MIN_SPACE_REQD}) |
Rahul Maheshwari | d709c8d | 2020-11-01 23:03:51 -0600 | [diff] [blame] | 214 | END |
| 215 | |
| 216 | # Check error while creating dump when dump size is full. |
| 217 | ${payload}= Create Dictionary DiagnosticDataType=Manager |
| 218 | Redfish.Post /redfish/v1/Managers/bmc/LogServices/Dump/Actions/LogService.CollectDiagnosticData |
| 219 | ... body=${payload} valid_status_codes=[${HTTP_INTERNAL_SERVER_ERROR}] |
| 220 | |
| 221 | |
manashsarma | 633cac9 | 2022-11-25 03:27:03 -0600 | [diff] [blame] | 222 | Verify BMC Core Dump When Host Powered Off |
| 223 | [Documentation] Verify BMC core dump after application crash at host powered off state. |
| 224 | [Tags] Verify_BMC_Core_Dump_When_Host_Powered_Off |
| 225 | |
| 226 | Redfish Power Off stack_mode=skip |
| 227 | |
| 228 | # Ensure all dumps are cleaned out. |
| 229 | Redfish Delete All BMC Dumps |
| 230 | Trigger Core Dump |
| 231 | |
| 232 | # Verify that BMC dump is available. |
| 233 | Wait Until Keyword Succeeds 2 min 10 sec Is BMC Dump Available |
| 234 | |
| 235 | |
manashsarma | 849189c | 2022-11-28 04:16:51 -0600 | [diff] [blame] | 236 | Verify Core Dump Size |
| 237 | [Documentation] Verify BMC core dump size is under 20 MB. |
| 238 | [Tags] Verify_Core_Dump_Size |
| 239 | |
| 240 | Redfish Power Off stack_mode=skip |
| 241 | |
| 242 | # Ensure all dumps are cleaned out. |
| 243 | Redfish Delete All BMC Dumps |
| 244 | Trigger Core Dump |
| 245 | |
| 246 | # Verify that BMC dump is available. |
| 247 | Wait Until Keyword Succeeds 2 min 10 sec Is BMC Dump Available |
| 248 | ${dump_entries}= Get BMC Dump Entries |
| 249 | ${resp}= Redfish.Get Properties |
| 250 | ... /redfish/v1/Managers/bmc/LogServices/Dump/Entries/${dump_entries[0]} |
| 251 | |
| 252 | # Max size for dump is 20 MB = 20x1024x1024 Byte. |
| 253 | Should Be True 0 < ${resp["AdditionalDataSizeBytes"]} < 20971520 |
| 254 | |
| 255 | |
manashsarma | fcbfdf6 | 2022-12-07 06:36:28 -0600 | [diff] [blame] | 256 | Verify Error While Initiating BMC Dump During Dumping State |
| 257 | [Documentation] Verify error while initiating BMC dump during dumping state. |
| 258 | [Tags] Verify_Error_While_Initiating_BMC_Dump_During_Dumping_State |
| 259 | |
Nandish-Matti | af5bc15 | 2023-01-30 00:49:59 -0600 | [diff] [blame] | 260 | ${task_id}= Create User Initiated BMC Dump Via Redfish ${1} |
manashsarma | fcbfdf6 | 2022-12-07 06:36:28 -0600 | [diff] [blame] | 261 | |
| 262 | # Check error while initiating BMC dump while dump in progress. |
| 263 | ${payload}= Create Dictionary DiagnosticDataType=Manager |
| 264 | Redfish.Post |
| 265 | ... /redfish/v1/Managers/bmc/LogServices/Dump/Actions/LogService.CollectDiagnosticData |
| 266 | ... body=${payload} valid_status_codes=[${HTTP_SERVICE_UNAVAILABLE}] |
| 267 | |
Nandish-Matti | af5bc15 | 2023-01-30 00:49:59 -0600 | [diff] [blame] | 268 | # Wait for above initiated dump to complete. Otherwise, on going dump would impact next test. |
| 269 | Wait Until Keyword Succeeds 5 min 15 sec Check Task Completion ${task_id} |
| 270 | |
manashsarma | fcbfdf6 | 2022-12-07 06:36:28 -0600 | [diff] [blame] | 271 | |
manashsarma | aa845b7 | 2022-12-12 05:41:32 -0600 | [diff] [blame] | 272 | Verify BMC Dump Create Errors While Another BMC Dump In Progress |
| 273 | [Documentation] Verify BMC dump creation error until older BMC dump completion. |
| 274 | [Tags] Verify_BMC_Dump_Create_Errors_While_Another_BMC_Dump_In_Progress |
| 275 | |
| 276 | # Initiate a BMC dump that returns without completion. |
| 277 | ${task_id}= Create User Initiated BMC Dump Via Redfish ${1} |
| 278 | |
| 279 | # Now continue to initiate multiple dump request which is not expected to be accepted |
| 280 | # till earlier BMC dump task is completed. A limit is set to avoid risk of infinite loop. |
| 281 | ${payload}= Create Dictionary DiagnosticDataType=Manager |
| 282 | WHILE True limit=1000 |
| 283 | ${task_dict}= Redfish.Get Properties /redfish/v1/TaskService/Tasks/${task_id} |
| 284 | IF '${task_dict['TaskState']}' == 'Completed' BREAK |
| 285 | Redfish.Post |
| 286 | ... /redfish/v1/Managers/bmc/LogServices/Dump/Actions/LogService.CollectDiagnosticData |
| 287 | ... body=${payload} valid_status_codes=[${HTTP_SERVICE_UNAVAILABLE}] |
| 288 | END |
| 289 | |
| 290 | # The next BMC dump initiation request should be accepted as earlier dump is completed. |
| 291 | ${resp}= Redfish.Post |
| 292 | ... /redfish/v1/Managers/bmc/LogServices/Dump/Actions/LogService.CollectDiagnosticData |
| 293 | ... body=${payload} valid_status_codes=[${HTTP_ACCEPTED}] |
| 294 | |
| 295 | # Wait for above initiated dump to complete. Otherwise, on going dump would impact next test. |
| 296 | Wait Until Keyword Succeeds 5 min 15 sec Check Task Completion ${resp.dict['Id']} |
| 297 | |
| 298 | |
Rahul Maheshwari | 2568f87 | 2020-09-23 01:03:39 -0500 | [diff] [blame] | 299 | *** Keywords *** |
| 300 | |
Rahul Maheshwari | bcefdf2 | 2020-10-16 07:51:34 -0500 | [diff] [blame] | 301 | Get BMC Dump Entries |
| 302 | [Documentation] Return BMC dump ids list. |
| 303 | |
| 304 | ${dump_uris}= redfish_utils.get_member_list /redfish/v1/Managers/bmc/LogServices/Dump/Entries |
| 305 | ${dump_ids}= Create List |
| 306 | |
| 307 | FOR ${dump_uri} IN @{dump_uris} |
| 308 | ${dump_id}= Fetch From Right ${dump_uri} / |
| 309 | Append To List ${dump_ids} ${dump_id} |
| 310 | END |
| 311 | |
| 312 | [Return] ${dump_ids} |
| 313 | |
| 314 | |
manashsarma | 633cac9 | 2022-11-25 03:27:03 -0600 | [diff] [blame] | 315 | Is BMC Dump Available |
| 316 | [Documentation] Verify if BMC dump is available. |
| 317 | |
| 318 | ${dump_entries}= Get BMC Dump Entries |
| 319 | |
| 320 | # Verifying that BMC dump is available. |
| 321 | ${length}= Get length ${dump_entries} |
| 322 | Should Be True 0 < ${length} |
| 323 | |
| 324 | |
Rahul Maheshwari | d709c8d | 2020-11-01 23:03:51 -0600 | [diff] [blame] | 325 | Get Disk Usage For Dumps |
| 326 | [Documentation] Return disk usage in kilobyte for BMC dumps. |
| 327 | |
George Keishing | 952bb0f | 2022-12-12 03:13:35 -0600 | [diff] [blame] | 328 | ${usage_output} ${stderr} ${rc}= BMC Execute Command du -s ${BMC_DUMP_COLLECTOR_PATH} |
Rahul Maheshwari | d709c8d | 2020-11-01 23:03:51 -0600 | [diff] [blame] | 329 | |
| 330 | # Example of output from above BMC cli command. |
| 331 | # $ du -s /var/lib/phosphor-debug-collector/dumps |
| 332 | # 516 /var/lib/phosphor-debug-collector/dumps |
| 333 | |
| 334 | ${usage_output}= Fetch From Left ${usage_output} / |
| 335 | ${usage_output}= Convert To Integer ${usage_output} |
| 336 | |
| 337 | [return] ${usage_output} |
| 338 | |
| 339 | |
Rahul Maheshwari | 2568f87 | 2020-09-23 01:03:39 -0500 | [diff] [blame] | 340 | Test Teardown Execution |
| 341 | [Documentation] Do test teardown operation. |
| 342 | |
| 343 | FFDC On Test Case Fail |
| 344 | Close All Connections |