summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2019-07-03 03:11:27 +0700
committerDaniil Baturin <daniil@baturin.org>2019-07-03 03:11:27 +0700
commit24e40c6b70d9b4f7ebf1e02bace5794009b0c1b6 (patch)
tree3695d8795849574e75e16e3efd80367b33c6ce75 /scripts
downloadvyos-1x-24e40c6b70d9b4f7ebf1e02bace5794009b0c1b6.tar.gz
vyos-1x-24e40c6b70d9b4f7ebf1e02bace5794009b0c1b6.zip
Initial commit.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/test_module_load.py35
1 files changed, 35 insertions, 0 deletions
diff --git a/scripts/test_module_load.py b/scripts/test_module_load.py
new file mode 100755
index 000000000..a4f3a62eb
--- /dev/null
+++ b/scripts/test_module_load.py
@@ -0,0 +1,35 @@
+#!/usr/bin/env python3
+
+import sys
+import os
+
+MODULES_INTEL = "e1000 e1000e igb ixgb ixgbe ixgbevf i40e i40evf"
+MODULES_ACCEL_PPP = "ipoe"
+MODULES_MISC = "wireguard"
+
+modules = {
+ "intel": ["e1000", "e1000e", "igb", "ixgb", "ixgbe", "ixgbevf", "i40e", "i40evf"],
+ "accel_ppp": ["ipoe"],
+ "misc": ["wireguard"]
+}
+
+if __name__ == '__main__':
+ success = True
+
+ print("[load modules] Test execution started")
+ for msk in modules:
+ ms = modules[msk]
+ for m in ms:
+ # We want to uncover all modules that fail,
+ # not fail at the first one
+ try:
+ os.system("modprobe {0}".format(m))
+ except Exception as e:
+ print("[load modules] Test [modprobe {0}] failed: {1}".format(module, e))
+ success = False
+
+ if not success:
+ print("Test [load modules] failed")
+ sys.exit(1)
+ else:
+ print("[load modules] Test succeeded")