blob: f1e6b6c035ba54055b662457fab59ff8896eaee1 [file] [log] [blame]
George Keishingc35e71c2017-05-10 12:23:37 -05001*** Settings ***
2Documentation Module to test network stability.
3... By default running HTX mdt.bu profile for stress test.
4
5Resource ../syslib/utils_os.robot
6Library ../syslib/utils_keywords.py
7
George Keishingdc1691d2017-12-07 12:17:46 -06008Test Setup Test Setup Execution
9Test Teardown Test Teardown Execution
George Keishingc35e71c2017-05-10 12:23:37 -050010
George Keishing87dc4422023-10-20 12:56:30 +053011Force Tags Network_Stability
12
George Keishingc35e71c2017-05-10 12:23:37 -050013*** Variables ****
14
15${stack_mode} skip
16
George Keishingc35e71c2017-05-10 12:23:37 -050017*** 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
Steven Sombar0278b132018-01-09 14:41:32 -060040 REST Power On stack_mode=skip
George Keishingc35e71c2017-05-10 12:23:37 -050041
42 # Post Power off and on, the OS SSH session needs to be established.
43 Login To OS
44
George Keishingbbfec9e2017-05-17 10:47:21 -050045 Run Keyword If '${HTX_MDT_PROFILE}' == 'mdt.bu'
46 ... Create Default MDT Profile
George Keishingc35e71c2017-05-10 12:23:37 -050047
George Keishingbbfec9e2017-05-17 10:47:21 -050048 Run MDT Profile
George Keishingc35e71c2017-05-10 12:23:37 -050049
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 Keishingd62e6c12017-05-29 01:49:53 -050054 Run Keyword If '${status}' == 'False'
George Keishingc35e71c2017-05-10 12:23:37 -050055 ... Fail Network is unstable. Please check for errors.
56
57 Shutdown HTX Exerciser
58
Michael Walshc108e422019-03-28 12:27:18 -050059 Print Timen HTX Test ran for: ${HTX_DURATION}
George Keishingc35e71c2017-05-10 12:23:37 -050060
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.
Steven Sombarf39541e2017-10-25 09:50:35 -050072 OpenBMC Get Request
73 ... /xyz/openbmc_project/inventory/enumerate timeout=${20} quiet=${1}
George Keishingc35e71c2017-05-10 12:23:37 -050074
75 # Upload 32 MB data via REST to BMC.
76 REST Upload File To BMC
77
78
Steven Sombar0278b132018-01-09 14:41:32 -060079Test 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 Sombar3ecb6892018-03-23 11:41:08 -050087 ${status}= Is HTX Running
Steven Sombar0278b132018-01-09 14:41:32 -060088 Run Keyword If '${status}' == 'True'
89 ... Shutdown HTX Exerciser
90
91
George Keishingdc1691d2017-12-07 12:17:46 -060092Test Teardown Execution
George Keishingc35e71c2017-05-10 12:23:37 -050093 [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 Keishingbbfec9e2017-05-17 10:47:21 -050098 # Keep HTX running if user set HTX_KEEP_RUNNING to 1.
99 Run Keyword If '${TEST_STATUS}' == 'FAIL' and ${HTX_KEEP_RUNNING} == ${0}
George Keishingc35e71c2017-05-10 12:23:37 -0500100 ... Shutdown HTX Exerciser
101
102 FFDC On Test Case Fail
103 Close All Connections