1*** Settings *** 2Documentation Module to test network stability. 3... By default running HTX mdt.bu profile for stress test. 4 5Resource ../lib/os_utilities.robot 6Library ../lib/os_utils_keywords.py 7 8Test Setup Test Setup Execution 9Test Teardown Test Teardown Execution 10 11Test Tags Network_Stability 12 13*** Variables **** 14 15${stack_mode} skip 16 17*** Test Cases *** 18 19Network Stability Test 20 [Documentation] Execute network stress in loop. 21 [Tags] Network_Stability_Test 22 23 # Run the network stress test HTX_LOOP times in loop. 24 Repeat Keyword ${HTX_LOOP} times Execute Network Test 25 26 27*** Keywords *** 28 29Execute Network Test 30 [Documentation] Execute network stress test. 31 # Test Flow: 32 # - Power on 33 # - Establish SSH connection session 34 # - Create HTX mdt profile 35 # - Run HTX exerciser 36 # - Inject network activity on BMC 37 # - Check HTX status for errors 38 # - Shutdown HTX if no error when timer expires 39 40 REST Power On stack_mode=skip 41 42 # Post Power off and on, the OS SSH session needs to be established. 43 Login To OS 44 45 IF '${HTX_MDT_PROFILE}' == 'mdt.bu' Create Default MDT Profile 46 47 Run MDT Profile 48 49 # HTX is running, inject network traffic and check every HTX_INTERVAL 50 ${status}= Run Until Keyword Fails ${HTX_DURATION} ${HTX_INTERVAL} 51 ... Start Network Test 52 53 IF '${status}' == 'False' 54 Fail Network is unstable. Please check for errors. 55 END 56 57 Shutdown HTX Exerciser 58 59 Print Timen HTX Test ran for: ${HTX_DURATION} 60 61 62Start Network Test 63 [Documentation] Start network stress test. 64 BMC Network Payload 65 Check HTX Run Status 66 67 68BMC Network Payload 69 [Documentation] Start creating network activity over BMC network. 70 71 # REST GET enumerate call. 72 OpenBMC Get Request 73 ... /xyz/openbmc_project/inventory/enumerate timeout=${20} quiet=${1} 74 75 # Upload 32 MB data via REST to BMC. 76 REST Upload File To BMC 77 78 79Test Setup Execution 80 [Documentation] Do the initial test setup. 81 82 REST Power On stack_mode=skip 83 Delete All Error Logs 84 Tool Exist htxcmdline 85 86 # Shutdown if HTX is running. 87 ${status}= Is HTX Running 88 IF '${status}' == 'True' Shutdown HTX Exerciser 89 90 91Test Teardown Execution 92 [Documentation] Do the post test teardown. 93 # 1. Shut down HTX exerciser if test Failed. 94 # 2. Capture FFDC on test failure. 95 # 3. Close all open SSH connections. 96 97 # Keep HTX running if user set HTX_KEEP_RUNNING to 1. 98 IF '${TEST_STATUS}' == 'FAIL' and ${HTX_KEEP_RUNNING} == ${0} 99 Shutdown HTX Exerciser 100 END 101 102 FFDC On Test Case Fail 103 Close All Connections 104