With tox:
1: tox -r ./
+
+Findings
+========
+
+The binding type (ld.so) (now or lazy) is dependent on the gcc/ld distribution
+configuration. Hence, for this test suite, we force the behavior to "now". This
+result in the lookup of all required symbols at launch. This is particularly
+important since we want to prevent inconsistent behavior. Immediate might be
+forced in the future for lttng project but for now we simply force it at
+runtime.
sessiond = utils.sessiond_spawn(runtime_tools)
- cp, out, err = runtime_tools.run('{} create trace'.format(lttng_client), check_return=False)
+ cp, out, err = runtime_tools.run('{} create trace'.format(lttng_client), check_return=False, ld_debug=True)
if outcome == "Missing symbol":
assert(cp.returncode != 0)
assert(utils.file_contains(err, "Missing symbol"))
assert(cp.returncode == 0)
- runtime_tools.run('lttng enable-event -u tp:tptest')
- runtime_tools.run('lttng start')
+ runtime_tools.run('{} enable-event -u tp:tptest'.format(lttng_client))
+ runtime_tools.run('{} start'.format(lttng_client))
# Stop tracing
- runtime_tools.run('lttng stop')
- runtime_tools.run('lttng destroy -a')
+ runtime_tools.run('{} stop'.format(lttng_client))
+ runtime_tools.run('{} destroy -a'.format(lttng_client))
cp = runtime_tools.subprocess_terminate(sessiond)
if cp.returncode != 0:
pytest.fail("Sessiond return code")
_logger.debug("Spawned sub pid: {} args: {} stdout: {} stderr{}".format(p.pid, p.args, out_path, err_path))
return tmp_id
- def run(self, command_line, cwd=None, check_return=True, ld_preload="", classpath="", timeout=None):
+ def run(self, command_line, cwd=None, check_return=True, ld_preload="",
+ classpath="", timeout=None, ld_debug=False):
"""
Run the command and return a tuple of a (CompletedProcess, stdout_path,
stderr_path). The subprocess is already executed and returned. The
env['LD_PRELOAD'] = ld_preload
if classpath:
env['CLASSPATH'] = classpath
-
+ if ld_debug:
+ # ld debugging switch
+ env["LD_DEBUG"] = "all"
tmp_id = self._run_command_count
self._run_command_count += 1
env = os.environ.copy()
env["LTTNG_HOME"] = self.lttng_home
+ env["LD_BIND_NOW"] = "enabled"
env_fetch = {"CPPFLAGS": (self.get_cppflags(), " "),
"LDFLAGS": (self.get_ldflags(), " "),