Steven Sombar | 43d6ba3 | 2018-02-16 11:25:09 -0600 | [diff] [blame] | 1 | *** Settings *** |
| 2 | |
Steven Sombar | 47ac2f4 | 2019-04-17 21:13:43 -0500 | [diff] [blame] | 3 | Documentation Operational check of fans with OS booted. |
Steven Sombar | 43d6ba3 | 2018-02-16 11:25:09 -0600 | [diff] [blame] | 4 | |
| 5 | # Test Parameters: |
| 6 | # OPENBMC_HOST The BMC host name or IP address. |
| 7 | # OPENBMC_USERNAME The userID to login to the BMC as. |
| 8 | # OPENBMC_PASSWORD The password for OPENBMC_USERNAME. |
Steven Sombar | 43d6ba3 | 2018-02-16 11:25:09 -0600 | [diff] [blame] | 9 | # |
Steven Sombar | 1508aff | 2018-04-06 12:53:42 -0500 | [diff] [blame] | 10 | # Approximate run time: 18 minutes. |
Steven Sombar | 43d6ba3 | 2018-02-16 11:25:09 -0600 | [diff] [blame] | 11 | |
| 12 | Resource ../syslib/utils_os.robot |
| 13 | Resource ../lib/logging_utils.robot |
| 14 | Resource ../lib/utils.robot |
| 15 | Resource ../lib/fan_utils.robot |
Steven Sombar | 1508aff | 2018-04-06 12:53:42 -0500 | [diff] [blame] | 16 | Library ../syslib/utils_keywords.py |
| 17 | Library OperatingSystem |
Steven Sombar | 43d6ba3 | 2018-02-16 11:25:09 -0600 | [diff] [blame] | 18 | |
Steven Sombar | 1508aff | 2018-04-06 12:53:42 -0500 | [diff] [blame] | 19 | Suite Setup Suite Setup Execution |
| 20 | Test Teardown Test Teardown Execution |
Steven Sombar | 43d6ba3 | 2018-02-16 11:25:09 -0600 | [diff] [blame] | 21 | |
| 22 | |
Steven Sombar | 43d6ba3 | 2018-02-16 11:25:09 -0600 | [diff] [blame] | 23 | *** Test Cases *** |
| 24 | |
Steven Sombar | 47ac2f4 | 2019-04-17 21:13:43 -0500 | [diff] [blame] | 25 | |
Steven Sombar | 43d6ba3 | 2018-02-16 11:25:09 -0600 | [diff] [blame] | 26 | Check Number Of Fans With Power On |
| 27 | [Documentation] Verify system has the minimum number of fans. |
| 28 | [Tags] Check_Number_Of_Fans_With_Power_On |
| 29 | |
Steven Sombar | 43d6ba3 | 2018-02-16 11:25:09 -0600 | [diff] [blame] | 30 | # Determine if system is water cooled. |
Steven Sombar | 47ac2f4 | 2019-04-17 21:13:43 -0500 | [diff] [blame] | 31 | ${water_cooled}= Is Water Cooled |
| 32 | Rprint Vars water_cooled |
Steven Sombar | 43d6ba3 | 2018-02-16 11:25:09 -0600 | [diff] [blame] | 33 | |
| 34 | Verify Minimum Number Of Fans With Cooling Type ${number_of_fans} |
Steven Sombar | 47ac2f4 | 2019-04-17 21:13:43 -0500 | [diff] [blame] | 35 | ... ${water_cooled} |
Steven Sombar | 43d6ba3 | 2018-02-16 11:25:09 -0600 | [diff] [blame] | 36 | |
| 37 | |
| 38 | Check Number Of Fan Monitors With Power On |
| 39 | [Documentation] Verify monitors are present when power on. |
| 40 | [Tags] Check_Number_Of_Fan_Monitors_With_Power_On |
| 41 | |
| 42 | Verify Fan Monitors With State On |
| 43 | |
| 44 | |
Steven Sombar | 47ac2f4 | 2019-04-17 21:13:43 -0500 | [diff] [blame] | 45 | Check Fans Running At Target Speed |
Steven Sombar | 1508aff | 2018-04-06 12:53:42 -0500 | [diff] [blame] | 46 | [Documentation] Verify fans are running at or near target speed. |
Steven Sombar | 47ac2f4 | 2019-04-17 21:13:43 -0500 | [diff] [blame] | 47 | [Tags] Check_Fans_Running_At_Target_Speed |
Steven Sombar | 1508aff | 2018-04-06 12:53:42 -0500 | [diff] [blame] | 48 | |
| 49 | # Set the speed tolerance criteria. |
| 50 | # A tolerance value of .15 means that the fan's speed should be |
| 51 | # within 15% of its set target speed. Fans may be accelerating |
| 52 | # or decelerating to meet a new target, so allow .10 extra. |
| 53 | ${tolerance}= Set Variable .25 |
| 54 | Rpvars tolerance |
| 55 | |
Steven Sombar | 47ac2f4 | 2019-04-17 21:13:43 -0500 | [diff] [blame] | 56 | Verify Fan Speed ${tolerance} ${fan_names} |
Steven Sombar | 1508aff | 2018-04-06 12:53:42 -0500 | [diff] [blame] | 57 | |
| 58 | |
| 59 | Check Fan Manual Control |
| 60 | [Documentation] Check direct control of fans. |
| 61 | [Tags] Check_Fan_Manual_Control |
| 62 | |
Steven Sombar | 47ac2f4 | 2019-04-17 21:13:43 -0500 | [diff] [blame] | 63 | # The maximum target speed. |
Steven Sombar | 1508aff | 2018-04-06 12:53:42 -0500 | [diff] [blame] | 64 | ${max_fan_target_setting}= Set Variable ${10500} |
| 65 | |
| 66 | # Speed criteria for passing, which is 85% of max_fan_target_setting. |
| 67 | ${min_speed}= Set Variable ${8925} |
| 68 | |
Steven Sombar | 47ac2f4 | 2019-04-17 21:13:43 -0500 | [diff] [blame] | 69 | # Time allowed for the fan daemon to take control and then return |
| 70 | # the fans to normal speed. |
Steven Sombar | 1508aff | 2018-04-06 12:53:42 -0500 | [diff] [blame] | 71 | ${minutes_to_stabilize}= Set Variable 4 |
| 72 | |
Steven Sombar | 47ac2f4 | 2019-04-17 21:13:43 -0500 | [diff] [blame] | 73 | Verify Direct Fan Control |
| 74 | ... ${max_fan_target_setting} ${min_speed} ${minutes_to_stabilize} |
| 75 | ... ${number_of_fans} ${fan_names} |
Steven Sombar | 1508aff | 2018-04-06 12:53:42 -0500 | [diff] [blame] | 76 | |
| 77 | |
Steven Sombar | 47ac2f4 | 2019-04-17 21:13:43 -0500 | [diff] [blame] | 78 | Check Fan Speed Increase When One Disabled |
Steven Sombar | 1508aff | 2018-04-06 12:53:42 -0500 | [diff] [blame] | 79 | [Documentation] Verify that the speed of working fans increase when |
| 80 | ... one fan is disabled. |
Steven Sombar | 47ac2f4 | 2019-04-17 21:13:43 -0500 | [diff] [blame] | 81 | [Tags] Check_Fan_Speed_Increase_When_One_Disabled |
Steven Sombar | 43d6ba3 | 2018-02-16 11:25:09 -0600 | [diff] [blame] | 82 | # A non-functional fan should cause an error log and |
| 83 | # an enclosure LED will light. The other fans should speed up. |
| 84 | |
Steven Sombar | 47ac2f4 | 2019-04-17 21:13:43 -0500 | [diff] [blame] | 85 | Verify Fan Speed Increase ${fan_names} |
Steven Sombar | 43d6ba3 | 2018-02-16 11:25:09 -0600 | [diff] [blame] | 86 | |
Steven Sombar | 43d6ba3 | 2018-02-16 11:25:09 -0600 | [diff] [blame] | 87 | |
Steven Sombar | 47ac2f4 | 2019-04-17 21:13:43 -0500 | [diff] [blame] | 88 | Check System Shutdown Due To Fans |
Steven Sombar | 43d6ba3 | 2018-02-16 11:25:09 -0600 | [diff] [blame] | 89 | [Documentation] Shut down when not enough fans. |
Steven Sombar | 47ac2f4 | 2019-04-17 21:13:43 -0500 | [diff] [blame] | 90 | [Tags] Check_System_Shutdown_Due_To_Fans |
Steven Sombar | 43d6ba3 | 2018-02-16 11:25:09 -0600 | [diff] [blame] | 91 | |
Steven Sombar | 47ac2f4 | 2019-04-17 21:13:43 -0500 | [diff] [blame] | 92 | Verify System Shutdown Due To Fans ${fan_names} |
Steven Sombar | 43d6ba3 | 2018-02-16 11:25:09 -0600 | [diff] [blame] | 93 | |
| 94 | |
| 95 | *** Keywords *** |
| 96 | |
Steven Sombar | 43d6ba3 | 2018-02-16 11:25:09 -0600 | [diff] [blame] | 97 | |
| 98 | Suite Setup Execution |
| 99 | [Documentation] Do the pre-test setup. |
| 100 | |
| 101 | REST Power On stack_mode=skip |
Steven Sombar | 1508aff | 2018-04-06 12:53:42 -0500 | [diff] [blame] | 102 | |
Steven Sombar | 47ac2f4 | 2019-04-17 21:13:43 -0500 | [diff] [blame] | 103 | ${number_of_fans} ${fan_names}= Get Fan Count And Names |
| 104 | Printn |
| 105 | Rprint Vars number_of_fans fan_names |
Steven Sombar | 1508aff | 2018-04-06 12:53:42 -0500 | [diff] [blame] | 106 | Set Suite Variable ${fan_names} children=true |
Steven Sombar | 1508aff | 2018-04-06 12:53:42 -0500 | [diff] [blame] | 107 | Set Suite Variable ${number_of_fans} children=true |
| 108 | |
Steven Sombar | 47ac2f4 | 2019-04-17 21:13:43 -0500 | [diff] [blame] | 109 | Reset Fans ${fan_names} |
Steven Sombar | 1508aff | 2018-04-06 12:53:42 -0500 | [diff] [blame] | 110 | Run Key U Sleep \ 15s |
George Keishing | 32fe4e1 | 2018-07-13 05:06:47 -0500 | [diff] [blame] | 111 | Delete All Error Logs |
Steven Sombar | 43d6ba3 | 2018-02-16 11:25:09 -0600 | [diff] [blame] | 112 | Set System LED State front_fault Off |
| 113 | Set System LED State rear_fault Off |
| 114 | |
| 115 | |
| 116 | Test Teardown Execution |
| 117 | [Documentation] Do the post-test teardown. |
| 118 | |
| 119 | FFDC On Test Case Fail |
Steven Sombar | 47ac2f4 | 2019-04-17 21:13:43 -0500 | [diff] [blame] | 120 | Reset Fans ${fan_names} |
Steven Sombar | 1508aff | 2018-04-06 12:53:42 -0500 | [diff] [blame] | 121 | Run Key U Sleep \ 15s |
George Keishing | 32fe4e1 | 2018-07-13 05:06:47 -0500 | [diff] [blame] | 122 | Delete All Error Logs |
Steven Sombar | 43d6ba3 | 2018-02-16 11:25:09 -0600 | [diff] [blame] | 123 | Set System LED State front_fault Off |
| 124 | Set System LED State rear_fault Off |