blob: 38370cd0ce114d3b265efbf83cae7822c8b9e39f [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
13Test Teardown Post Testcase Execution
14
15*** Variables ***
16
17
18*** Test Cases ***
19
Sivas SRRc0957412017-10-06 13:02:08 -050020Pre 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 Maheshwari355f2702017-10-17 09:15:23 -050027Verify User Initiated BMC Dump When Powered Off
28 [Documentation] Create user initiated BMC dump at host off state and
29 ... verify dump entry for it.
30 [Tags] Verify_User_Initiated_BMC_Dump_When_Powered_Off
Rahul Maheshwariad676bf2017-06-22 15:06:05 -050031
Rahul Maheshwari355f2702017-10-17 09:15:23 -050032 REST Power Off stack_mode=skip quiet=1
33 Create User Initiated Dump
34
35
36Verify User Initiated BMC Dump When Host Booted
37 [Documentation] Create user initiated BMC dump at host booted state and
38 ... verify dump entry for it.
39 [Tags] Verify_User_Initiated_BMC_Dump_When_Host_Booted
40
41 REST Power On stack_mode=skip quiet=1
Rahul Maheshwariad676bf2017-06-22 15:06:05 -050042 Create User Initiated Dump
43
George Keishinga2dab9f2017-09-05 13:54:01 -050044Verify Dump Persistency On Service Restart
45 [Documentation] Create user dump, restart BMC service and verify dump
46 ... persistency.
47 [Tags] Verify_Dump_Persistency_On_Service_Restart
48
George Keishingfee18cf2017-09-20 09:46:00 -050049 Delete All BMC Dump
George Keishinga2dab9f2017-09-05 13:54:01 -050050 Create User Initiated Dump
51 BMC Execute Command
52 ... systemctl restart xyz.openbmc_project.Dump.Manager.service
53 Sleep 10s reason=Wait for BMC dump service to restart properly.
54
55 ${resp}= OpenBMC Get Request ${DUMP_ENTRY_URI}/list
56 Should Be Equal As Strings ${resp.status_code} ${HTTP_OK}
57
58
59Verify Dump Persistency On Reset
60 [Documentation] Create user dump, reset BMC and verify dump persistency.
61 [Tags] Verify_Dump_Persistency_On_Reset
62
George Keishingfee18cf2017-09-20 09:46:00 -050063 Delete All BMC Dump
George Keishinga2dab9f2017-09-05 13:54:01 -050064 Create User Initiated Dump
65 OBMC Reboot (off)
66 ${resp}= OpenBMC Get Request ${DUMP_ENTRY_URI}/list
67 Should Be Equal As Strings ${resp.status_code} ${HTTP_OK}
68
69
Rahul Maheshwariad676bf2017-06-22 15:06:05 -050070Delete User Initiated BMC Dump And Verify
71 [Documentation] Delete user initiated dump and verify.
72 [Tags] Delete_User_Initiated_Dump_And_Verify
73
74 ${dump_id}= Create User Initiated Dump
75
76 Delete BMC Dump ${dump_id}
77
78
79Verify User Initiated Dump Size
George Keishing6db52022017-08-22 00:39:22 -050080 [Documentation] Verify user Initiated BMC dump size is under 200k.
Rahul Maheshwariad676bf2017-06-22 15:06:05 -050081 [Tags] Verify_User_Initiated_Dump_Size
82
83 ${dump_id}= Create User Initiated Dump
84
85 ${dump_size}= Read Attribute ${DUMP_ENTRY_URI}/${dump_id} Size
George Keishing6db52022017-08-22 00:39:22 -050086 # Max size for dump is 200k = 200x1024
87 Should Be True 0 < ${dump_size} < 204800
Rahul Maheshwariad676bf2017-06-22 15:06:05 -050088
89
Rahul Maheshwariad676bf2017-06-22 15:06:05 -050090Create Two User Initiated Dump And Delete One
91 [Documentation] Create two dumps and delete the first.
92 [Tags] Create_Two_User_Initiated_Dump_And_Delete_One
93
94 ${dump_id_1}= Create User Initiated Dump
95 ${dump_id_2}= Create User Initiated Dump
96
97 Delete BMC Dump ${dump_id_1}
98
99 ${resp}= OpenBMC Get Request ${DUMP_ENTRY_URI}/${dump_id_1}
100 Should Be Equal As Strings ${resp.status_code} ${HTTP_NOT_FOUND}
101
102 ${resp}= OpenBMC Get Request ${DUMP_ENTRY_URI}/${dump_id_2}
103 Should Be Equal As Strings ${resp.status_code} ${HTTP_OK}
104
105
Rahul Maheshwari0dafbb42017-08-22 13:17:52 -0500106Create And Delete BMC Dump Multiple Times
107 [Documentation] Create and delete BMC dump multiple times.
108 [Tags] Create_And_Delete_BMC_Dump_Multiple_Times
109
110 :FOR ${INDEX} IN RANGE 1 5
111 \ ${dump_id}= Create User Initiated Dump
Rahul Maheshwarie2cd17f2017-09-26 21:26:50 -0500112 \ Wait Until Keyword Succeeds 3 min 15 sec
Rahul Maheshwari0dafbb42017-08-22 13:17:52 -0500113 ... Check Dump Existence ${dump_id}
114 \ Delete BMC Dump ${dump_id}
115
116
117Delete All BMC Dumps And Verify
118 [Documentation] Delete all BMC dumps and verify.
119 [Tags] Delete_All_BMC_Dumps_And_Verify
120
121 # Create some dump.
122 Create User Initiated Dump
123 Create User Initiated Dump
124
George Keishingfee18cf2017-09-20 09:46:00 -0500125 Delete All BMC Dump
Rahul Maheshwari0dafbb42017-08-22 13:17:52 -0500126 ${resp}= OpenBMC Get Request ${DUMP_ENTRY_URI}/list
127 Should Be Equal As Strings ${resp.status_code} ${HTTP_NOT_FOUND}
128
Sivas SRRc0957412017-10-06 13:02:08 -0500129Post Dump BMC Performance Test
130 [Documentation] Check performance of memory, CPU & file system of BMC.
131 [Tags] Post_Dump_BMC_Performance_Test
132
133 Open Connection And Log In
134 Check BMC Performance
135
136Post Dump Core Dump Check
137 [Documentation] Check core dump existence on BMC after code update.
138 [Tags] Post_Dump_Core_Dump_Check
139
140 Check For Core Dumps
Rahul Maheshwari0dafbb42017-08-22 13:17:52 -0500141
Rahul Maheshwariad676bf2017-06-22 15:06:05 -0500142*** Keywords ***
143
144Post Testcase Execution
145 [Documentation] Do the post test teardown.
146
Rahul Maheshwari953038b2017-10-17 05:08:59 -0500147 Wait Until Keyword Succeeds 3 min 15 sec Verify No Dump In Progress
148
George Keishingfee18cf2017-09-20 09:46:00 -0500149 Delete All BMC Dump
Rahul Maheshwariad676bf2017-06-22 15:06:05 -0500150 FFDC On Test Case Fail
151 Close All Connections