tests: add some diags in utils.sh
When debugging test cases and trying to reproduce manually, it helps me
a lot to see what commands are executed by the test cases.
Change utils.sh such that all invocations of the lttng binary go through
a function that logs (using `diag`) the executed command.
Also add some diagnostics when starting lttng-sessiond, to make that
easier to replicate by hand.
It's not perfect, if an argument contains some spaces, the diag output
will not be quoted properly, so you won't be able to copy paste the
command directly. But from what I saw, a lot of things in our testsuite
would not handle spaces (in session names for example) properly, so it's
not likely to happen often.
Here's an example of the result:
$ ./tests/regression/ust/multi-lib/test_multi_lib
1..55
# UST - Dynamic loading and unloading of libraries
# export LTTNG_SESSION_CONFIG_XSD_PATH=/home/smarchi/build/lttng-tools/tests/../src/common/config/
# env /home/smarchi/build/lttng-tools/tests/../src/bin/lttng-sessiond/lttng-sessiond --background --consumerd64-path=/home/smarchi/build/lttng-tools/tests/../src/bin/lttng-consumerd/lttng-consumerd 1
ok 1 - Start session daemon
# ./tests/regression/ust/multi-lib//../../../../src/bin/lttng/lttng create multi_lib -o /tmp/tmp.test_multi_lib_ust_trace_path.SRYlHj
ok 2 - Create session multi_lib in -o /tmp/tmp.test_multi_lib_ust_trace_path.SRYlHj
# dlopen 2 providers, same event name, same payload
# ./tests/regression/ust/multi-lib//../../../../src/bin/lttng/lttng enable-event multi:tp -s multi_lib -u
ok 3 - Enable ust event multi:tp for session multi_lib
# ./tests/regression/ust/multi-lib//../../../../src/bin/lttng/lttng start multi_lib
ok 4 - Start tracing for session multi_lib
# ./tests/regression/ust/multi-lib//../../../../src/bin/lttng/lttng stop multi_lib
ok 5 - Stop lttng tracing for session multi_lib
ok 6 - Trace match with 2 event multi:tp
ok 7 - Metadata match with the metadata of 1 event(s) named multi:tp
# ./tests/regression/ust/multi-lib//../../../../src/bin/lttng/lttng destroy multi_lib
ok 8 - Destroy session multi_lib
# ./tests/regression/ust/multi-lib//../../../../src/bin/lttng/lttng create multi_lib -o /tmp/tmp.test_multi_lib_ust_trace_path.dQ0kMN
ok 9 - Create session multi_lib in -o /tmp/tmp.test_multi_lib_ust_trace_path.dQ0kMN
# dlopen 2 providers, same event name, different payload
# ./tests/regression/ust/multi-lib//../../../../src/bin/lttng/lttng enable-event multi:tp -s multi_lib -u
ok 10 - Enable ust event multi:tp for session multi_lib
...
Change-Id: I312fc0890a2dfaedf199b9021baebac8d3bf632b
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
This page took 0.025319 seconds and 4 git commands to generate.