Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | |
| 3 | Documentation This suite is for testing esel's mechanism of checking Reservation_ID. |
| 4 | |
George Keishing | d55a4be | 2016-08-26 03:28:17 -0500 | [diff] [blame] | 5 | Resource ../lib/ipmi_client.robot |
| 6 | Resource ../lib/openbmc_ffdc.robot |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 7 | |
| 8 | Suite Setup Open Connection And Log In |
| 9 | Suite Teardown Close All Connections |
Gunnar Mills | eac1af2 | 2016-11-14 15:30:09 -0600 | [diff] [blame] | 10 | Test Teardown FFDC On Test Case Fail |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 11 | |
| 12 | *** Test Cases *** |
| 13 | |
| 14 | Test Wrong Reservation_ID |
George Keishing | cac24c7 | 2016-09-23 04:44:19 -0500 | [diff] [blame] | 15 | [Documentation] This testcase is to test BMC can handle multi-requestor's |
| 16 | ... oem partial add command with incorrect reservation id. |
| 17 | ... It simulates sending partial add command with fake content |
| 18 | ... and wrong Reservation ID. This command will be rejected. |
| 19 | [Tags] Test_Wrong_Reservation_ID |
Gunnar Mills | 56b3289 | 2016-11-14 13:56:17 -0600 | [diff] [blame] | 20 | |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 21 | ${rev_id_1}= Run IPMI Command Returned 0x0a 0x42 |
| 22 | ${rev_id_ls}= Get Substring ${rev_id_1} 1 3 |
| 23 | ${rev_id_ms}= Get Substring ${rev_id_1} -2 |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 24 | Run IPMI command 0x0a 0x42 |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 25 | ${output}= Check IPMI Oempartialadd Reject 0x32 0xf0 0x${rev_id_ls} 0x${rev_id_ms} 0 0 0 0 0 1 2 3 4 5 6 7 8 9 0xa 0xb 0xc 0xd 0xe 0xf |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 26 | Should Contain ${output} Reservation cancelled |
| 27 | |
| 28 | Test Correct Reservation_ID |
George Keishing | cac24c7 | 2016-09-23 04:44:19 -0500 | [diff] [blame] | 29 | [Documentation] This testcase is to test BMC can handle multi-requestor's |
| 30 | ... oem partial add command with correct reservation id. It |
| 31 | ... simulates sending partial add command with fake content |
| 32 | ... and correct Reservation ID. This command will be accepted. |
| 33 | [Tags] Test_Correct_Reservation_ID |
Gunnar Mills | 56b3289 | 2016-11-14 13:56:17 -0600 | [diff] [blame] | 34 | |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 35 | Run IPMI command 0x0a 0x42 |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 36 | ${rev_id_2}= Run IPMI Command Returned 0x0a 0x42 |
| 37 | ${rev_id_ls}= Get Substring ${rev_id_2} 1 3 |
| 38 | ${rev_id_ms}= Get Substring ${rev_id_2} -2 |
| 39 | ${output}= Check IPMI Oempartialadd Accept 0x32 0xf0 0x${rev_id_ls} 0x${rev_id_ms} 0 0 0 0 0 1 2 3 4 5 6 7 8 9 0xa 0xb 0xc 0xd 0xe 0xf |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 40 | Should Be Empty ${output} |
| 41 | |
| 42 | Clear Test File |
| 43 | [Documentation] Clear /tmp/esel |
Gunnar Mills | 56b3289 | 2016-11-14 13:56:17 -0600 | [diff] [blame] | 44 | |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 45 | Execute Command rm /tmp/esel |
| 46 | Execute Command sync |
| 47 | |
| 48 | *** Keywords *** |
| 49 | |
| 50 | Run IPMI Command Returned |
Gunnar Mills | 3803280 | 2016-12-12 13:43:40 -0600 | [diff] [blame] | 51 | [Arguments] ${args} |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 52 | ${output_1}= Execute Command /tmp/ipmitool -I dbus raw ${args} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 53 | [return] ${output_1} |
| 54 | |
| 55 | Check IPMI Oempartialadd Reject |
Gunnar Mills | 3803280 | 2016-12-12 13:43:40 -0600 | [diff] [blame] | 56 | [Arguments] ${args} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 57 | ${stdout} ${stderr} ${output_2}= Execute Command /tmp/ipmitool -I dbus raw ${args} return_stdout=True return_stderr= True return_rc=True |
| 58 | [return] ${stderr} |
| 59 | |
| 60 | Check IPMI Oempartialadd Accept |
Gunnar Mills | 3803280 | 2016-12-12 13:43:40 -0600 | [diff] [blame] | 61 | [Arguments] ${args} |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 62 | ${stdout} ${stderr} ${output_3}= Execute Command /tmp/ipmitool -I dbus raw ${args} return_stdout=True return_stderr= True return_rc=True |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 63 | Should Be Equal ${output_3} ${0} msg=${stderr} |
| 64 | [return] ${stderr} |
| 65 | |