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 22:23:34 +0000 (17:23 -0500)
commit51bb4dbbf2f178f09802c8aacaa7c68b1891d6fb
tree81d1b1ea8a27a2211849065ea934adc0e55ee49d
parent547333b5541338636b5ed42066f6be70829ec351
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.036084 seconds and 4 git commands to generate.