From: Martin Winter Date: Thu, 27 Jul 2017 00:27:24 +0000 (-0700) Subject: lib: add check for mpls kernel modules to diagnose_env() X-Git-Tag: frr-7.1-dev~151^2~241 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=c11c4cc7d3af2ee73b0eb39f56bd8059773b2048;p=matthieu%2Ffrr.git lib: add check for mpls kernel modules to diagnose_env() Signed-off-by: Martin Winter --- diff --git a/tests/topotests/lib/topogen.py b/tests/topotests/lib/topogen.py index 71a4d1b90a..177d908746 100644 --- a/tests/topotests/lib/topogen.py +++ b/tests/topotests/lib/topogen.py @@ -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'])