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 |
George Keishing | 40b7ee0 | 2017-11-13 05:12:41 -0600 | [diff] [blame] | 13 | Test Teardown Test Teardown Execution |
Rahul Maheshwari | ad676bf | 2017-06-22 15:06:05 -0500 | [diff] [blame] | 14 | |
| 15 | *** Test Cases *** |
| 16 | |
Sivas SRR | c095741 | 2017-10-06 13:02:08 -0500 | [diff] [blame] | 17 | Pre Dump BMC Performance Test |
| 18 | [Documentation] Check performance of memory, CPU & file system of BMC. |
| 19 | [Tags] Pre_Dump_BMC_Performance_Test |
| 20 | |
| 21 | Open Connection And Log In |
| 22 | Check BMC Performance |
| 23 | |
George Keishing | 40b7ee0 | 2017-11-13 05:12:41 -0600 | [diff] [blame] | 24 | |
Rahul Maheshwari | 355f270 | 2017-10-17 09:15:23 -0500 | [diff] [blame] | 25 | Verify User Initiated BMC Dump When Powered Off |
| 26 | [Documentation] Create user initiated BMC dump at host off state and |
| 27 | ... verify dump entry for it. |
| 28 | [Tags] Verify_User_Initiated_BMC_Dump_When_Powered_Off |
Rahul Maheshwari | ad676bf | 2017-06-22 15:06:05 -0500 | [diff] [blame] | 29 | |
Rahul Maheshwari | 355f270 | 2017-10-17 09:15:23 -0500 | [diff] [blame] | 30 | REST Power Off stack_mode=skip quiet=1 |
Sivas SRR | 7aabd79 | 2017-10-18 21:28:23 -0500 | [diff] [blame] | 31 | ${dump_id}= Create User Initiated Dump |
| 32 | Check Existence of BMC Dump file ${dump_id} |
Rahul Maheshwari | ad676bf | 2017-06-22 15:06:05 -0500 | [diff] [blame] | 33 | |
George Keishing | a2dab9f | 2017-09-05 13:54:01 -0500 | [diff] [blame] | 34 | Verify Dump Persistency On Service Restart |
| 35 | [Documentation] Create user dump, restart BMC service and verify dump |
| 36 | ... persistency. |
| 37 | [Tags] Verify_Dump_Persistency_On_Service_Restart |
| 38 | |
George Keishing | fee18cf | 2017-09-20 09:46:00 -0500 | [diff] [blame] | 39 | Delete All BMC Dump |
Sivas SRR | 7aabd79 | 2017-10-18 21:28:23 -0500 | [diff] [blame] | 40 | ${dump_id}= Create User Initiated Dump |
George Keishing | a2dab9f | 2017-09-05 13:54:01 -0500 | [diff] [blame] | 41 | BMC Execute Command |
| 42 | ... systemctl restart xyz.openbmc_project.Dump.Manager.service |
| 43 | Sleep 10s reason=Wait for BMC dump service to restart properly. |
| 44 | |
| 45 | ${resp}= OpenBMC Get Request ${DUMP_ENTRY_URI}/list |
| 46 | Should Be Equal As Strings ${resp.status_code} ${HTTP_OK} |
Sivas SRR | 7aabd79 | 2017-10-18 21:28:23 -0500 | [diff] [blame] | 47 | Check Existence of BMC Dump file ${dump_id} |
| 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 | |
| 54 | Delete All BMC Dump |
| 55 | ${dump_id}= 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 | Check Existence of BMC Dump file ${dump_id} |
George Keishing | a2dab9f | 2017-09-05 13:54:01 -0500 | [diff] [blame] | 60 | |
| 61 | |
Rahul Maheshwari | ad676bf | 2017-06-22 15:06:05 -0500 | [diff] [blame] | 62 | Delete User Initiated BMC Dump And Verify |
| 63 | [Documentation] Delete user initiated dump and verify. |
| 64 | [Tags] Delete_User_Initiated_Dump_And_Verify |
| 65 | |
| 66 | ${dump_id}= Create User Initiated Dump |
Sivas SRR | 7aabd79 | 2017-10-18 21:28:23 -0500 | [diff] [blame] | 67 | Check Existence of BMC Dump file ${dump_id} |
Rahul Maheshwari | ad676bf | 2017-06-22 15:06:05 -0500 | [diff] [blame] | 68 | |
| 69 | Delete BMC Dump ${dump_id} |
| 70 | |
| 71 | |
| 72 | Verify User Initiated Dump Size |
George Keishing | 6db5202 | 2017-08-22 00:39:22 -0500 | [diff] [blame] | 73 | [Documentation] Verify user Initiated BMC dump size is under 200k. |
Rahul Maheshwari | ad676bf | 2017-06-22 15:06:05 -0500 | [diff] [blame] | 74 | [Tags] Verify_User_Initiated_Dump_Size |
| 75 | |
| 76 | ${dump_id}= Create User Initiated Dump |
| 77 | |
| 78 | ${dump_size}= Read Attribute ${DUMP_ENTRY_URI}/${dump_id} Size |
George Keishing | 6db5202 | 2017-08-22 00:39:22 -0500 | [diff] [blame] | 79 | # Max size for dump is 200k = 200x1024 |
| 80 | Should Be True 0 < ${dump_size} < 204800 |
Sivas SRR | 7aabd79 | 2017-10-18 21:28:23 -0500 | [diff] [blame] | 81 | Check Existence of BMC Dump file ${dump_id} |
Rahul Maheshwari | ad676bf | 2017-06-22 15:06:05 -0500 | [diff] [blame] | 82 | |
| 83 | |
Rahul Maheshwari | ad676bf | 2017-06-22 15:06:05 -0500 | [diff] [blame] | 84 | Create Two User Initiated Dump And Delete One |
| 85 | [Documentation] Create two dumps and delete the first. |
| 86 | [Tags] Create_Two_User_Initiated_Dump_And_Delete_One |
| 87 | |
| 88 | ${dump_id_1}= Create User Initiated Dump |
| 89 | ${dump_id_2}= Create User Initiated Dump |
| 90 | |
| 91 | Delete BMC Dump ${dump_id_1} |
| 92 | |
| 93 | ${resp}= OpenBMC Get Request ${DUMP_ENTRY_URI}/${dump_id_1} |
| 94 | Should Be Equal As Strings ${resp.status_code} ${HTTP_NOT_FOUND} |
| 95 | |
| 96 | ${resp}= OpenBMC Get Request ${DUMP_ENTRY_URI}/${dump_id_2} |
| 97 | Should Be Equal As Strings ${resp.status_code} ${HTTP_OK} |
Sivas SRR | 7aabd79 | 2017-10-18 21:28:23 -0500 | [diff] [blame] | 98 | Check Existence of BMC Dump file ${dump_id_2} |
Rahul Maheshwari | ad676bf | 2017-06-22 15:06:05 -0500 | [diff] [blame] | 99 | |
| 100 | |
Rahul Maheshwari | 0dafbb4 | 2017-08-22 13:17:52 -0500 | [diff] [blame] | 101 | Create And Delete BMC Dump Multiple Times |
| 102 | [Documentation] Create and delete BMC dump multiple times. |
| 103 | [Tags] Create_And_Delete_BMC_Dump_Multiple_Times |
| 104 | |
| 105 | :FOR ${INDEX} IN RANGE 1 5 |
| 106 | \ ${dump_id}= Create User Initiated Dump |
Rahul Maheshwari | 0dafbb4 | 2017-08-22 13:17:52 -0500 | [diff] [blame] | 107 | \ Delete BMC Dump ${dump_id} |
| 108 | |
| 109 | |
| 110 | Delete All BMC Dumps And Verify |
| 111 | [Documentation] Delete all BMC dumps and verify. |
| 112 | [Tags] Delete_All_BMC_Dumps_And_Verify |
| 113 | |
| 114 | # Create some dump. |
| 115 | Create User Initiated Dump |
| 116 | Create User Initiated Dump |
| 117 | |
George Keishing | fee18cf | 2017-09-20 09:46:00 -0500 | [diff] [blame] | 118 | Delete All BMC Dump |
Rahul Maheshwari | 0dafbb4 | 2017-08-22 13:17:52 -0500 | [diff] [blame] | 119 | ${resp}= OpenBMC Get Request ${DUMP_ENTRY_URI}/list |
| 120 | Should Be Equal As Strings ${resp.status_code} ${HTTP_NOT_FOUND} |
| 121 | |
George Keishing | 40b7ee0 | 2017-11-13 05:12:41 -0600 | [diff] [blame] | 122 | |
| 123 | Verify User Initiated BMC Dump When Host Booted |
| 124 | [Documentation] Create user initiated BMC dump at host booted state and |
| 125 | ... verify dump entry for it. |
| 126 | [Tags] Verify_User_Initiated_BMC_Dump_When_Host_Booted |
| 127 | |
| 128 | REST Power On stack_mode=skip quiet=1 |
| 129 | Create User Initiated Dump |
| 130 | |
| 131 | |
Rahul Maheshwari | 1612ac9 | 2017-08-30 14:42:32 -0500 | [diff] [blame] | 132 | Verify Core Dump Size |
| 133 | [Documentation] Verify BMC core dump size is under 200k. |
| 134 | [Tags] Verify_Core_Dump_Size |
| 135 | |
| 136 | Delete All Dumps |
| 137 | Trigger Core Dump |
| 138 | Wait Until Keyword Succeeds 1 min 10 sec Get Dump Entries |
| 139 | |
| 140 | ${dump_entries}= Get URL List ${DUMP_ENTRY_URI} |
| 141 | ${dump_size}= Read Attribute ${dump_entries[0]} Size |
| 142 | |
| 143 | # Max size for dump is 200k = 200x1024 |
| 144 | Should Be True 0 < ${dump_size} < 204800 msg=Size of dump is incorrect. |
| 145 | |
| 146 | |
Sivas SRR | c095741 | 2017-10-06 13:02:08 -0500 | [diff] [blame] | 147 | Post Dump BMC Performance Test |
| 148 | [Documentation] Check performance of memory, CPU & file system of BMC. |
| 149 | [Tags] Post_Dump_BMC_Performance_Test |
| 150 | |
| 151 | Open Connection And Log In |
| 152 | Check BMC Performance |
| 153 | |
| 154 | Post Dump Core Dump Check |
| 155 | [Documentation] Check core dump existence on BMC after code update. |
| 156 | [Tags] Post_Dump_Core_Dump_Check |
| 157 | |
| 158 | Check For Core Dumps |
Rahul Maheshwari | 0dafbb4 | 2017-08-22 13:17:52 -0500 | [diff] [blame] | 159 | |
Rahul Maheshwari | 1612ac9 | 2017-08-30 14:42:32 -0500 | [diff] [blame] | 160 | |
Rahul Maheshwari | ad676bf | 2017-06-22 15:06:05 -0500 | [diff] [blame] | 161 | *** Keywords *** |
| 162 | |
George Keishing | 40b7ee0 | 2017-11-13 05:12:41 -0600 | [diff] [blame] | 163 | Test Teardown Execution |
Rahul Maheshwari | ad676bf | 2017-06-22 15:06:05 -0500 | [diff] [blame] | 164 | [Documentation] Do the post test teardown. |
| 165 | |
Rahul Maheshwari | 953038b | 2017-10-17 05:08:59 -0500 | [diff] [blame] | 166 | Wait Until Keyword Succeeds 3 min 15 sec Verify No Dump In Progress |
Rahul Maheshwari | ad676bf | 2017-06-22 15:06:05 -0500 | [diff] [blame] | 167 | FFDC On Test Case Fail |
Rahul Maheshwari | bf9024f | 2017-10-25 10:51:39 -0500 | [diff] [blame] | 168 | Delete All BMC Dump |
Rahul Maheshwari | ad676bf | 2017-06-22 15:06:05 -0500 | [diff] [blame] | 169 | Close All Connections |