]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test-network: add tests for Broadcast= with boolean settings 18689/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 18 Feb 2021 21:06:51 +0000 (06:06 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 20 Feb 2021 05:23:07 +0000 (14:23 +0900)
test/test-network/conf/25-address-static.network
test/test-network/conf/25-wireguard-23-peers.network
test/test-network/systemd-networkd-tests.py

index da57bf735109a0c30ac8ef68f8aa83baa7f5699c..3227fe8dfd017a9fc8cb272d09212d56c2f9db23 100644 (file)
@@ -61,6 +61,10 @@ Scope=link
 Address=2001:0db8:1:f101::1/64
 PreferredLifetime=0
 
+[Address]
+Address=10.8.8.1/16
+Broadcast=no
+
 # test for ENOBUFS issue #17012
 [Network]
 Address=10.3.3.1/16
index 4dc87f8d4c71771e60367db554f8afc25079d336..033ffa155da79963a6daf727e25e270f3865c701 100644 (file)
@@ -2,6 +2,7 @@
 Name=wg98
 
 [Network]
+Address=192.168.123.123/24
 Address=fd8d:4d6d:3ccb:0500::1/64
 
 # nat64 via 1
index 12e9a0a4a361569f63da7286448d5255a0ab36eb..a5942ec4ea753048c4ef89b4fa847eed12ace3d2 100755 (executable)
@@ -1220,6 +1220,14 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
         start_networkd()
         self.wait_online(['wg99:carrier', 'wg98:routable', 'wg97:carrier'])
 
+        output = check_output('ip -4 address show dev wg98')
+        print(output)
+        self.assertIn('inet 192.168.123.123/24 scope global wg98', output)
+
+        output = check_output('ip -6 address show dev wg98')
+        print(output)
+        self.assertIn('inet6 fd8d:4d6d:3ccb:500::1/64 scope global', output)
+
         if shutil.which('wg'):
             call('wg')
 
@@ -1833,6 +1841,7 @@ class NetworkdNetworkTests(unittest.TestCase, Utilities):
         self.assertIn('inet 10.1.2.4/16 brd 10.1.255.255 scope global secondary dummy98', output)
         self.assertIn('inet 10.2.2.4/16 brd 10.2.255.255 scope global dummy98', output)
         self.assertIn('inet 10.7.8.9/16 brd 10.7.255.255 scope link deprecated dummy98', output)
+        self.assertIn('inet 10.8.8.1/16 scope global dummy98', output)
 
         # test for ENOBUFS issue #17012
         for i in range(1,254):