]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test-network: add test for bond mac address config 25628/head
authorJian Zhang <zhangjian.3032@bytedance.com>
Mon, 5 Dec 2022 10:38:00 +0000 (18:38 +0800)
committerJian Zhang <zhangjian.3032@bytedance.com>
Tue, 6 Dec 2022 06:41:31 +0000 (14:41 +0800)
Signed-off-by: Jian Zhang <zhangjian.3032@bytedance.com>
test/test-network/conf/23-bond199.network
test/test-network/systemd-networkd-tests.py

index 9f4879ff24c3f28dd8444e24d55df3461022e8f4..6a1f9a1bc7a5428ae5bc534dc2e93b38b2e127a1 100644 (file)
@@ -4,3 +4,6 @@ Name=bond199
 
 [Network]
 IPv6AcceptRA=no
+
+[Link]
+MACAddress=00:11:22:33:44:55
index e4e92d5a37915cb762b11bf91cf3cb0c10293621..398ece8297a7890bbea366b711c811601386d803 100755 (executable)
@@ -3881,6 +3881,7 @@ class NetworkdBondTests(unittest.TestCase, Utilities):
         output = check_output('ip -d link show bond199')
         print(output)
         self.assertRegex(output, 'primary dummy98')
+        self.assertIn('link/ether 00:11:22:33:44:55', output)
 
     def test_bond_operstate(self):
         copy_network_unit('25-bond.netdev', '11-dummy.netdev', '12-dummy.netdev',