X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=tests%2Fregression%2Ftools%2Fnotification%2Futil_event_generator.sh;h=55189cf7cec217e88b7f2d3d5c364a79666aaff9;hp=5eef0deea82f0a775e88f04d7144816d4e6bd3b1;hb=95c830c4fddfeb13d020cf53a041934cc431c419;hpb=318a73cce5c3e7a243c0d7f6a337c4aeb4bc6f6c diff --git a/tests/regression/tools/notification/util_event_generator.sh b/tests/regression/tools/notification/util_event_generator.sh index 5eef0deea..55189cf7c 100644 --- a/tests/regression/tools/notification/util_event_generator.sh +++ b/tests/regression/tools/notification/util_event_generator.sh @@ -37,7 +37,19 @@ function userspace_probe_testapp shift for i in $(seq 1 "$nr"); do - $USERSPACE_PROBE_ELF_TESTAPP_BIN "$@" + # This userspace probe test has to instrument the actual elf + # binary and not the generated libtool wrapper. However, we + # can't invoke the wrapper either since it will re-link the test + # application binary on its first invocation, resulting in a new + # binary with an 'lt-*' prefix under the .libs folder. The + # relinking stage adds the .libs folder to the 'lt-*' binary's + # rpath. + # + # To ensure the binary (inode) that instrumented is the same as + # what is running, set LD_LIBRARY_PATH to find the .libs folder + # that contains the libfoo.so library and invoke the binary + # directly. + LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$TESTDIR/utils/testapp/userspace-probe-elf-binary/.libs" $USERSPACE_PROBE_ELF_TESTAPP_BIN "$@" done }