From 4ef39b49919b998d249be48500fe4adf0ea18edc Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Mon, 17 Jun 2019 19:57:54 +0900 Subject: [PATCH] test-network: remove all routing policy rules in specified table --- test/test-network/systemd-networkd-tests.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/test-network/systemd-networkd-tests.py b/test/test-network/systemd-networkd-tests.py index 5e948623677..a5056029269 100755 --- a/test/test-network/systemd-networkd-tests.py +++ b/test/test-network/systemd-networkd-tests.py @@ -188,7 +188,9 @@ def remove_fou_ports(ports): def remove_routing_policy_rule_tables(tables): for table in tables: - call('ip rule del table', table, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) + rc = 0 + while rc == 0: + rc = call('ip rule del table', table, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) def remove_routes(routes): for route_type, addr in routes: -- 2.39.2