blob: 9aa9756f8edc505b8a27894afce4f20f0a8cc896 [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
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
20 ${rev_id_1} = Run IPMI Command Returned 0x0a 0x42
21 ${rev_id_ls} = Get Substring ${rev_id_1} 1 3
22 ${rev_id_ms} = Get Substring ${rev_id_1} -2
23 Run IPMI command 0x0a 0x42
24 ${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
25 Should Contain ${output} Reservation cancelled
26
27Test Correct Reservation_ID
28 [Documentation] This testcase is to test BMC can handle multi-requestor's
29 ... oem partial add command with correct reservation id. It
30 ... simulates sending partial add command with fake content
31 ... and correct Reservation ID. This command will be accepted.
32
33 Run IPMI command 0x0a 0x42
34 ${rev_id_2} = Run IPMI Command Returned 0x0a 0x42
35 ${rev_id_ls} = Get Substring ${rev_id_2} 1 3
36 ${rev_id_ms} = Get Substring ${rev_id_2} -2
37 ${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
38 Should Be Empty ${output}
39
40Clear Test File
41 [Documentation] Clear /tmp/esel
42
43 Execute Command rm /tmp/esel
44 Execute Command sync
45
46*** Keywords ***
47
48Run IPMI Command Returned
49 [arguments] ${args}
50 ${output_1} = Execute Command /tmp/ipmitool -I dbus raw ${args}
51 [return] ${output_1}
52
53Check IPMI Oempartialadd Reject
54 [arguments] ${args}
55 ${stdout} ${stderr} ${output_2}= Execute Command /tmp/ipmitool -I dbus raw ${args} return_stdout=True return_stderr= True return_rc=True
56 [return] ${stderr}
57
58Check IPMI Oempartialadd Accept
59 [arguments] ${args}
60 ${stdout} ${stderr} ${output_3} = Execute Command /tmp/ipmitool -I dbus raw ${args} return_stdout=True return_stderr= True return_rc=True
61 Should Be Equal ${output_3} ${0} msg=${stderr}
62 [return] ${stderr}
63