From d2d0a8d45d5a3ef00b13c3affe538446ae9c2e50 Mon Sep 17 00:00:00 2001 From: Susant Sahani Date: Thu, 15 Feb 2024 21:14:58 +0530 Subject: [PATCH] test-network: Add test for bond arp_missed_max option --- test/test-network/conf/25-bond-property.netdev | 9 +++++++++ test/test-network/systemd-networkd-tests.py | 9 +++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 test/test-network/conf/25-bond-property.netdev diff --git a/test/test-network/conf/25-bond-property.netdev b/test/test-network/conf/25-bond-property.netdev new file mode 100644 index 00000000000..6e4043fcd67 --- /dev/null +++ b/test/test-network/conf/25-bond-property.netdev @@ -0,0 +1,9 @@ +[NetDev] +Name=bond97 +Kind=bond + +[Bond] +Mode=active-backup +PrimaryReselectPolicy=always +MIIMonitorSec=1s +ARPMissedMax=10 diff --git a/test/test-network/systemd-networkd-tests.py b/test/test-network/systemd-networkd-tests.py index 272c57a77bc..661ac8ec7ad 100755 --- a/test/test-network/systemd-networkd-tests.py +++ b/test/test-network/systemd-networkd-tests.py @@ -1482,10 +1482,10 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities): self.assertIn('vlan_default_pvid 9 ', output) def test_bond(self): - copy_network_unit('25-bond.netdev', '25-bond-balanced-tlb.netdev') + copy_network_unit('25-bond.netdev', '25-bond-balanced-tlb.netdev', '25-bond-property.netdev') start_networkd() - self.wait_online('bond99:off', 'bond98:off', setup_state='unmanaged') + self.wait_online('bond99:off', 'bond98:off', 'bond97:off', setup_state='unmanaged') self.check_link_attr('bond99', 'bonding', 'mode', '802.3ad 4') self.check_link_attr('bond99', 'bonding', 'xmit_hash_policy', 'layer3+4 1') @@ -1513,6 +1513,11 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities): print(output) self.assertIn('Mode: balance-tlb', output) + output = networkctl_status('bond97') + print(output) + + self.check_link_attr('bond97', 'bonding', 'arp_missed_max', '10') + def test_vlan(self): copy_network_unit('21-vlan.netdev', '11-dummy.netdev', '21-vlan.network', '21-vlan-test1.network') -- 2.47.3