-
Couldn't load subscription status.
- Fork 67
Add a simple WiFi MLO test (New) #2109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2109 +/- ##
===========================================
- Coverage 52.86% 30.02% -22.84%
===========================================
Files 395 149 -246
Lines 42636 16401 -26235
Branches 7906 2812 -5094
===========================================
- Hits 22538 4924 -17614
+ Misses 19295 11345 -7950
+ Partials 803 132 -671
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left some suggestion.
Most of the script logics are good for me, and i think if we only grab one time (after 5 sec negotiation) may easy fail when the lab env is not stable.
To make the script more reliable, let's change how we check the connection.
Instead of checking only once, we should keep trying for 30 seconds. The first time the check passes, the script should exit and report success.
This will prevent the script from failing due to temporary network issues.
Thanks for the catch! I encountered a "connection successful + only 1 link present" situation today and a simple disconnect + reconnect fixed it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding the retry logic.
I see you use slugify so the iw output updates on each retry, even if the job is re-run. This is the great idea for debugging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM+1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left a few comments inline below.
One thing I have concerns with is how you do the connection. If I run this on my device, my current WiFi connection to my usual AP will be lost, no? Other jobs like wireless/wireless_connection_* use a different way to handle a test connection, it seems, by creating a specific connection name and using it:
checkbox/providers/base/bin/wifi_nmcli_test.py
Lines 77 to 115 in dde3844
| def turn_up_connection(uuid): | |
| # uuid can also be connection name | |
| print_head("Turn up NM connection") | |
| cmd = "nmcli c up {}".format(uuid) | |
| print("Turn up {}".format(uuid)) | |
| activate_uuid = get_nm_activate_connection() | |
| if uuid == activate_uuid: | |
| print("{} state is already activated".format(uuid)) | |
| return None | |
| try: | |
| print_cmd(cmd) | |
| sp.call(shlex.split(cmd)) | |
| except Exception as e: | |
| print("Can't turn on {}: {}".format(uuid, str(e))) | |
| def turn_down_nm_connections(): | |
| print_head("Turn off NM all connections") | |
| connections = _get_nm_wireless_connections() | |
| for name, value in connections.items(): | |
| uuid = value["uuid"] | |
| print("Turn down connection", name) | |
| cmd = "nmcli c down {}".format(uuid) | |
| print_cmd(cmd) | |
| sp.check_call(shlex.split(cmd)) | |
| print("{} {} is down now".format(name, uuid)) | |
| print() | |
| def delete_test_ap_ssid_connection(): | |
| print_head("Cleaning up TEST_CON connection") | |
| connections = _get_nm_wireless_connections() | |
| if "TEST_CON" not in connections: | |
| print("No TEST_CON connection found, nothing to delete") | |
| return | |
| cmd = "nmcli c delete TEST_CON" | |
| print_cmd(cmd) | |
| sp.check_call(shlex.split(cmd)) | |
| print("TEST_CON is deleted") |
d984969
|
Hi @pieqq, Thanks for the review! The length of the test grew quite a bit so here's a short summary of what changed:
|
|
The CI failures are caused by missing py3.5 and py3.6 packages which should be fixable with a rebase since #2141 was merged. I'll rebase after the review to avoid completely wiping out the commit timeline. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Python code looks good to me.
2 things inline with regards to passing env variable to the Checkbox job, and maybe using a manifest instead of a resource.
|
Final run with the latest commit: https://certification.canonical.com/hardware/202503-36508/submission/455725/ |
…e sequences appear
WARNING: This modifies com.canonical.certification::sru-server
This test is only intended for PCs running 24.04 and later. Please lmk if the test job should be placed somewhere else.
A new pair environment variables (MLO_SSID, MLO_PSK) has been added for this test. Default values for both of them have been added here: https://github.com/canonical/ce-oem-dut-checkbox-configuration/pull/278/
Caution
Since some of the labs don't have a MLO wifi AP yet, please don't merge this PR immediately after approval. I'll update in this thread once I can be sure that all labs have an MLO AP.Update: If themlo_ssid_specifiedworkaround is acceptable, we can merge this without waiting for all the labs to be ready.Update 2: safe to merge after approval. Labs that don't have a Wifi7 AP can set the manifest entry to false
Description
This PR adds a WiFi MLO (multi-link operation) test for the upcoming wifi-7 capable cards. For simplicity this PR only uses nmcli to connect/disconnect and does not take networkd into account.
Resolved issues
Documentation
What this test does is basically:
iw devprints multiple links under the "MLD with links" sectionThe file is called wifi 7 test because there are more features in wifi 7 than what's implemented here. MLO happens to be a high priority one so it's included first. MLO and connection type are the only checks that can fail the entire test case for now; the connection bandwidth and 4096QAM checks only print warnings because 320mhz is not a required feature and 4096QAM is too sensitive to the environment.
Manifest?
I think we don't need a new manifest such as "has_mlo_support" here because according to Cisco's guide, MLO is a required feature of wifi7. So if we have
wireless_sta_protocol.interface_be == 'supported', then we can safely assume that MLO is supported by the DUT. If the test fails, either there's a real issue with the DUT's wifi stack or the environment isn't set up correctlyTests
Unit tests
https://certification.canonical.com/hardware/202508-37862/submission/450483/https://certification.canonical.com/hardware/202508-37862/submission/451747/