projects
/
deliverable
/
lttng-ivc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Unload test module only if it was loaded
[deliverable/lttng-ivc.git]
/
lttng_ivc
/
utils
/
runtime.py
diff --git
a/lttng_ivc/utils/runtime.py
b/lttng_ivc/utils/runtime.py
index 3a776cbf2169d348a6f9b78fe6142b80e5802efe..9efdabee085b0bc7d4c33ec5160209002eddef93 100644
(file)
--- a/
lttng_ivc/utils/runtime.py
+++ b/
lttng_ivc/utils/runtime.py
@@
-46,6
+46,7
@@
class Runtime(object):
self._runtime_log_aggregation = os.path.join(self.__runtime_log, "runtime.log")
self._run_command_count = 0
self._runtime_log_aggregation = os.path.join(self.__runtime_log, "runtime.log")
self._run_command_count = 0
+ self._is_test_modules_loaded = False
self.special_env_variables = {"LTTNG_UST_DEBUG": "1",
"LTTNG_APP_SOCKET_TIMEOUT": "-1",
self.special_env_variables = {"LTTNG_UST_DEBUG": "1",
"LTTNG_APP_SOCKET_TIMEOUT": "-1",
@@
-239,10
+240,12
@@
class Runtime(object):
def load_test_module(self):
# Base directory is provided by env
self.run("modprobe lttng-test")
def load_test_module(self):
# Base directory is provided by env
self.run("modprobe lttng-test")
+ self._is_test_modules_loaded = True
def unload_test_module(self, check_return=True):
# Base directory is provided by env
def unload_test_module(self, check_return=True):
# Base directory is provided by env
- self.run("modprobe -r lttng-test", check_return=check_return)
+ if self._is_test_modules_loaded:
+ self.run("modprobe -r lttng-test", check_return=check_return)
def close(self):
for key, subp in self.__subprocess.items():
def close(self):
for key, subp in self.__subprocess.items():
This page took
0.024362 seconds
and
5
git commands to generate.