diff options
-rw-r--r-- | sos/plugins/__init__.py | 5 | ||||
-rw-r--r-- | tests/option_tests.py | 1 | ||||
-rw-r--r-- | tests/plugin_tests.py | 1 |
3 files changed, 7 insertions, 0 deletions
diff --git a/sos/plugins/__init__.py b/sos/plugins/__init__.py index c550911a..a6adc23f 100644 --- a/sos/plugins/__init__.py +++ b/sos/plugins/__init__.py @@ -150,6 +150,11 @@ class SoSPredicate(object): """Predicate evaluation hook. """ pvalue = False + + # Allow loading kernel modules? + pvalue |= self._owner.get_option("allow_system_changes") + + # Are kernel modules loaded? for k in self.kmods: pvalue |= self._owner.is_module_loaded(k) diff --git a/tests/option_tests.py b/tests/option_tests.py index 3912375d..f0587367 100644 --- a/tests/option_tests.py +++ b/tests/option_tests.py @@ -10,6 +10,7 @@ class MockOptions(object): all_logs = False dry_run = False log_size = 25 + allow_system_changes = False class GlobalOptionTest(unittest.TestCase): diff --git a/tests/plugin_tests.py b/tests/plugin_tests.py index 7d36957b..e81575cf 100644 --- a/tests/plugin_tests.py +++ b/tests/plugin_tests.py @@ -94,6 +94,7 @@ class MockOptions(object): all_logs = False dry_run = False log_size = 25 + allow_system_changes = False class PluginToolTests(unittest.TestCase): |