Clean-up: move global sessiond symbols out of main.o
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 14 Nov 2018 20:32:24 +0000 (15:32 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 16 Nov 2018 18:49:51 +0000 (13:49 -0500)
commita7333da73c2083281c5ec833d041b7acf0d10d0b
tree2d1b9778b053c42ee652c249c49ecd9bd827ad3c
parentc6db3843828a8fbf08444a2bc4191291a4807936
Clean-up: move global sessiond symbols out of main.o

The global symbols defined in main.c prevent the use of numerous
functions from various other files. For instance, using timer.h
utils from session.o forces the redefinition of symbols that
are defined in main.o in the session unit tests.

This is a problem that has often occured in the past, more or less
forcing the unit tests to link against all sessiond objects. Moving
the global symbols to their own files (thread-utils.c,
process-utils.c, globals.c, and ready.c) does not solve this problem,
but it allows the unit tests to link against their resulting
objects and forego the stub-ing of symbols.

In the future, we could consider moving most the session daemon
to an internal library which could be re-used by the unit tests.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
13 files changed:
src/bin/lttng-sessiond/Makefile.am
src/bin/lttng-sessiond/globals.c [new file with mode: 0644]
src/bin/lttng-sessiond/lttng-sessiond.h
src/bin/lttng-sessiond/main.c
src/bin/lttng-sessiond/process-utils.c [new file with mode: 0644]
src/bin/lttng-sessiond/ready.c [new file with mode: 0644]
src/bin/lttng-sessiond/rotation-thread.c
src/bin/lttng-sessiond/rotation-thread.h
src/bin/lttng-sessiond/session.c
src/bin/lttng-sessiond/thread-utils.c [new file with mode: 0644]
tests/regression/tools/live/Makefile.am
tests/regression/tools/live/live_test.c
tests/unit/Makefile.am
This page took 0.034732 seconds and 4 git commands to generate.