From: Frantisek Sumsal Date: Thu, 3 Feb 2022 18:20:42 +0000 (+0100) Subject: test-network: avoid name clashing/redefinition X-Git-Tag: v251-rc1~356^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a561bceeaac665467ef915b5f70d1b263322cca7;p=thirdparty%2Fsystemd.git test-network: avoid name clashing/redefinition --- diff --git a/test/test-network/systemd-networkd-tests.py b/test/test-network/systemd-networkd-tests.py index abbb760457e..edcfce9556b 100755 --- a/test/test-network/systemd-networkd-tests.py +++ b/test/test-network/systemd-networkd-tests.py @@ -439,8 +439,8 @@ def remove_blackhole_nexthops(): ret = run('ip nexthop show dev lo', stdout=subprocess.PIPE, stderr=subprocess.DEVNULL) if ret.returncode == 0: for line in ret.stdout.rstrip().splitlines(): - id = line.split()[1] - call(f'ip nexthop del id {id}') + dev_id = line.split()[1] + call(f'ip nexthop del id {dev_id}') def remove_l2tp_tunnels(tunnel_ids): output = check_output('ip l2tp show tunnel') @@ -5845,7 +5845,7 @@ if __name__ == '__main__': parser.add_argument('--lsan-options', help='LSAN options', dest='lsan_options') parser.add_argument('--ubsan-options', help='UBSAN options', dest='ubsan_options') parser.add_argument('--with-coverage', help='Loosen certain sandbox restrictions to make gcov happy', dest='with_coverage', type=bool, nargs='?', const=True, default=with_coverage) - ns, args = parser.parse_known_args(namespace=unittest) + ns, unknown_args = parser.parse_known_args(namespace=unittest) if ns.build_dir: if ns.networkd_bin or ns.resolved_bin or ns.udevd_bin or ns.wait_online_bin or ns.networkctl_bin or ns.resolvectl_bin or ns.timedatectl_bin: @@ -5900,6 +5900,6 @@ if __name__ == '__main__': if ubsan_options: env.update({ 'UBSAN_OPTIONS' : ubsan_options }) - sys.argv[1:] = args + sys.argv[1:] = unknown_args unittest.main(testRunner=unittest.TextTestRunner(stream=sys.stdout, verbosity=3))