Only deactivate activated connections in wifi_nmcli_test.py (BugFix)#2246
Open
Jefferyyen wants to merge 4 commits intocanonical:mainfrom
Open
Only deactivate activated connections in wifi_nmcli_test.py (BugFix)#2246Jefferyyen wants to merge 4 commits intocanonical:mainfrom
Jefferyyen wants to merge 4 commits intocanonical:mainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2246 +/- ##
=======================================
Coverage 53.70% 53.70%
=======================================
Files 401 401
Lines 43144 43146 +2
Branches 7996 7997 +1
=======================================
+ Hits 23170 23172 +2
Misses 19161 19161
Partials 813 813
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:
|
Contributor
|
This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in a week. |
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.
Description
This PR updates
turn_down_nm_connections()to deactivate only Wi-Fi connections currently in the activated state. It re-queries NetworkManager connections and repeats until no activated Wi-Fi connection remains.Resolved issues
When running Wireless networking tests with NetworkManager,
turn_down_nm_connections()may attempt to deactivate saved Wi-Fi profiles that are not active. In that case,nmcli connection down <uuid>fails with:Error: '<uuid>' is not an active connectionError: no active connection providedreturned non-zero exit status 10This change deactivates only activated Wi-Fi connections and loops until none remain, preventing the above failure.
Ref: WTN-323 (oem bug)
Documentation
Tests
Environment:
Steps:
Verify with
nmcli connection show. For example, SSID4F-1VC2-A45is active onwlp2s0f0, and SSID4F-1VC2-A35is not active:checkbox-cli <Ubuntu_launcher>(replace with your launcher name if different)Desktop Preload Certification Tests for 24.04→
Wireless networking tests→
wireless/wireless_connection_wpa_ax_nm_<interface>( is auto-detected, e.g. wlp2s0f0)Expected result:
turn_down_nm_connections()only deactivates connections in activated state.Failure example (before this change):
nmcli c down <uuid>Error: '<uuid>' is not an active connectionError: no active connection providedreturned non-zero exit status 10failure reference: