| 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 | 
| George Keishing | d55a4be | 2016-08-26 03:28:17 -0500 | [diff] [blame] | 10 | Test Teardown          Log FFDC | 
| Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 11 |  | 
 | 12 | *** Test Cases *** | 
 | 13 |  | 
 | 14 | Test 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 |  | 
 | 27 | Test 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 |  | 
 | 40 | Clear Test File | 
 | 41 |    [Documentation]   Clear /tmp/esel | 
 | 42 |     | 
 | 43 |    Execute Command   rm /tmp/esel | 
 | 44 |    Execute Command   sync | 
 | 45 |  | 
 | 46 | *** Keywords *** | 
 | 47 |  | 
 | 48 | Run IPMI Command Returned | 
 | 49 |     [arguments]    ${args} | 
 | 50 |     ${output_1} =    Execute Command    /tmp/ipmitool -I dbus raw ${args} | 
 | 51 |     [return]    ${output_1} | 
 | 52 |  | 
 | 53 | Check 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 |  | 
 | 58 | Check 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 |  |