Tests: Add Python test_utils module

Basic Python test framework based on the lttng-tools Python bindings
that facilitates the creation of a tracing session saving its trace in
a temporary location, the activation of events in the UST domain and
clean teardown of the test session.

Also provides basic TAP output facilities.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Tests: Add "linking" ust regression test

Based on the "demo" test formerly part of lttng-ust. Tests userspace
tracing with directly, statically and dynamically linked providers. Also
meant as an exemple of building and tracing an application with all
types of provider linking.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Tests: Add "daemon" ust regression test

Based on the "daemon" test formerly part of lttng-ust.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Tests: Add "exit-fast" ust regression test

Based on the "exit-fast" test formerly part of lttng-ust.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Tests: Add "fork" ust regression test

Based on the "fork" test formerly part of lttng-ust.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Tests: Add "libc-wrapper" ust regression test

Based on the "test-libustinstr-malloc" test formerly part of lttng-ust.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Add optional Python >= 3.0 dependency to README

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Fix: Run tests requiring the python bindings only when they are enabled

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Fix: Add test scripts and lists to the distribution package

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Tests: Fix nprocesses applications shutdown

The nprocesses test is using the SIGPIPE signal to shutdown the spawned
child applications. This is done in order to silence the shell message
such as this one:

"nprocesses/test_nprocesses: line 79: 26458 Terminated"

This mechanism is broken on systems where the SIGPIPE default handler is
overriden (thus no application shutdown occurs) in the executing
environment. This could lead to stale applications polluting the system
and causing heratic behavior in subsequent tests.

This commit add a loop and check that all the spawned applications have
been successfully killed.

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>