Add sessiond/SESSIOND_ prefix to sessiond testpoints

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
relayd: add LTTNG_RELAYD_HEALTH env var

Allow override of path leading to health check named pipe.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
health check: change --relayd-path arg to --relayd-path=arg

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Test health: add test_thread_ok

Tests sessiond, consumerd (UST+kernel) and relayd health "ok" case in
simple scenarios.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Fix health check: signal parent before exit testpoint

We need to signal parent for readiness before hitting the thread exit
testpoint, otherwise we hang the test.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fix: consumerd should initialize lttcomm

Missing initialization makes the consumer daemon not care about the
env. var. specifying the timeouts.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fix: consumerd: only return readiness when health is ready

Wait for health check to be ready before returning readiness to session
daemon.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fix: consumerd: use DBG rather than DBG2

DBG2 is never visible.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fix: tests: wait for consumerd to complete

Wait for consumerd to complete when stopping sessiond.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Add daemonize() to libcommon

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cleanup: lttng-ctl-health comment

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fix: consumerd: HT init/teardown with program

Hash tables shared between threads should not be initialized by a
specific thread, because the other threads could start using it before
it is initialized.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Consumer: add testpoints

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fix: relayd: initialize lttcomm inet

Not doing so does not take into account env. var. timeouts.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fix: sessiond: wait for health check readiness

Wait for health check readiness before notifying the parent.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Use lib common daemonize

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
sessiond: add --background argument

Allow starting sessiond like --daemonize, but keeps console open.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
tests: use --background for session daemon

Will now show errors when they happen.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
sessiond: add missing testpoints

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
lttng-relayd: implement background cmd line option

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>