1*** 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 .30 means that the fan's speed should be 49 # within 30% of its set target speed. Fans may be accelerating 50 # or decelerating to meet a new target, so allow .20 extra. 51 ${tolerance}= Set Variable .50 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 # Previous test may have shut down the OS. 91 Redfish Power On stack_mode=skip 92 93 Verify System Shutdown Due To Fans ${fan_names} 94 95 96*** Keywords *** 97 98Reset Fans And Error Logs 99 [Documentation] Reset Fans, Error Logs, and LEDs 100 101 Reset Fans ${fan_names} 102 Run Key U Sleep \ 15s 103 Delete All Error Logs 104 Redfish Delete All BMC Dumps 105 Set System LED State front_fault Off 106 Set System LED State rear_fault Off 107 108 109Suite Setup Execution 110 [Documentation] Do the pre-suite setup. 111 112 Redfish Power On stack_mode=skip 113 114 ${number_of_fans} ${fan_names}= Get Fan Count And Names 115 Printn 116 Rprint Vars number_of_fans fan_names 117 Set Suite Variable ${fan_names} children=true 118 Set Suite Variable ${number_of_fans} children=true 119 120 Reset Fans And Error Logs 121 122 123Test Teardown Execution 124 [Documentation] Do the post-test teardown. 125 126 FFDC On Test Case Fail 127 Reset Fans And Error Logs 128