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