From f43f7ecb698770c17970ed46a1e20eda3470a9e5 Mon Sep 17 00:00:00 2001 From: Ben Greear Date: Wed, 2 Feb 2022 06:15:54 -0800 Subject: [PATCH] lf_sniff_radio: Add notes for improvement. --- py-scripts/lf_sniff_radio.py | 6 ++++++ py-scripts/regression_test.sh | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/py-scripts/lf_sniff_radio.py b/py-scripts/lf_sniff_radio.py index 34282124..1473e31d 100755 --- a/py-scripts/lf_sniff_radio.py +++ b/py-scripts/lf_sniff_radio.py @@ -56,6 +56,7 @@ class SniffRadio(Realm): self.radio = radio def setup(self, ht40_value, ht80_value, ht160_value): + # TODO: Store original channel settings so that radio can be set back to original values. self.monitor.set_flag(param_name="disable_ht40", value=ht40_value) self.monitor.set_flag(param_name="disable_ht80", value=ht80_value) self.monitor.set_flag(param_name="ht160_enable", value=ht160_value) @@ -63,6 +64,7 @@ class SniffRadio(Realm): def start(self): self.monitor.admin_up() + # TODO: Use LFUtils.wait_until_ports_admin_up instead of sleep, check return code. time.sleep(5) self.monitor.start_sniff(capname=self.outfile, duration_sec=self.duration) for i in range(0, self.duration): @@ -73,6 +75,8 @@ class SniffRadio(Realm): time.sleep(2) def cleanup(self): + # TODO: Add error checking to make sure monitor port really went away. + # TODO: Set radio back to original channel self.monitor.cleanup() @@ -117,10 +121,12 @@ def main(): radio_mode=args.radio_mode ) obj.setup(int(args.disable_ht40), int(args.disable_ht80), int(args.ht160_enable)) + # TODO: Add wait-for logic instead of a sleep time.sleep(5) obj.start() obj.cleanup() + # TODO: Check if passed or not. if __name__ == '__main__': main() diff --git a/py-scripts/regression_test.sh b/py-scripts/regression_test.sh index e6a8dd83..ad7d6417 100755 --- a/py-scripts/regression_test.sh +++ b/py-scripts/regression_test.sh @@ -246,6 +246,10 @@ function create_dut_and_chamberview() { } function create_station_and_sensitivity { + set -x + # TODO: This uses wrong dut name for generic testbed, probably it fails in other ways too. + # I guess we can at least use it as a negative test hoping to see failure. + # until we can make it work better. ./create_station.py --radio $RADIO_USED --ssid $SSID_USED --passwd $PASSWD_USED --security $SECURITY --debug --mgr $MGR ./lf_rx_sensitivity_test.py --mgr $MGR --port 8080 --lf_user lanforge --lf_password lanforge \ --instance_name rx-sensitivity-instance --config_name test_con --upstream $UPSTREAM \ @@ -264,6 +268,7 @@ function create_station_and_sensitivity { #--influx_token=-u_Wd-L8o992701QF0c5UmqEp7w7Z7YOMaWLxOMgmHfATJGnQbbmYyNxHBR9PgD6taM_tcxqJl6U8DjU1xINFQ== \ #--influx_bucket ben \ #--influx_tag testbed Ferndale-01 + set +x } if [[ ${#SHORT} -gt 0 ]]; then testCommands=(