Rahul Maheshwari | ad676bf | 2017-06-22 15:06:05 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | |
| 3 | Documentation Test dump functionality of OpenBMC. |
| 4 | |
| 5 | Resource ../lib/openbmc_ffdc.robot |
| 6 | Resource ../lib/rest_client.robot |
| 7 | Resource ../lib/dump_utils.robot |
George Keishing | a2dab9f | 2017-09-05 13:54:01 -0500 | [diff] [blame] | 8 | Resource ../lib/boot_utils.robot |
| 9 | Library ../lib/bmc_ssh_utils.py |
Rahul Maheshwari | ad676bf | 2017-06-22 15:06:05 -0500 | [diff] [blame] | 10 | |
| 11 | Test Setup Open Connection And Log In |
| 12 | Test Teardown Post Testcase Execution |
| 13 | |
| 14 | *** Variables *** |
| 15 | |
| 16 | |
| 17 | *** Test Cases *** |
| 18 | |
| 19 | Verify User Initiated BMC Dump |
| 20 | [Documentation] Create user initiated BMC dump and verify dump |
| 21 | ... entry for it. |
| 22 | [Tags] Verify_User_Initiated_Dump |
| 23 | |
| 24 | Create User Initiated Dump |
| 25 | |
| 26 | |
George Keishing | a2dab9f | 2017-09-05 13:54:01 -0500 | [diff] [blame] | 27 | Verify Dump Persistency On Service Restart |
| 28 | [Documentation] Create user dump, restart BMC service and verify dump |
| 29 | ... persistency. |
| 30 | [Tags] Verify_Dump_Persistency_On_Service_Restart |
| 31 | |
| 32 | Delete All Dumps |
| 33 | Create User Initiated Dump |
| 34 | BMC Execute Command |
| 35 | ... systemctl restart xyz.openbmc_project.Dump.Manager.service |
| 36 | Sleep 10s reason=Wait for BMC dump service to restart properly. |
| 37 | |
| 38 | ${resp}= OpenBMC Get Request ${DUMP_ENTRY_URI}/list |
| 39 | Should Be Equal As Strings ${resp.status_code} ${HTTP_OK} |
| 40 | |
| 41 | |
| 42 | Verify Dump Persistency On Reset |
| 43 | [Documentation] Create user dump, reset BMC and verify dump persistency. |
| 44 | [Tags] Verify_Dump_Persistency_On_Reset |
| 45 | |
| 46 | Delete All Dumps |
| 47 | Create User Initiated Dump |
| 48 | OBMC Reboot (off) |
| 49 | ${resp}= OpenBMC Get Request ${DUMP_ENTRY_URI}/list |
| 50 | Should Be Equal As Strings ${resp.status_code} ${HTTP_OK} |
| 51 | |
| 52 | |
Rahul Maheshwari | ad676bf | 2017-06-22 15:06:05 -0500 | [diff] [blame] | 53 | Delete User Initiated BMC Dump And Verify |
| 54 | [Documentation] Delete user initiated dump and verify. |
| 55 | [Tags] Delete_User_Initiated_Dump_And_Verify |
| 56 | |
| 57 | ${dump_id}= Create User Initiated Dump |
| 58 | |
| 59 | Delete BMC Dump ${dump_id} |
| 60 | |
| 61 | |
| 62 | Verify User Initiated Dump Size |
George Keishing | 6db5202 | 2017-08-22 00:39:22 -0500 | [diff] [blame] | 63 | [Documentation] Verify user Initiated BMC dump size is under 200k. |
Rahul Maheshwari | ad676bf | 2017-06-22 15:06:05 -0500 | [diff] [blame] | 64 | [Tags] Verify_User_Initiated_Dump_Size |
| 65 | |
| 66 | ${dump_id}= Create User Initiated Dump |
| 67 | |
| 68 | ${dump_size}= Read Attribute ${DUMP_ENTRY_URI}/${dump_id} Size |
George Keishing | 6db5202 | 2017-08-22 00:39:22 -0500 | [diff] [blame] | 69 | # Max size for dump is 200k = 200x1024 |
| 70 | Should Be True 0 < ${dump_size} < 204800 |
Rahul Maheshwari | ad676bf | 2017-06-22 15:06:05 -0500 | [diff] [blame] | 71 | |
| 72 | |
Rahul Maheshwari | ad676bf | 2017-06-22 15:06:05 -0500 | [diff] [blame] | 73 | Create Two User Initiated Dump And Delete One |
| 74 | [Documentation] Create two dumps and delete the first. |
| 75 | [Tags] Create_Two_User_Initiated_Dump_And_Delete_One |
| 76 | |
| 77 | ${dump_id_1}= Create User Initiated Dump |
| 78 | ${dump_id_2}= Create User Initiated Dump |
| 79 | |
| 80 | Delete BMC Dump ${dump_id_1} |
| 81 | |
| 82 | ${resp}= OpenBMC Get Request ${DUMP_ENTRY_URI}/${dump_id_1} |
| 83 | Should Be Equal As Strings ${resp.status_code} ${HTTP_NOT_FOUND} |
| 84 | |
| 85 | ${resp}= OpenBMC Get Request ${DUMP_ENTRY_URI}/${dump_id_2} |
| 86 | Should Be Equal As Strings ${resp.status_code} ${HTTP_OK} |
| 87 | |
| 88 | |
Rahul Maheshwari | 0dafbb4 | 2017-08-22 13:17:52 -0500 | [diff] [blame] | 89 | Create And Delete BMC Dump Multiple Times |
| 90 | [Documentation] Create and delete BMC dump multiple times. |
| 91 | [Tags] Create_And_Delete_BMC_Dump_Multiple_Times |
| 92 | |
| 93 | :FOR ${INDEX} IN RANGE 1 5 |
| 94 | \ ${dump_id}= Create User Initiated Dump |
Rahul Maheshwari | e2cd17f | 2017-09-26 21:26:50 -0500 | [diff] [blame] | 95 | \ Wait Until Keyword Succeeds 3 min 15 sec |
Rahul Maheshwari | 0dafbb4 | 2017-08-22 13:17:52 -0500 | [diff] [blame] | 96 | ... Check Dump Existence ${dump_id} |
| 97 | \ Delete BMC Dump ${dump_id} |
| 98 | |
| 99 | |
| 100 | Delete All BMC Dumps And Verify |
| 101 | [Documentation] Delete all BMC dumps and verify. |
| 102 | [Tags] Delete_All_BMC_Dumps_And_Verify |
| 103 | |
| 104 | # Create some dump. |
| 105 | Create User Initiated Dump |
| 106 | Create User Initiated Dump |
| 107 | |
| 108 | Delete All Dumps |
| 109 | ${resp}= OpenBMC Get Request ${DUMP_ENTRY_URI}/list |
| 110 | Should Be Equal As Strings ${resp.status_code} ${HTTP_NOT_FOUND} |
| 111 | |
| 112 | |
Rahul Maheshwari | ad676bf | 2017-06-22 15:06:05 -0500 | [diff] [blame] | 113 | *** Keywords *** |
| 114 | |
| 115 | Post Testcase Execution |
| 116 | [Documentation] Do the post test teardown. |
| 117 | |
| 118 | Delete All Dumps |
| 119 | FFDC On Test Case Fail |
| 120 | Close All Connections |