blob: cd506e998dee2f29d581f5334516baa41a07c28d [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 Maheshwariad676bf2017-06-22 15:06:05 -050027Verify 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
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
George Keishinga2dab9f2017-09-05 13:54:01 -050040 Create User Initiated Dump
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}
47
48
49Verify Dump Persistency On Reset
50 [Documentation] Create user dump, reset BMC and verify dump persistency.
51 [Tags] Verify_Dump_Persistency_On_Reset
52
George Keishingfee18cf2017-09-20 09:46:00 -050053 Delete All BMC Dump
George Keishinga2dab9f2017-09-05 13:54:01 -050054 Create User Initiated Dump
55 OBMC Reboot (off)
56 ${resp}= OpenBMC Get Request ${DUMP_ENTRY_URI}/list
57 Should Be Equal As Strings ${resp.status_code} ${HTTP_OK}
58
59
Rahul Maheshwariad676bf2017-06-22 15:06:05 -050060Delete 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
69Verify User Initiated Dump Size
George Keishing6db52022017-08-22 00:39:22 -050070 [Documentation] Verify user Initiated BMC dump size is under 200k.
Rahul Maheshwariad676bf2017-06-22 15:06:05 -050071 [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 Keishing6db52022017-08-22 00:39:22 -050076 # Max size for dump is 200k = 200x1024
77 Should Be True 0 < ${dump_size} < 204800
Rahul Maheshwariad676bf2017-06-22 15:06:05 -050078
79
Rahul Maheshwariad676bf2017-06-22 15:06:05 -050080Create 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 Maheshwari0dafbb42017-08-22 13:17:52 -050096Create 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 Maheshwarie2cd17f2017-09-26 21:26:50 -0500102 \ Wait Until Keyword Succeeds 3 min 15 sec
Rahul Maheshwari0dafbb42017-08-22 13:17:52 -0500103 ... Check Dump Existence ${dump_id}
104 \ Delete BMC Dump ${dump_id}
105
106
107Delete All BMC Dumps And Verify
108 [Documentation] Delete all BMC dumps and verify.
109 [Tags] Delete_All_BMC_Dumps_And_Verify
110
111 # Create some dump.
112 Create User Initiated Dump
113 Create User Initiated Dump
114
George Keishingfee18cf2017-09-20 09:46:00 -0500115 Delete All BMC Dump
Rahul Maheshwari0dafbb42017-08-22 13:17:52 -0500116 ${resp}= OpenBMC Get Request ${DUMP_ENTRY_URI}/list
117 Should Be Equal As Strings ${resp.status_code} ${HTTP_NOT_FOUND}
118
Sivas SRRc0957412017-10-06 13:02:08 -0500119Post Dump BMC Performance Test
120 [Documentation] Check performance of memory, CPU & file system of BMC.
121 [Tags] Post_Dump_BMC_Performance_Test
122
123 Open Connection And Log In
124 Check BMC Performance
125
126Post Dump Core Dump Check
127 [Documentation] Check core dump existence on BMC after code update.
128 [Tags] Post_Dump_Core_Dump_Check
129
130 Check For Core Dumps
Rahul Maheshwari0dafbb42017-08-22 13:17:52 -0500131
Rahul Maheshwariad676bf2017-06-22 15:06:05 -0500132*** Keywords ***
133
134Post Testcase Execution
135 [Documentation] Do the post test teardown.
136
Rahul Maheshwari953038b2017-10-17 05:08:59 -0500137 Wait Until Keyword Succeeds 3 min 15 sec Verify No Dump In Progress
138
George Keishingfee18cf2017-09-20 09:46:00 -0500139 Delete All BMC Dump
Rahul Maheshwariad676bf2017-06-22 15:06:05 -0500140 FFDC On Test Case Fail
141 Close All Connections