blob: efd081c4b7ea611422c943322bb230cdc3cd23dd [file] [log] [blame]
Steven Sombar43d6ba32018-02-16 11:25:09 -06001*** Settings ***
2
Steven Sombar47ac2f42019-04-17 21:13:43 -05003Documentation Operational check of fans with OS booted.
Steven Sombar43d6ba32018-02-16 11:25:09 -06004
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 Sombar43d6ba32018-02-16 11:25:09 -06009#
Steven Sombar1508aff2018-04-06 12:53:42 -050010# Approximate run time: 18 minutes.
Steven Sombar43d6ba32018-02-16 11:25:09 -060011
12Resource ../syslib/utils_os.robot
13Resource ../lib/logging_utils.robot
14Resource ../lib/utils.robot
15Resource ../lib/fan_utils.robot
Steven Sombar1508aff2018-04-06 12:53:42 -050016Library ../syslib/utils_keywords.py
17Library OperatingSystem
Steven Sombar43d6ba32018-02-16 11:25:09 -060018
Steven Sombar1508aff2018-04-06 12:53:42 -050019Suite Setup Suite Setup Execution
20Test Teardown Test Teardown Execution
Steven Sombar43d6ba32018-02-16 11:25:09 -060021
22
Steven Sombar43d6ba32018-02-16 11:25:09 -060023*** Test Cases ***
24
Steven Sombar47ac2f42019-04-17 21:13:43 -050025
Steven Sombar43d6ba32018-02-16 11:25:09 -060026Check 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 Sombar43d6ba32018-02-16 11:25:09 -060030 # Determine if system is water cooled.
Steven Sombar47ac2f42019-04-17 21:13:43 -050031 ${water_cooled}= Is Water Cooled
32 Rprint Vars water_cooled
Steven Sombar43d6ba32018-02-16 11:25:09 -060033
34 Verify Minimum Number Of Fans With Cooling Type ${number_of_fans}
Steven Sombar47ac2f42019-04-17 21:13:43 -050035 ... ${water_cooled}
Steven Sombar43d6ba32018-02-16 11:25:09 -060036
37
38Check 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 Sombar47ac2f42019-04-17 21:13:43 -050045Check Fans Running At Target Speed
Steven Sombar1508aff2018-04-06 12:53:42 -050046 [Documentation] Verify fans are running at or near target speed.
Steven Sombar47ac2f42019-04-17 21:13:43 -050047 [Tags] Check_Fans_Running_At_Target_Speed
Steven Sombar1508aff2018-04-06 12:53:42 -050048
49 # Set the speed tolerance criteria.
Steven Sombar4cb50e62019-05-29 14:07:44 -050050 # A tolerance value of .30 means that the fan's speed should be
51 # within 30% of its set target speed. Fans may be accelerating
52 # or decelerating to meet a new target, so allow .20 extra.
53 ${tolerance}= Set Variable .50
Steven Sombar1508aff2018-04-06 12:53:42 -050054 Rpvars tolerance
55
Steven Sombar47ac2f42019-04-17 21:13:43 -050056 Verify Fan Speed ${tolerance} ${fan_names}
Steven Sombar1508aff2018-04-06 12:53:42 -050057
58
59Check Fan Manual Control
60 [Documentation] Check direct control of fans.
61 [Tags] Check_Fan_Manual_Control
62
Steven Sombar47ac2f42019-04-17 21:13:43 -050063 # The maximum target speed.
Steven Sombar1508aff2018-04-06 12:53:42 -050064 ${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 Sombar47ac2f42019-04-17 21:13:43 -050069 # Time allowed for the fan daemon to take control and then return
70 # the fans to normal speed.
Steven Sombar1508aff2018-04-06 12:53:42 -050071 ${minutes_to_stabilize}= Set Variable 4
72
Steven Sombar47ac2f42019-04-17 21:13:43 -050073 Verify Direct Fan Control
74 ... ${max_fan_target_setting} ${min_speed} ${minutes_to_stabilize}
75 ... ${number_of_fans} ${fan_names}
Steven Sombar1508aff2018-04-06 12:53:42 -050076
77
Steven Sombar47ac2f42019-04-17 21:13:43 -050078Check Fan Speed Increase When One Disabled
Steven Sombar1508aff2018-04-06 12:53:42 -050079 [Documentation] Verify that the speed of working fans increase when
80 ... one fan is disabled.
Steven Sombar47ac2f42019-04-17 21:13:43 -050081 [Tags] Check_Fan_Speed_Increase_When_One_Disabled
Steven Sombar43d6ba32018-02-16 11:25:09 -060082 # A non-functional fan should cause an error log and
83 # an enclosure LED will light. The other fans should speed up.
84
Steven Sombar47ac2f42019-04-17 21:13:43 -050085 Verify Fan Speed Increase ${fan_names}
Steven Sombar43d6ba32018-02-16 11:25:09 -060086
Steven Sombar43d6ba32018-02-16 11:25:09 -060087
Steven Sombar47ac2f42019-04-17 21:13:43 -050088Check System Shutdown Due To Fans
Steven Sombar43d6ba32018-02-16 11:25:09 -060089 [Documentation] Shut down when not enough fans.
Steven Sombar47ac2f42019-04-17 21:13:43 -050090 [Tags] Check_System_Shutdown_Due_To_Fans
Steven Sombar43d6ba32018-02-16 11:25:09 -060091
Steven Sombar4cb50e62019-05-29 14:07:44 -050092 # Previous test may have shut down the OS.
93 REST Power On stack_mode=skip
94
Steven Sombar47ac2f42019-04-17 21:13:43 -050095 Verify System Shutdown Due To Fans ${fan_names}
Steven Sombar43d6ba32018-02-16 11:25:09 -060096
97
98*** Keywords ***
99
Steven Sombar43d6ba32018-02-16 11:25:09 -0600100
101Suite Setup Execution
102 [Documentation] Do the pre-test setup.
103
104 REST Power On stack_mode=skip
Steven Sombar1508aff2018-04-06 12:53:42 -0500105
Steven Sombar47ac2f42019-04-17 21:13:43 -0500106 ${number_of_fans} ${fan_names}= Get Fan Count And Names
107 Printn
108 Rprint Vars number_of_fans fan_names
Steven Sombar1508aff2018-04-06 12:53:42 -0500109 Set Suite Variable ${fan_names} children=true
Steven Sombar1508aff2018-04-06 12:53:42 -0500110 Set Suite Variable ${number_of_fans} children=true
111
Steven Sombar47ac2f42019-04-17 21:13:43 -0500112 Reset Fans ${fan_names}
Steven Sombar1508aff2018-04-06 12:53:42 -0500113 Run Key U Sleep \ 15s
George Keishing32fe4e12018-07-13 05:06:47 -0500114 Delete All Error Logs
Steven Sombar43d6ba32018-02-16 11:25:09 -0600115 Set System LED State front_fault Off
116 Set System LED State rear_fault Off
117
118
119Test Teardown Execution
120 [Documentation] Do the post-test teardown.
121
122 FFDC On Test Case Fail
Steven Sombar47ac2f42019-04-17 21:13:43 -0500123 Reset Fans ${fan_names}
Steven Sombar1508aff2018-04-06 12:53:42 -0500124 Run Key U Sleep \ 15s
George Keishing32fe4e12018-07-13 05:06:47 -0500125 Delete All Error Logs
Steven Sombar43d6ba32018-02-16 11:25:09 -0600126 Set System LED State front_fault Off
127 Set System LED State rear_fault Off