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