summaryrefslogtreecommitdiffstats
path: root/test/test-network/systemd-networkd-tests.py
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2022-02-01 05:26:40 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2022-02-01 05:26:43 +0100
commit020483b248b45b15eb93d2ae322d7f211c61e44d (patch)
tree9b53adb712a0524c9562b88ee4c69144928509c6 /test/test-network/systemd-networkd-tests.py
parentnetwork: xfrm: refuse zero interface ID (diff)
downloadsystemd-020483b248b45b15eb93d2ae322d7f211c61e44d.tar.xz
systemd-020483b248b45b15eb93d2ae322d7f211c61e44d.zip
test-network: set xfrm interface ID
This also unifies two tests for xfrm, and checks the output of 'ip link' command. Fixes #22329.
Diffstat (limited to '')
-rwxr-xr-xtest/test-network/systemd-networkd-tests.py20
1 files changed, 11 insertions, 9 deletions
diff --git a/test/test-network/systemd-networkd-tests.py b/test/test-network/systemd-networkd-tests.py
index ba16170393..885aaad77a 100755
--- a/test/test-network/systemd-networkd-tests.py
+++ b/test/test-network/systemd-networkd-tests.py
@@ -886,6 +886,7 @@ class NetworkctlTests(unittest.TestCase, Utilities):
class NetworkdNetDevTests(unittest.TestCase, Utilities):
links_remove_earlier = [
+ 'xfrm98',
'xfrm99',
]
@@ -1797,20 +1798,21 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
@expectedFailureIfModuleIsNotAvailable('xfrm_interface')
def test_xfrm(self):
copy_unit_to_networkd_unit_path('12-dummy.netdev', 'xfrm.network',
- '25-xfrm.netdev', 'netdev-link-local-addressing-yes.network')
+ '25-xfrm.netdev', '25-xfrm-independent.netdev',
+ 'netdev-link-local-addressing-yes.network')
start_networkd()
- self.wait_online(['xfrm99:degraded', 'dummy98:degraded'])
+ self.wait_online(['dummy98:degraded', 'xfrm98:degraded', 'xfrm99:degraded'])
- output = check_output('ip link show dev xfrm99')
+ output = check_output('ip -d link show dev xfrm98')
print(output)
+ self.assertIn('xfrm98@dummy98:', output)
+ self.assertIn('xfrm if_id 0x98 ', output)
- @expectedFailureIfModuleIsNotAvailable('xfrm_interface')
- def test_xfrm_independent(self):
- copy_unit_to_networkd_unit_path('25-xfrm-independent.netdev', 'netdev-link-local-addressing-yes.network')
- start_networkd()
-
- self.wait_online(['xfrm99:degraded'])
+ output = check_output('ip -d link show dev xfrm99')
+ print(output)
+ self.assertIn('xfrm99@lo:', output)
+ self.assertIn('xfrm if_id 0x99 ', output)
@expectedFailureIfModuleIsNotAvailable('fou')
def test_fou(self):