blob: 9686d9cea7191e10e9b2f6d2e8910893b3a56406 [file] [log] [blame]
Rahul Maheshwariad676bf2017-06-22 15:06:05 -05001*** Settings ***
2
3Documentation Test dump functionality of OpenBMC.
4
5Resource ../lib/openbmc_ffdc.robot
6Resource ../lib/rest_client.robot
7Resource ../lib/dump_utils.robot
George Keishinga2dab9f2017-09-05 13:54:01 -05008Resource ../lib/boot_utils.robot
Sivas SRRc0957412017-10-06 13:02:08 -05009Resource ../lib/utils.robot
George Keishinga2dab9f2017-09-05 13:54:01 -050010Library ../lib/bmc_ssh_utils.py
Rahul Maheshwariad676bf2017-06-22 15:06:05 -050011
12Test Setup Open Connection And Log In
George Keishing40b7ee02017-11-13 05:12:41 -060013Test Teardown Test Teardown Execution
Rahul Maheshwariad676bf2017-06-22 15:06:05 -050014
15*** Test Cases ***
16
Sivas SRRc0957412017-10-06 13:02:08 -050017Pre 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 Keishing40b7ee02017-11-13 05:12:41 -060024
Rahul Maheshwari355f2702017-10-17 09:15:23 -050025Verify 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 Maheshwariad676bf2017-06-22 15:06:05 -050029
Rahul Maheshwari355f2702017-10-17 09:15:23 -050030 REST Power Off stack_mode=skip quiet=1
Sivas SRR7aabd792017-10-18 21:28:23 -050031 ${dump_id}= Create User Initiated Dump
32 Check Existence of BMC Dump file ${dump_id}
Rahul Maheshwariad676bf2017-06-22 15:06:05 -050033
George Keishinga2dab9f2017-09-05 13:54:01 -050034Verify 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 Keishingfee18cf2017-09-20 09:46:00 -050039 Delete All BMC Dump
Sivas SRR7aabd792017-10-18 21:28:23 -050040 ${dump_id}= Create User Initiated Dump
George Keishinga2dab9f2017-09-05 13:54:01 -050041 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
Steven Sombaraaaab222018-12-19 13:16:23 -060045 ${resp}= OpenBMC Get Request ${DUMP_ENTRY_URI}list
George Keishinga2dab9f2017-09-05 13:54:01 -050046 Should Be Equal As Strings ${resp.status_code} ${HTTP_OK}
Sivas SRR7aabd792017-10-18 21:28:23 -050047 Check Existence of BMC Dump file ${dump_id}
48
49
50Verify 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)
Steven Sombaraaaab222018-12-19 13:16:23 -060057 ${resp}= OpenBMC Get Request ${DUMP_ENTRY_URI}list
Sivas SRR7aabd792017-10-18 21:28:23 -050058 Should Be Equal As Strings ${resp.status_code} ${HTTP_OK}
59 Check Existence of BMC Dump file ${dump_id}
George Keishinga2dab9f2017-09-05 13:54:01 -050060
61
Rahul Maheshwariad676bf2017-06-22 15:06:05 -050062Delete 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 SRR7aabd792017-10-18 21:28:23 -050067 Check Existence of BMC Dump file ${dump_id}
Rahul Maheshwariad676bf2017-06-22 15:06:05 -050068
69 Delete BMC Dump ${dump_id}
70
71
72Verify User Initiated Dump Size
George Keishing6db52022017-08-22 00:39:22 -050073 [Documentation] Verify user Initiated BMC dump size is under 200k.
Rahul Maheshwariad676bf2017-06-22 15:06:05 -050074 [Tags] Verify_User_Initiated_Dump_Size
75
76 ${dump_id}= Create User Initiated Dump
77
Steven Sombaraaaab222018-12-19 13:16:23 -060078 ${dump_size}= Read Attribute ${DUMP_ENTRY_URI}${dump_id} Size
George Keishing6db52022017-08-22 00:39:22 -050079 # Max size for dump is 200k = 200x1024
80 Should Be True 0 < ${dump_size} < 204800
Sivas SRR7aabd792017-10-18 21:28:23 -050081 Check Existence of BMC Dump file ${dump_id}
Rahul Maheshwariad676bf2017-06-22 15:06:05 -050082
83
Rahul Maheshwariad676bf2017-06-22 15:06:05 -050084Create 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
Steven Sombaraaaab222018-12-19 13:16:23 -060093 ${resp}= OpenBMC Get Request ${DUMP_ENTRY_URI}${dump_id_1}
Rahul Maheshwariad676bf2017-06-22 15:06:05 -050094 Should Be Equal As Strings ${resp.status_code} ${HTTP_NOT_FOUND}
95
Steven Sombaraaaab222018-12-19 13:16:23 -060096 ${resp}= OpenBMC Get Request ${DUMP_ENTRY_URI}${dump_id_2}
Rahul Maheshwariad676bf2017-06-22 15:06:05 -050097 Should Be Equal As Strings ${resp.status_code} ${HTTP_OK}
Sivas SRR7aabd792017-10-18 21:28:23 -050098 Check Existence of BMC Dump file ${dump_id_2}
Rahul Maheshwariad676bf2017-06-22 15:06:05 -050099
100
Rahul Maheshwari0dafbb42017-08-22 13:17:52 -0500101Create 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 Maheshwari0dafbb42017-08-22 13:17:52 -0500107 \ Delete BMC Dump ${dump_id}
108
109
110Delete 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 Keishingfee18cf2017-09-20 09:46:00 -0500118 Delete All BMC Dump
Steven Sombaraaaab222018-12-19 13:16:23 -0600119 ${resp}= OpenBMC Get Request ${DUMP_ENTRY_URI}list
Rahul Maheshwari0dafbb42017-08-22 13:17:52 -0500120 Should Be Equal As Strings ${resp.status_code} ${HTTP_NOT_FOUND}
121
George Keishing40b7ee02017-11-13 05:12:41 -0600122
123Verify 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 Maheshwari1612ac92017-08-30 14:42:32 -0500132Verify 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
George Keishing40efd762018-10-22 04:04:00 -0500138 Wait Until Keyword Succeeds 2 min 10 sec Get Dump Entries
Rahul Maheshwari1612ac92017-08-30 14:42:32 -0500139
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 SRRc0957412017-10-06 13:02:08 -0500147Post 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
154Post 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 Maheshwari0dafbb42017-08-22 13:17:52 -0500159
Rahul Maheshwari1612ac92017-08-30 14:42:32 -0500160
Rahul Maheshwariad676bf2017-06-22 15:06:05 -0500161*** Keywords ***
162
George Keishing40b7ee02017-11-13 05:12:41 -0600163Test Teardown Execution
Rahul Maheshwariad676bf2017-06-22 15:06:05 -0500164 [Documentation] Do the post test teardown.
165
Rahul Maheshwari953038b2017-10-17 05:08:59 -0500166 Wait Until Keyword Succeeds 3 min 15 sec Verify No Dump In Progress
Rahul Maheshwariad676bf2017-06-22 15:06:05 -0500167 FFDC On Test Case Fail
Rahul Maheshwaribf9024f2017-10-25 10:51:39 -0500168 Delete All BMC Dump
Rahul Maheshwariad676bf2017-06-22 15:06:05 -0500169 Close All Connections