readable naming, macOS wifi-msg counting, and cleanup - #373
Merged
goyalsaurabh06 merged 13 commits intoAug 25, 2026
Conversation
…nd change_port_to_ip() Signed-off-by: Narayana-CT <narayana.pinapatruni@candelatech.com>
…carry Signed-off-by: Narayana-CT <narayana.pinapatruni@candelatech.com>
…om_available(), performing_resets() and run() Signed-off-by: Narayana-CT <narayana.pinapatruni@candelatech.com>
…_msgs() and write_reset_csvs() Signed-off-by: Narayana-CT <narayana.pinapatruni@candelatech.com>
…te_coordinate_csv() and create_dict_csv()" Signed-off-by: Narayana-CT <narayana.pinapatruni@candelatech.com>
…ph(), per_client_graph() and generate_overall_graph_table() Signed-off-by: Narayana-CT <narayana.pinapatruni@candelatech.com>
…fo(), generate_report(), add_live_view_images_to_report(), generate_report_for_robo() and get_last_wifi_msg_timestamp() Signed-off-by: Narayana-CT <narayana.pinapatruni@candelatech.com>
Signed-off-by: Narayana-CT <narayana.pinapatruni@candelatech.com>
…atching Signed-off-by: Narayana-CT <narayana.pinapatruni@candelatech.com>
Signed-off-by: Narayana-CT <narayana.pinapatruni@candelatech.com>
Signed-off-by: Narayana-CT <narayana.pinapatruni@candelatech.com>
Signed-off-by: Narayana-CT <narayana.pinapatruni@candelatech.com>
Verified CLI: python3 lf_interop_port_reset_test.py \ --lanforge_ip 192.168.245.117 \ --upstream_port eth2 \ --dut 'Testing_wpa2 AP' \ --ssid Testing_wpa2 --encryp psk2 --passwd lanforge \ --iterations 2 --reset_interval 5 \ --android_releases 13 16 \ --device_list 08301JEC207624,13301JEC205162,R9ZY30RD0KW,user-ThinkPad-T450,Macs-MacBook-Air.local,user-HP-ProBook-445R-G6 \ --test_name pr_manual_robo \ --robot_test --coordinate P1 \ --robot_ip 127.0.0.1:6000 python3 lf_interop_port_reset_test.py \ --lanforge_ip 192.168.245.117 \ --upstream_port eth2 \ --dut 'Testing_wpa2 AP' \ --ssid Testing_wpa2 --encryp psk2 --passwd lanforge \ --iterations 2 --reset_interval 5 \ --android_releases 13 16 \ --device_list 08301JEC207624,13301JEC205162,R9ZY30RD0KW,user-ThinkPad-T450,Macs-MacBook-Air.local,user-HP-ProBook-445R-G6 \ --test_name pr_manual_rot1 \ --robot_test --coordinate P1 \ --robot_ip 127.0.0.1:6000 \ --rotation 0,90,180 python3 lf_interop_port_reset_test.py \ --lanforge_ip 192.168.245.117 \ --upstream_port eth2 \ --dut 'Testing_wpa2 AP' \ --ssid Testing_wpa2 --encryp psk2 --passwd lanforge \ --iterations 2 --reset_interval 5 \ --android_releases 13 16 \ --device_list 08301JEC207624,13301JEC205162,R9ZY30RD0KW,user-ThinkPad-T450,Macs-MacBook-Air.local,user-HP-ProBook-445R-G6 \ --test_name pr_manual_rot2 \ --robot_test --coordinate P1 \ --robot_ip 127.0.0.1:6000 \ --rotation 45,135,225,315 python3 lf_interop_port_reset_test.py \ --lanforge_ip 192.168.245.117 \ --upstream_port eth2 \ --dut 'Testing_wpa2 AP' \ --ssid Testing_wpa2 --encryp psk2 --passwd lanforge \ --iterations 2 --reset_interval 5 \ --android_releases 13 16 \ --device_list 08301JEC207624,13301JEC205162,R9ZY30RD0KW,user-ThinkPad-T450,DesktopLatitude5490,Macs-MacBook-Air.local,user-HP-ProBook-445R-G6 \ --test_name pr_manual_normal Signed-off-by: Narayana-CT <narayana.pinapatruni@candelatech.com>
haricharan-candela
left a comment
Collaborator
There was a problem hiding this comment.
Too many changes have been made to script.
What was the issue we are fixing? Could you add that jira? List out what are the changes we have done to fix that and what other/extra changes we have made to script to fix any other issues.
Thank you for all the work
haricharan-candela
approved these changes
Aug 25, 2026
goyalsaurabh06
approved these changes
Aug 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Behaviour changes
macOS devices reported 0 for every metric. Two separate causes, both fixed.
count_wifi_msg_matches()tokenized messages withtext.split(" "), whichleaves punctuation glued to the token. A macOS line reads
en0: STA is connected to a wireless network., so the port token is"en0:"and never equals the
"en0"taken from the device EID. The port gate runsbefore the filter test, so every macOS message was dropped before any filter was
considered. A new
tokenize_wifi_msg()splits on whitespace and colons andstrips trailing
.,;, and is applied to both the message text and the matchtext — normalising one side alone would break filters that carry their own
punctuation, such as
"association started.".Even with the port matching, macOS had no branch of its own. It fell through to
the linux/mac path, which matches wpa_supplicant text like
<3>CTRL-EVENT-CONNECTEDthat macOS never sends. Across 631 live wifi-msgs fromresource
1.29, macOS sends exactly two shapes and nothing else:CLI argument renames ( old flags removed)
--host--lanforge_ip--port--lanforge_port--mgr_ip--upstream_port--reset--iterations--release--android_releases--time_int--reset_intervalParser now uses
allow_abbrev=False— otherwise--reset 10was silently readas an abbreviation of the new
--reset_interval.--encryp,--dowebgui,--passwdetc. were left alone (shared across 9+ sibling scripts).__init__attribute typos also fixed:total_ass_attemst→total_assoc_attempts,total_ass_rejects→total_assoc_rejections.Function renames
get_count()count_wifi_msg_matches()get_time_from_wifi_msgs()collect_device_metrics()write_reset_csvs()write_iteration_csvs()aggregate_reset_dict()aggregate_device_metrics()generate_coordinate_csv()write_coordinate_csv()create_dict_csv()write_overall_csv()get_last_wifi_msg()get_last_wifi_msg_timestamp()New function added:
tokenize_wifi_msg()— splits a wifi-msg string intotokens (handles
:/whitespace/trailing punctuation), replacing 6 duplicatedtext.split(" ")call sites insidecount_wifi_msg_matches().Argument / parameter renames
value=wifi_messages=keys_list=message_keys=device=device_eid=filter=match_text=reset_dict=/reset_count_=(locals too)per_iteration_results=test_dur=test_duration=local_dict=device_metrics=phn_name=device_eid=timee=since_time=reset_cnt=iteration=r=/port_reset_dict=per_iteration_results=/iteration=data=/name=metric_totals=/image_name=_alignmen=(typo)_alignment=adb_*prefix →android_*;other_*prefix →linux_mac_*throughout.Local variable renames (representative — full list is large)
local,local_2…local_5→connected,disconnected,scanning,assoc_attempts,assoc_rejections(deadlocal_6removed outright)conected_list(typo) →connected_countscourses/values→bar_labels/bar_totalsfig_size→fig(it's aFigure, not a size)dict_→metric_labelsyaxis_visable(typo) →yaxis_visiblei_df→totals_per_device(was never a DataFrame)df_summary→summary_df,cols→columns,stats→metricsclient→device_eid(and the second loop'sclient, which held thesuffixed name, →
client_name)y/z→device_eid/device_index;i→iteration/index(context-dependent)reset_count_/reset_count→iteration_indexes/iteration_numbersassorej→assoc_rejections;asso_attempts→assoc_attemptsdis/scan/asso/asso_rej/con→disconnect_total/scan_total/assoc_attempt_total/assoc_rejection_total/connect_totaladb_user_name→android_user_namegraph1/graph2→overall_graph/client_graphtable_1/table_2/test_setup→per_iteration_table/device_summary_table/client_table_df/device_summary_df(context-dependent)d_name/device_type/user_name/s_no→device_names/device_types/user_names/serial_numberscoordinate/angle(loop indexes) →coordinate_index/angle_index;coord_key/angle_key→coordinate/angleport_reset_img_path→port_reset_image_path;timeout→timeout_seca→response;last→last_timestamp(inget_last_wifi_msg_timestamp())Dict key renamed (both write and read sites, since it's a plain string key,
not an attribute):
self.port_reset_data[...]['reset_dict']→self.port_reset_data[...]['per_iteration_results'].