blob: 803a78ed77f199824a89721c37ffd4a99d9fc835 [file] [log] [blame]
Chris Austenb29d2e82016-06-07 12:25:35 -05001*** Settings ***
2
3Documentation This suite is for testing esel's mechanism of checking Reservation_ID.
4
George Keishingd55a4be2016-08-26 03:28:17 -05005Resource ../lib/ipmi_client.robot
6Resource ../lib/openbmc_ffdc.robot
Chris Austenb29d2e82016-06-07 12:25:35 -05007
8Suite Setup Open Connection And Log In
9Suite Teardown Close All Connections
George Keishingd55a4be2016-08-26 03:28:17 -050010Test Teardown Log FFDC
Chris Austenb29d2e82016-06-07 12:25:35 -050011
12*** Test Cases ***
13
14Test Wrong Reservation_ID
George Keishingcac24c72016-09-23 04:44:19 -050015 [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
Chris Austenb29d2e82016-06-07 12:25:35 -050020
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
24 Run IPMI command 0x0a 0x42
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
26 Should Contain ${output} Reservation cancelled
27
28Test Correct Reservation_ID
George Keishingcac24c72016-09-23 04:44:19 -050029 [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
Chris Austenb29d2e82016-06-07 12:25:35 -050034
35 Run IPMI command 0x0a 0x42
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
40 Should Be Empty ${output}
41
42Clear Test File
43 [Documentation] Clear /tmp/esel
44
45 Execute Command rm /tmp/esel
46 Execute Command sync
47
48*** Keywords ***
49
50Run IPMI Command Returned
51 [arguments] ${args}
52 ${output_1} = Execute Command /tmp/ipmitool -I dbus raw ${args}
53 [return] ${output_1}
54
55Check IPMI Oempartialadd Reject
56 [arguments] ${args}
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
60Check IPMI Oempartialadd Accept
61 [arguments] ${args}
62 ${stdout} ${stderr} ${output_3} = Execute Command /tmp/ipmitool -I dbus raw ${args} return_stdout=True return_stderr= True return_rc=True
63 Should Be Equal ${output_3} ${0} msg=${stderr}
64 [return] ${stderr}
65