George Keishing | c35e71c | 2017-05-10 12:23:37 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Documentation Module to test network stability. |
| 3 | ... By default running HTX mdt.bu profile for stress test. |
| 4 | |
| 5 | Resource ../syslib/utils_os.robot |
| 6 | Library ../syslib/utils_keywords.py |
| 7 | |
George Keishing | dc1691d | 2017-12-07 12:17:46 -0600 | [diff] [blame] | 8 | Test Setup Test Setup Execution |
| 9 | Test Teardown Test Teardown Execution |
George Keishing | c35e71c | 2017-05-10 12:23:37 -0500 | [diff] [blame] | 10 | |
George Keishing | 87dc442 | 2023-10-20 12:56:30 +0530 | [diff] [blame] | 11 | Force Tags Network_Stability |
| 12 | |
George Keishing | c35e71c | 2017-05-10 12:23:37 -0500 | [diff] [blame] | 13 | *** Variables **** |
| 14 | |
| 15 | ${stack_mode} skip |
| 16 | |
George Keishing | c35e71c | 2017-05-10 12:23:37 -0500 | [diff] [blame] | 17 | *** Test Cases *** |
| 18 | |
| 19 | Network 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 | |
| 29 | Execute 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 | |
Steven Sombar | 0278b13 | 2018-01-09 14:41:32 -0600 | [diff] [blame] | 40 | REST Power On stack_mode=skip |
George Keishing | c35e71c | 2017-05-10 12:23:37 -0500 | [diff] [blame] | 41 | |
| 42 | # Post Power off and on, the OS SSH session needs to be established. |
| 43 | Login To OS |
| 44 | |
George Keishing | bbfec9e | 2017-05-17 10:47:21 -0500 | [diff] [blame] | 45 | Run Keyword If '${HTX_MDT_PROFILE}' == 'mdt.bu' |
| 46 | ... Create Default MDT Profile |
George Keishing | c35e71c | 2017-05-10 12:23:37 -0500 | [diff] [blame] | 47 | |
George Keishing | bbfec9e | 2017-05-17 10:47:21 -0500 | [diff] [blame] | 48 | Run MDT Profile |
George Keishing | c35e71c | 2017-05-10 12:23:37 -0500 | [diff] [blame] | 49 | |
| 50 | # HTX is running, inject network traffic and check every HTX_INTERVAL |
| 51 | ${status}= Run Until Keyword Fails ${HTX_DURATION} ${HTX_INTERVAL} |
| 52 | ... Start Network Test |
| 53 | |
George Keishing | d62e6c1 | 2017-05-29 01:49:53 -0500 | [diff] [blame] | 54 | Run Keyword If '${status}' == 'False' |
George Keishing | c35e71c | 2017-05-10 12:23:37 -0500 | [diff] [blame] | 55 | ... Fail Network is unstable. Please check for errors. |
| 56 | |
| 57 | Shutdown HTX Exerciser |
| 58 | |
Michael Walsh | c108e42 | 2019-03-28 12:27:18 -0500 | [diff] [blame] | 59 | Print Timen HTX Test ran for: ${HTX_DURATION} |
George Keishing | c35e71c | 2017-05-10 12:23:37 -0500 | [diff] [blame] | 60 | |
| 61 | |
| 62 | Start Network Test |
| 63 | [Documentation] Start network stress test. |
| 64 | BMC Network Payload |
| 65 | Check HTX Run Status |
| 66 | |
| 67 | |
| 68 | BMC Network Payload |
| 69 | [Documentation] Start creating network activity over BMC network. |
| 70 | |
| 71 | # REST GET enumerate call. |
Steven Sombar | f39541e | 2017-10-25 09:50:35 -0500 | [diff] [blame] | 72 | OpenBMC Get Request |
| 73 | ... /xyz/openbmc_project/inventory/enumerate timeout=${20} quiet=${1} |
George Keishing | c35e71c | 2017-05-10 12:23:37 -0500 | [diff] [blame] | 74 | |
| 75 | # Upload 32 MB data via REST to BMC. |
| 76 | REST Upload File To BMC |
| 77 | |
| 78 | |
Steven Sombar | 0278b13 | 2018-01-09 14:41:32 -0600 | [diff] [blame] | 79 | Test 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. |
Steven Sombar | 3ecb689 | 2018-03-23 11:41:08 -0500 | [diff] [blame] | 87 | ${status}= Is HTX Running |
Steven Sombar | 0278b13 | 2018-01-09 14:41:32 -0600 | [diff] [blame] | 88 | Run Keyword If '${status}' == 'True' |
| 89 | ... Shutdown HTX Exerciser |
| 90 | |
| 91 | |
George Keishing | dc1691d | 2017-12-07 12:17:46 -0600 | [diff] [blame] | 92 | Test Teardown Execution |
George Keishing | c35e71c | 2017-05-10 12:23:37 -0500 | [diff] [blame] | 93 | [Documentation] Do the post test teardown. |
| 94 | # 1. Shut down HTX exerciser if test Failed. |
| 95 | # 2. Capture FFDC on test failure. |
| 96 | # 3. Close all open SSH connections. |
| 97 | |
George Keishing | bbfec9e | 2017-05-17 10:47:21 -0500 | [diff] [blame] | 98 | # Keep HTX running if user set HTX_KEEP_RUNNING to 1. |
| 99 | Run Keyword If '${TEST_STATUS}' == 'FAIL' and ${HTX_KEEP_RUNNING} == ${0} |
George Keishing | c35e71c | 2017-05-10 12:23:37 -0500 | [diff] [blame] | 100 | ... Shutdown HTX Exerciser |
| 101 | |
| 102 | FFDC On Test Case Fail |
| 103 | Close All Connections |