]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test-network: show interface status again when wait-online failed
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 14 Feb 2024 20:51:14 +0000 (05:51 +0900)
committerLuca Boccassi <luca.boccassi@gmail.com>
Thu, 15 Feb 2024 00:37:03 +0000 (00:37 +0000)
Fixes a bug in 10d670a3c1c4b06782a76fc50e70a4719f7bb7ed.

This also makes wait_online() show a short message when a requested
interface not found.

test/test-network/systemd-networkd-tests.py

index 3cfddf59d21ecd9586db68fffc62ce86b3a23334..272c57a77bc6416f100f5e911aa855a10000eb5d 100755 (executable)
@@ -1037,7 +1037,9 @@ class Utilities():
                 for link in links_with_operstate:
                     name = link.split(':')[0]
                     if link_exists(name):
-                        networkctl_status(name)
+                        print(networkctl_status(name))
+                    else:
+                        print(f'Interface {name} not found.')
             raise
         if not bool_any and setup_state:
             for link in links_with_operstate: