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