blob: fe5246b1f779510173e0bed5e6b8ec9f723eebdb [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.
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 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 Sombar47ac2f42019-04-17 21:13:43 -050092 Verify System Shutdown Due To Fans ${fan_names}
Steven Sombar43d6ba32018-02-16 11:25:09 -060093
94
95*** Keywords ***
96
Steven Sombar43d6ba32018-02-16 11:25:09 -060097
98Suite Setup Execution
99 [Documentation] Do the pre-test setup.
100
101 REST Power On stack_mode=skip
Steven Sombar1508aff2018-04-06 12:53:42 -0500102
Steven Sombar47ac2f42019-04-17 21:13:43 -0500103 ${number_of_fans} ${fan_names}= Get Fan Count And Names
104 Printn
105 Rprint Vars number_of_fans fan_names
Steven Sombar1508aff2018-04-06 12:53:42 -0500106 Set Suite Variable ${fan_names} children=true
Steven Sombar1508aff2018-04-06 12:53:42 -0500107 Set Suite Variable ${number_of_fans} children=true
108
Steven Sombar47ac2f42019-04-17 21:13:43 -0500109 Reset Fans ${fan_names}
Steven Sombar1508aff2018-04-06 12:53:42 -0500110 Run Key U Sleep \ 15s
George Keishing32fe4e12018-07-13 05:06:47 -0500111 Delete All Error Logs
Steven Sombar43d6ba32018-02-16 11:25:09 -0600112 Set System LED State front_fault Off
113 Set System LED State rear_fault Off
114
115
116Test Teardown Execution
117 [Documentation] Do the post-test teardown.
118
119 FFDC On Test Case Fail
Steven Sombar47ac2f42019-04-17 21:13:43 -0500120 Reset Fans ${fan_names}
Steven Sombar1508aff2018-04-06 12:53:42 -0500121 Run Key U Sleep \ 15s
George Keishing32fe4e12018-07-13 05:06:47 -0500122 Delete All Error Logs
Steven Sombar43d6ba32018-02-16 11:25:09 -0600123 Set System LED State front_fault Off
124 Set System LED State rear_fault Off