Skip to content
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

Needs updating for NetworkManager 1.49.3 secret agent #216

Open
martinpitt opened this issue Aug 25, 2024 · 0 comments
Open

Needs updating for NetworkManager 1.49.3 secret agent #216

martinpitt opened this issue Aug 25, 2024 · 0 comments

Comments

@martinpitt
Copy link
Owner

Since this NM commit (1.49.2 → 1.49.3), test_one_wifi_with_accesspoints test hangs. nmcli expects a secret agent, for which the current mock doesn't provide integration.

A convenient way to investigate this is

--- tests/test_networkmanager.py
+++ tests/test_networkmanager.py
@@ -172,7 +172,9 @@ class TestNetworkManager(dbusmock.DBusTestCase):
         self.assertRegex(self.read_device(), r"wlan0.*\sconnected\s+--")
 
         # connect to existing wifi with password
-        subprocess.check_call(["nmcli", "dev", "wifi", "connect", "AP_3", "password", "s3kr1t"])
+        print(' '.join(["nmcli", "dev", "wifi", "connect", "AP_3", "password", "s3kr1t"]))
+        subprocess.check_call(["bash", "-i"])
+        # subprocess.check_call(["timeout", "--signal=KILL", "5", "nmcli", "dev", "wifi", "connect", "AP_3", "password", "s3kr1t"])
         self.assertRegex(self.read_device(), r"wlan0.*\sconnected\s+AP_3")
 
         # connect to existing wifi without password

and then running pytest -svvk test_one_wifi_with_accesspoints. It'll set up the NM mock and give you a shell, where

 nmcli dev wifi connect AP_3 password s3kr1t

hangs.

But neither busctl monitor nor strace tell me what exactly nmcli is trying to do when it hangs.

@thom311 @lkundrak would you have some hints for me how I need to extend the NM mock to get along with this? Thanks!

martinpitt added a commit that referenced this issue Aug 25, 2024
Our NM mock is currently broken with `nmcli` >= 1.49.3, see #216.

Turn the eternal hang into a failure.
martinpitt added a commit that referenced this issue Aug 25, 2024
Our NM mock is currently broken with `nmcli` >= 1.49.3, see #216.

Turn the eternal hang into a failure.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant