From bced1b4ef04f9e1a12c083c08839e4c1a54e2549 Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Fri, 10 May 2024 15:17:22 +0200 Subject: bond: T6303: must reset system-mac to 00:00:00:00:00:00 on deletion (cherry picked from commit 314901e7b45782fb6266b35b0e788ab7ea1404b8) --- smoketest/scripts/cli/test_interfaces_bonding.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'smoketest/scripts/cli/test_interfaces_bonding.py') diff --git a/smoketest/scripts/cli/test_interfaces_bonding.py b/smoketest/scripts/cli/test_interfaces_bonding.py index 091a7a3c5..f436424b8 100755 --- a/smoketest/scripts/cli/test_interfaces_bonding.py +++ b/smoketest/scripts/cli/test_interfaces_bonding.py @@ -243,7 +243,9 @@ class BondingInterfaceTest(BasicInterfaceTest.TestCase): def test_bonding_system_mac(self): # configure member interfaces and system-mac + default_system_mac = '00:00:00:00:00:00' # default MAC is all zeroes system_mac = '00:50:ab:cd:ef:11' + for interface in self._interfaces: for option in self._options.get(interface, []): self.cli_set(self._base_path + [interface] + option.split()) @@ -254,8 +256,18 @@ class BondingInterfaceTest(BasicInterfaceTest.TestCase): # verify config for interface in self._interfaces: - defined_mac = read_file(f'/sys/class/net/{interface}/bonding/ad_actor_system') - self.assertIn(defined_mac, system_mac) + tmp = read_file(f'/sys/class/net/{interface}/bonding/ad_actor_system') + self.assertIn(tmp, system_mac) + + for interface in self._interfaces: + self.cli_delete(self._base_path + [interface, 'system-mac']) + + self.cli_commit() + + # verify default value + for interface in self._interfaces: + tmp = read_file(f'/sys/class/net/{interface}/bonding/ad_actor_system') + self.assertIn(tmp, default_system_mac) def test_bonding_evpn_multihoming(self): id = '5' -- cgit v1.2.3