Commit Graph

3020 Commits

Author SHA1 Message Date
Ben Greear
ec2dd1b4b3 regression-test: Improve lf_dataplane_test
Use DUT that earlier test logic created, allow specifying testbed
name on the cmd line.

Add exit code for dpt, but not sure it is correct since currently
it fails trying to copy the results locally since my GUI is on localhost
and LANforge system is elsewhere.  Added TODO to allow this usage.

Signed-off-by: Ben Greear <greearb@candelatech.com>
2022-07-12 15:45:46 +05:30
Ben Greear
e0ff9f30a4 example-security-connection: Add exit code logic.
And clean up stations on exit if --noclean was not selected.

Signed-off-by: Ben Greear <greearb@candelatech.com>
2022-07-12 15:45:46 +05:30
Chuck SmileyRekiere
9feaf8d683 lf_wifi_capacity_test.py prints to logger
Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
2022-07-12 15:45:46 +05:30
Ben Greear
d7dc9d1a23 vap-profile: Add logging and return code checking.
And remove the logic to create a bridge within the vap profile,
the vap profile does not have enough info to properly create
a bridge (old code used hard-coded port names)

Instead, logic would be to create vap, and then create a bridge
object that holds the VAP using the bridge profile/script.

Signed-off-by: Ben Greear <greearb@candelatech.com>
2022-07-12 15:45:46 +05:30
Ben Greear
80b236ccb4 create-station: Add logger and exit code handling.
And add note for improvement to station_profile logic.

Signed-off-by: Ben Greear <greearb@candelatech.com>
2022-07-12 15:45:46 +05:30
Ben Greear
169203b57b regression: Fix ./test_l3.py line
It was missing a closing quote, so it didn't execute at all.  I've no
idea why it shows success in the html output.
2022-07-12 15:45:46 +05:30
Ben Greear
531cf440af qvlans: Fix creating qvlans
Make it look more like macvlans, including logic to set IP addresses,
and to verify qvlans were created properly.

Signed-off-by: Ben Greear <greearb@candelatech.com>
2022-07-12 15:45:46 +05:30
Ben Greear
6a441884c3 mvlan: Improve pass/fail reporting
And add support for logging API.  Add some TODOs for future work.

Signed-off-by: Ben Greear <greearb@candelatech.com>
2022-07-12 15:45:46 +05:30
Ben Greear
9287aff711 create-macvlan: mac-vlans have nothing to do with radios.
So remove reference to radios from it.

Signed-off-by: Ben Greear <greearb@candelatech.com>
2022-07-12 15:45:46 +05:30
Ben Greear
9bdb1e5140 create_l4: Improve logging and return codes.
Use base class methods for logging setup, check error codes
for port creation and cx creation.

l4 profile gets TODO note, since it does not verify that cx/endp
are actually created or not.
2022-07-12 15:45:46 +05:30
Chuck SmileyRekiere
02d8f29d6a test_ip_variable_time.py changed to use log_level
Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
2022-07-12 15:45:46 +05:30
Ben Greear
3a3b6f5336 create_l3, create_l3_stations: Add logger support
Improve pass/fail reporting, and add TODO for future work.

Signed-off-by: Ben Greear <greearb@candelatech.com>
2022-07-12 15:45:46 +05:30
Ben Greear
f64e7aa11e Improve return code for create_l3, sta_connect_example.
Add TODO for create_l3.py for future work.

Signed-off-by: Ben Greear <greearb@candelatech.com>
2022-07-12 15:45:46 +05:30
Ben Greear
7db4c9a329 create-cv: Improve --line and --ssid parser.
Use shlex to parse the tokens for each --line and --ssid content.
This fixes using ssid with spaces, for instance.
Fix parser to error out if user inputs invalid data.

Add TODO items for future work.

Fix regression script:  DUT must be created before Scenario tries to use it,
and fix typos and other mistakes in how the regression script tried to
create dut and chamberview.  This part has not been tested yet, but it is
at least closer than before.

Signed-off-by: Ben Greear <greearb@candelatech.com>
2022-07-12 15:45:45 +05:30
Chuck SmileyRekiere
1cdfbce0e5 test_ip_variable_time.py print changed to logger
Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
2022-07-12 15:45:45 +05:30
Ben Greear
bc09dd7698 create-cv-dut: Improve parser, exit on bad security type.
Use shlex to parse the --ssid argument, this lets us to passwords
and ssid with space, for instance.

raise ValueError exception if user requests un-supported
encryption type.

Signed-off-by: Ben Greear <greearb@candelatech.com>
2022-07-12 15:45:45 +05:30
Matthew Stidham
e9901bb35e create_bridge: Move noclean to lfclibase
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
2022-07-12 15:45:45 +05:30
Matthew Stidham
ba88468f8c create_bond: Move noclean to lfclibase
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
2022-07-12 15:45:45 +05:30
Scott Wedge
ae4cac5587 lf_ftp.py: text and whitespace updates - autopep8
Signed-off-by: Scott Wedge <scott.wedge@candelatech.com>
2022-07-12 15:45:45 +05:30
Scott Wedge
df85ca92f2 lf_ftp.py: add kpi.csv and resource-2 features
Signed-off-by: Scott Wedge <scott.wedge@candelatech.com>
2022-07-12 15:45:45 +05:30
Ben Greear
1da6d7d2f3 python/cv: Start adding debugging to create_chamberview
Try to figure out why this doesn't work on testbed heather,
at the least, I think DUT is probably wrong in the resgresison
script.  More work is needed to get this working.

Signed-off-by: Ben Greear <greearb@candelatech.com>
2022-07-12 15:45:45 +05:30
Ben Greear
b774389d54 remove create_bond_and_station logic.
It makes no sense at all to pair a station and a bridge.
Remove the combined test in regression script.

Add option to not clean up bridge and bond interfaces.
Improve bridge and bond to handle multiple resources
(hopefully, that part is not tested)

Signed-off-by: Ben Greear <greearb@candelatech.com>
2022-07-12 15:45:45 +05:30
Ben Greear
9a63700d99 create_bond: Inherit from realm, add pass/fail.
Test that bond went admin up.  And that it could be
deleted again.

Change to use logger.

Signed-off-by: Ben Greear <greearb@candelatech.com>
2022-07-12 15:45:45 +05:30
Ben Greear
ad1b0187e7 gen-cx: Add example cmd used to verify changes on machine heather.
Signed-off-by: Ben Greear <greearb@candelatech.com>
2022-07-12 15:45:45 +05:30
Ben Greear
998f25cb95 generic-endp: Fix multitude of errors.
The generic endpoint profile, especially the monitoring code,
was wrong in lots of ways.

Fix this, improve pass/fail and error reporting, and other
improvements for the gen_profile test.

Probably not backwards compat, but I assume due to breakage
no one was using this code anyway.

Signed-off-by: Ben Greear <greearb@candelatech.com>
2022-07-12 15:45:45 +05:30
Ben Greear
c5ddccbdfd generic-cx: code cleanup and return error checking.
Clean up monitor logic in gen_cx profile to remove useless sleeps
and rename a variable that indicated it was msec but which was actually
seconds.

test_generic gets better error checking and also fixes bugs in how it
monitors the connection.  More work yet is needed for making the
monitor do a good pass/fail logic.

Signed-off-by: Ben Greear <greearb@candelatech.com>
2022-07-12 15:45:45 +05:30
Ben Greear
d532d7f8bf logging: Add set_json logic to lf_logger_config
This will be common code, put it in the helper class.

Signed-off-by: Ben Greear <greearb@candelatech.com>
2022-07-12 15:45:45 +05:30
Ben Greear
2f3eb58c41 Add --log_level option to lfcli base class.
Let user specify the level of logging desired.
Test implementaiton in example_security_connection.py

Signed-off-by: Ben Greear <greearb@candelatech.com>
2022-07-12 15:45:45 +05:30
Chuck SmileyRekiere
24e75a8ab3 create_l4.py : changed prints to logger
Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
2022-07-12 15:45:45 +05:30
Ben Greear
793a215e2b Add logging to example_security_connection script.
And add some more error checking with potential to exit
early if requested.

Signed-off-by: Ben Greear <greearb@candelatech.com>
2022-07-12 15:45:45 +05:30
Logan Lipke
b8787de105 lf_webpage.py: Added multi resource compatibility, started logging implementation, still WIP 2022-07-12 15:45:45 +05:30
Matthew Stidham
ff56cdccfb test_l3_unicast_traffic_gen: Fix improper station creation in test_l3_unicast_traffic_gen
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
2022-07-12 15:45:45 +05:30
Matthew Stidham
e824080c24 regression_test: Use eval so that commands with quotes are properly executed
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
2022-07-12 15:45:45 +05:30
Chuck SmileyRekiere
3426f22bcc test_l3.py : pep8 , white space changes
Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
2022-07-12 15:45:45 +05:30
Chuck SmileyRekiere
109d24e505 test_l3.py added exit(0) for pass , exit(1) for fail
Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
2022-07-12 15:45:45 +05:30
Matthew Stidham
f4ecff6bb4 regression-test: Always produce an HTML report
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
2022-07-12 15:45:45 +05:30
Matthew Stidham
56f8c0a820 regression_test: don't quote the command when not in an eval command
add test_l3 to regression_test

Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
2022-07-12 15:45:45 +05:30
Matthew Stidham
ae78aee979 regression_test: Fix scenario.py method call
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
2022-07-12 15:45:45 +05:30
Matthew Stidham
261b491b23 create_l3_stations: remove trailing semicolons and make argumentse explicit
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
2022-07-12 15:45:45 +05:30
Ben Greear
615dd1c9c3 regression-test: check test script return code to detect failure.
Also:  merge stderr/stdout, add more specific help example,
allow configuring report dir, add safety check for missing 'jq'.

Signed-off-by: Ben Greear <greearb@candelatech.com>
2022-07-12 15:45:45 +05:30
Chuck SmileyRekiere
57f8a83020 lf_logger_config_test.py : removed spacing from simple logger format, added filename
lf_logger_config_test.py : updated to show example of using lf_logger_config.json one directy up
lf_logger_config.json , lf_logger_config_example.json : updated with simple format

Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
2022-07-12 15:45:45 +05:30
Ben Greear
d697963cec create-cx: Add return code checking for cx and endp creation.
Check for false value in create_l3_stations and return error code
upon failure.

Add configurable timeout to waiting for cx/endp logic.

Signed-off-by: Ben Greear <greearb@candelatech.com>
2022-07-12 15:45:45 +05:30
Ben Greear
4bb9cb4b82 l3-stations: error checking for station creation.
In station_profile create method, pay attention to result of
wait_until_ports_appear.  If it returns False, we know creation
has failed somehow, so we do not need to do the extra checking
that was in the create() method.

create_l3_stations adds logic to check return code of station
create logic, and exit with error code if it could not
create them as expected.

Signed-off-by: Ben Greear <greearb@candelatech.com>
2022-07-12 15:45:45 +05:30
Chuck SmileyRekiere
d3035aca57 test_l3_longevity.py : changed printed errors to raise ValueError so script
exits on mis configuration

Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
2022-07-12 15:45:45 +05:30
Chuck SmileyRekiere
02dd8e41d5 sandbox/lf_logger_config_example.json : multiple loggers in one module test
sandbox/lf_sublogger_2.py : testing multiple loggers

Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
2022-07-12 15:45:45 +05:30
Chuck SmileyRekiere
1ced503244 lf_logger_config.py : default root logger to info form warning
Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
2022-07-12 15:45:45 +05:30
Matthew Stidham
43e6b7ef09 test_generic: Switch from print statements to logger statements
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
2022-07-12 15:45:45 +05:30
Matthew Stidham
df5879fc77 sta_connect.setup: check_exists should be used as an argument in rm_port, the existing code was probably from before we had the check_exists method
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
2022-07-12 15:45:45 +05:30
Chuck SmileyRekiere
0c9215abb5 lf_logger_config_example.json : sandbox example for using logging config
lf_logger_config_test.py : example program
lf_sublogger.py : included module sample
lf_sublogger_2.py : included an inherited module same.

This code is for becomming familiar with the logging module
2022-07-12 15:45:45 +05:30
Matthew Stidham
b7236d5007 sta_connect2: wait_until_ports_appear needs list of ports
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
2022-07-12 15:45:45 +05:30