blob: d4f96850e0319c601487ff7cb16f0de6118f0311 [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
9Library ../lib/bmc_ssh_utils.py
Rahul Maheshwariad676bf2017-06-22 15:06:05 -050010
11Test Setup Open Connection And Log In
12Test Teardown Post Testcase Execution
13
14*** Variables ***
15
16
17*** Test Cases ***
18
19Verify User Initiated BMC Dump
20 [Documentation] Create user initiated BMC dump and verify dump
21 ... entry for it.
22 [Tags] Verify_User_Initiated_Dump
23
24 Create User Initiated Dump
25
26
George Keishinga2dab9f2017-09-05 13:54:01 -050027Verify Dump Persistency On Service Restart
28 [Documentation] Create user dump, restart BMC service and verify dump
29 ... persistency.
30 [Tags] Verify_Dump_Persistency_On_Service_Restart
31
32 Delete All Dumps
33 Create User Initiated Dump
34 BMC Execute Command
35 ... systemctl restart xyz.openbmc_project.Dump.Manager.service
36 Sleep 10s reason=Wait for BMC dump service to restart properly.
37
38 ${resp}= OpenBMC Get Request ${DUMP_ENTRY_URI}/list
39 Should Be Equal As Strings ${resp.status_code} ${HTTP_OK}
40
41
42Verify Dump Persistency On Reset
43 [Documentation] Create user dump, reset BMC and verify dump persistency.
44 [Tags] Verify_Dump_Persistency_On_Reset
45
46 Delete All Dumps
47 Create User Initiated Dump
48 OBMC Reboot (off)
49 ${resp}= OpenBMC Get Request ${DUMP_ENTRY_URI}/list
50 Should Be Equal As Strings ${resp.status_code} ${HTTP_OK}
51
52
Rahul Maheshwariad676bf2017-06-22 15:06:05 -050053Delete User Initiated BMC Dump And Verify
54 [Documentation] Delete user initiated dump and verify.
55 [Tags] Delete_User_Initiated_Dump_And_Verify
56
57 ${dump_id}= Create User Initiated Dump
58
59 Delete BMC Dump ${dump_id}
60
61
62Verify User Initiated Dump Size
George Keishing6db52022017-08-22 00:39:22 -050063 [Documentation] Verify user Initiated BMC dump size is under 200k.
Rahul Maheshwariad676bf2017-06-22 15:06:05 -050064 [Tags] Verify_User_Initiated_Dump_Size
65
66 ${dump_id}= Create User Initiated Dump
67
68 ${dump_size}= Read Attribute ${DUMP_ENTRY_URI}/${dump_id} Size
George Keishing6db52022017-08-22 00:39:22 -050069 # Max size for dump is 200k = 200x1024
70 Should Be True 0 < ${dump_size} < 204800
Rahul Maheshwariad676bf2017-06-22 15:06:05 -050071
72
Rahul Maheshwariad676bf2017-06-22 15:06:05 -050073Create Two User Initiated Dump And Delete One
74 [Documentation] Create two dumps and delete the first.
75 [Tags] Create_Two_User_Initiated_Dump_And_Delete_One
76
77 ${dump_id_1}= Create User Initiated Dump
78 ${dump_id_2}= Create User Initiated Dump
79
80 Delete BMC Dump ${dump_id_1}
81
82 ${resp}= OpenBMC Get Request ${DUMP_ENTRY_URI}/${dump_id_1}
83 Should Be Equal As Strings ${resp.status_code} ${HTTP_NOT_FOUND}
84
85 ${resp}= OpenBMC Get Request ${DUMP_ENTRY_URI}/${dump_id_2}
86 Should Be Equal As Strings ${resp.status_code} ${HTTP_OK}
87
88
Rahul Maheshwari0dafbb42017-08-22 13:17:52 -050089Create And Delete BMC Dump Multiple Times
90 [Documentation] Create and delete BMC dump multiple times.
91 [Tags] Create_And_Delete_BMC_Dump_Multiple_Times
92
93 :FOR ${INDEX} IN RANGE 1 5
94 \ ${dump_id}= Create User Initiated Dump
Rahul Maheshwarie2cd17f2017-09-26 21:26:50 -050095 \ Wait Until Keyword Succeeds 3 min 15 sec
Rahul Maheshwari0dafbb42017-08-22 13:17:52 -050096 ... Check Dump Existence ${dump_id}
97 \ Delete BMC Dump ${dump_id}
98
99
100Delete All BMC Dumps And Verify
101 [Documentation] Delete all BMC dumps and verify.
102 [Tags] Delete_All_BMC_Dumps_And_Verify
103
104 # Create some dump.
105 Create User Initiated Dump
106 Create User Initiated Dump
107
108 Delete All Dumps
109 ${resp}= OpenBMC Get Request ${DUMP_ENTRY_URI}/list
110 Should Be Equal As Strings ${resp.status_code} ${HTTP_NOT_FOUND}
111
112
Rahul Maheshwariad676bf2017-06-22 15:06:05 -0500113*** Keywords ***
114
115Post Testcase Execution
116 [Documentation] Do the post test teardown.
117
118 Delete All Dumps
119 FFDC On Test Case Fail
120 Close All Connections