lf_interop_port_reset_test.py: count driver-initiated scans on Linux - #375
Merged
Merged
Conversation
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 12 16 \
--device_list R9ZY30RD0KW,user-ThinkPad-T450,DesktopLatitude5490,Macs-MacBook-Air,User,lin-16,user-HP-ProBook-445R-G6,DESKTOP-0P0OM22,DESKTOP-6UC6DNN
Signed-off-by: Narayana-CT <narayana.pinapatruni@candelatech.com>
haricharan-candela
approved these changes
Aug 27, 2026
goyalsaurabh06
approved these changes
Aug 27, 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.
The Linux branch counted only "<3>CTRL-EVENT-SCAN-STARTED", which
wpa_supplicant emits for scans it runs itself. Laptops whose driver
handles SME scan without going through wpa_supplicant, so those scans
left no trace beyond the kernel event and the client reported
Scanning = 0 on every iteration.
Fall back to the kernel "scan started" event when the wpa_supplicant
one is absent, mirroring the fallback the disconnect count already
uses. Replayed against previously captured wifi-msgs: an affected
laptop goes from 0 to 1 scan across all five resets, while one that
already worked stays at 1. The latter logs both strings, so summing
the two counts instead of falling back would double it.
Also rename linux_mac_* to linux_* in the same branch. That name dates
from when the branch handled Linux and macOS together; macOS got its
own branch in "count wifi events on macOS" and can no longer reach
this code, so the mac half of the name is dead.
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 12 16
--device_list R9ZY30RD0KW,user-ThinkPad-T450,DesktopLatitude5490,Macs-MacBook-Air,User,lin-16,user-HP-ProBook-445R-G6,DESKTOP-0P0OM22,DESKTOP-6UC6DNN