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