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