]> git.proxmox.com Git - mirror_frr.git/commitdiff
lib: add check for mpls kernel modules to diagnose_env()
authorMartin Winter <mwinter@opensourcerouting.org>
Thu, 27 Jul 2017 00:27:24 +0000 (17:27 -0700)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 28 Nov 2018 01:22:12 +0000 (20:22 -0500)
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
tests/topotests/lib/topogen.py

index 71a4d1b90aea12ace8e400bca33eb46af0cc7cbd..177d908746e546e19bf8f05a75aa2a2b20a2185c 100644 (file)
@@ -969,6 +969,12 @@ def diagnose_env():
     if topotest.version_cmp(krel, '4.5') < 0:
         logger.info('LDPd tests will not run (have kernel "{}", but it requires 4.5)'.format(krel))
 
+    # Test for MPLS Kernel modules available
+    if os.system('/sbin/modprobe -n mpls-router') != 0:
+        logger.info('LDPd tests will not run (missing mpls-router kernel module)')
+    if os.system('/sbin/modprobe -n mpls-iptunnel') != 0:
+        logger.info('LDPd tests will not run (missing mpls-iptunnel kernel module)')
+
     # TODO remove me when we start supporting exabgp >= 4
     try:
         output = subprocess.check_output(['exabgp', '-v'])