From: Yu Watanabe Date: Mon, 31 Oct 2022 03:12:26 +0000 (+0900) Subject: test-network: make link_exists() support alternative names X-Git-Tag: v253-rc1~614^2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=dee6c26f3e33c51a05e98f9a418aa12801d1caf5;p=thirdparty%2Fsystemd.git test-network: make link_exists() support alternative names --- diff --git a/test/test-network/systemd-networkd-tests.py b/test/test-network/systemd-networkd-tests.py index dfef73f030e..f1332cd916a 100755 --- a/test/test-network/systemd-networkd-tests.py +++ b/test/test-network/systemd-networkd-tests.py @@ -411,7 +411,7 @@ def create_service_dropin(service, command, reload_command=None, additional_sett create_unit_dropin(f'{service}.service', drop_in) def link_exists(link): - return os.path.exists(os.path.join('/sys/class/net', link, 'ifindex')) + return call_quiet(f'ip link show {link}') == 0 def remove_link(*links, protect=False): for link in links: