From: Yu Watanabe Date: Thu, 12 Mar 2026 07:15:47 +0000 (+0900) Subject: test-network: drop duplicated definition of networkd_pid() X-Git-Tag: v260-rc4~3^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=67957b1464ee433f205d8bbba90602a720bd2e05;p=thirdparty%2Fsystemd.git test-network: drop duplicated definition of networkd_pid() --- diff --git a/test/test-network/systemd-networkd-tests.py b/test/test-network/systemd-networkd-tests.py index 1f3a99a040a..835f31656e8 100755 --- a/test/test-network/systemd-networkd-tests.py +++ b/test/test-network/systemd-networkd-tests.py @@ -987,7 +987,7 @@ def networkd_invocation_id(): return check_output('systemctl show --value -p InvocationID systemd-networkd.service') def networkd_pid(): - return check_output('systemctl show --value -p MainPID systemd-networkd.service') + return int(check_output('systemctl show --value -p MainPID systemd-networkd.service')) def read_networkd_log(invocation_id=None, since=None): if not invocation_id: @@ -1051,9 +1051,6 @@ def restart_networkd(show_logs=True): pid = networkd_pid() print(f'Restarted systemd-networkd.service: PID={pid}, Invocation ID={invocation_id}') -def networkd_pid(): - return int(check_output('systemctl show --value -p MainPID systemd-networkd.service')) - def networkctl(*args): # Do not call networkctl if networkd is in failed state. # Otherwise, networkd may be restarted and we may get wrong results.