]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test-network: drop wait_online() from test_ip6gre_tunnel() 12618/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 22 May 2019 09:02:20 +0000 (18:02 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 22 May 2019 09:02:20 +0000 (18:02 +0900)
test/test-network/systemd-networkd-tests.py

index 6787fdc29b502c7c61faef9cf1caf94da67e9801..0dcd9cd496afca1f3d6327c96b8e9542ec148785 100755 (executable)
@@ -70,33 +70,6 @@ def expectedFailureIfRoutingPolicyIPProtoIsNotAvailable():
 
     return f
 
 
     return f
 
-def expectedFailureIf_ip6gre_do_not_support_ipv6ll():
-    def f(func):
-        success = False
-        rc = subprocess.call(['ip', 'link', 'add', 'name', 'test1', 'type', 'dummy'])
-        if rc == 0:
-            time.sleep(1)
-            rc = subprocess.call(['ip', 'tunnel', 'add', 'tun99', 'local', '2a00:ffde:4567:edde::4986', 'remote', '2001:473:fece:cafe::5178', 'mode', 'ip6gre', 'dev', 'test1'])
-            if rc == 0:
-                time.sleep(1)
-                # Not sure why, but '0' or '2' do not work.
-                subprocess.call(['sysctl', '-w', 'net.ipv6.conf.tun99.addr_gen_mode=3'])
-
-                output = subprocess.check_output(['ip', '-6', 'address', 'show', 'dev', 'tun99', 'scope', 'link'], universal_newlines=True).rstrip()
-                print(output)
-                success = 'inet6' in output
-
-                subprocess.run(['ip', 'tunnel', 'del', 'tun99'])
-
-            subprocess.run(['ip', 'link', 'del', 'test1'])
-
-        if success:
-            return func
-        else:
-            return unittest.expectedFailure(func)
-
-    return f
-
 def setUpModule():
     os.makedirs(network_unit_file_path, exist_ok=True)
     os.makedirs(networkd_ci_path, exist_ok=True)
 def setUpModule():
     os.makedirs(network_unit_file_path, exist_ok=True)
     os.makedirs(networkd_ci_path, exist_ok=True)
@@ -731,7 +704,6 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
         self.assertNotRegex(output, 'iseq')
         self.assertNotRegex(output, 'oseq')
 
         self.assertNotRegex(output, 'iseq')
         self.assertNotRegex(output, 'oseq')
 
-    @expectedFailureIf_ip6gre_do_not_support_ipv6ll()
     def test_ip6gre_tunnel(self):
         self.copy_unit_to_networkd_unit_path('12-dummy.netdev', 'ip6gretun.network',
                                              '25-ip6gre-tunnel.netdev', '25-tunnel.network',
     def test_ip6gre_tunnel(self):
         self.copy_unit_to_networkd_unit_path('12-dummy.netdev', 'ip6gretun.network',
                                              '25-ip6gre-tunnel.netdev', '25-tunnel.network',
@@ -739,6 +711,8 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
                                              '25-ip6gre-tunnel-remote-any.netdev', '25-tunnel-remote-any.network')
         self.start_networkd()
 
                                              '25-ip6gre-tunnel-remote-any.netdev', '25-tunnel-remote-any.network')
         self.start_networkd()
 
+        # Old kernels seem not to support IPv6LL address on ip6gre tunnel, So please do not use wait_online() here.
+
         self.check_link_exists('dummy98')
         self.check_link_exists('ip6gretun99')
         self.check_link_exists('ip6gretun98')
         self.check_link_exists('dummy98')
         self.check_link_exists('ip6gretun99')
         self.check_link_exists('ip6gretun98')
@@ -754,9 +728,6 @@ class NetworkdNetDevTests(unittest.TestCase, Utilities):
         print(output)
         self.assertRegex(output, 'ip6gre remote any local 2a00:ffde:4567:edde::4987 dev dummy98')
 
         print(output)
         self.assertRegex(output, 'ip6gre remote any local 2a00:ffde:4567:edde::4987 dev dummy98')
 
-        # Old kernels may not support IPv6LL address on ip6gre tunnel, and the following test may fails.
-        self.wait_online(['ip6gretun99:routable', 'ip6gretun98:routable', 'ip6gretun97:routable', 'dummy98:degraded'])
-
     def test_gretap_tunnel(self):
         self.copy_unit_to_networkd_unit_path('12-dummy.netdev', 'gretap.network',
                                              '25-gretap-tunnel.netdev', '25-tunnel.network',
     def test_gretap_tunnel(self):
         self.copy_unit_to_networkd_unit_path('12-dummy.netdev', 'gretap.network',
                                              '25-gretap-tunnel.netdev', '25-tunnel.network',