From c11c4cc7d3af2ee73b0eb39f56bd8059773b2048 Mon Sep 17 00:00:00 2001 From: Martin Winter Date: Wed, 26 Jul 2017 17:27:24 -0700 Subject: [PATCH] lib: add check for mpls kernel modules to diagnose_env() Signed-off-by: Martin Winter --- tests/topotests/lib/topogen.py | 6 ++++++ 1 file changed, 6 insertions(+) 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']) -- 2.39.5