blob: cfc01191025c4d535229f8170741ed801a4edbb9 [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
8Test Setup Pre Test Case Execution
9Test Teardown Post Test Case Execution
10
11*** Variables ****
12
13${stack_mode} skip
14
George Keishingc35e71c2017-05-10 12:23:37 -050015*** Test Cases ***
16
17Network 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
27Execute 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
38 Boot To OS
39
40 # Post Power off and on, the OS SSH session needs to be established.
41 Login To OS
42
George Keishingbbfec9e2017-05-17 10:47:21 -050043 Run Keyword If '${HTX_MDT_PROFILE}' == 'mdt.bu'
44 ... Create Default MDT Profile
George Keishingc35e71c2017-05-10 12:23:37 -050045
George Keishingbbfec9e2017-05-17 10:47:21 -050046 Run MDT Profile
George Keishingc35e71c2017-05-10 12:23:37 -050047
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 Keishingd62e6c12017-05-29 01:49:53 -050052 Run Keyword If '${status}' == 'False'
George Keishingc35e71c2017-05-10 12:23:37 -050053 ... 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
60Start Network Test
61 [Documentation] Start network stress test.
62 BMC Network Payload
63 Check HTX Run Status
64
65
66BMC Network Payload
67 [Documentation] Start creating network activity over BMC network.
68
69 # REST GET enumerate call.
70 OpenBMC Get Request /xyz/openbmc_project/enumerate quiet=${1}
71
72 # Upload 32 MB data via REST to BMC.
73 REST Upload File To BMC
74
75
George Keishingc35e71c2017-05-10 12:23:37 -050076Post Test Case Execution
77 [Documentation] Do the post test teardown.
78 # 1. Shut down HTX exerciser if test Failed.
79 # 2. Capture FFDC on test failure.
80 # 3. Close all open SSH connections.
81
George Keishingbbfec9e2017-05-17 10:47:21 -050082 # Keep HTX running if user set HTX_KEEP_RUNNING to 1.
83 Run Keyword If '${TEST_STATUS}' == 'FAIL' and ${HTX_KEEP_RUNNING} == ${0}
George Keishingc35e71c2017-05-10 12:23:37 -050084 ... Shutdown HTX Exerciser
85
86 FFDC On Test Case Fail
87 Close All Connections