From 2ed07e9727517de5f57bc9b3aaf6aaeb8836520c Mon Sep 17 00:00:00 2001 From: orbea Date: Thu, 13 May 2021 10:47:06 -0700 Subject: [PATCH] build: Use liblttng-sessiond-common.la instead of SESSIOND_OBJS MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This allows correctly linking test_session and test_ust_data with slibtool. Signed-off-by: orbea Signed-off-by: Jérémie Galarneau Change-Id: I5c18187e4185218db337ac3548f0d44fb60501f3 --- tests/unit/Makefile.am | 78 +------------------------------------- tests/unit/test_session.c | 5 --- tests/unit/test_ust_data.c | 5 --- 3 files changed, 2 insertions(+), 86 deletions(-) diff --git a/tests/unit/Makefile.am b/tests/unit/Makefile.am index b3bfffff3..7ff30d266 100644 --- a/tests/unit/Makefile.am +++ b/tests/unit/Makefile.am @@ -81,73 +81,10 @@ endif test_uri_SOURCES = test_uri.c test_uri_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBHASHTABLE) $(DL_LIBS) -# Sessiond objects -SESSIOND_OBJS = $(top_builddir)/src/bin/lttng-sessiond/buffer-registry.$(OBJEXT) \ - $(top_builddir)/src/bin/lttng-sessiond/cmd.$(OBJEXT) \ - $(top_builddir)/src/bin/lttng-sessiond/condition-internal.$(OBJEXT) \ - $(top_builddir)/src/bin/lttng-sessiond/save.$(OBJEXT) \ - $(top_builddir)/src/bin/lttng-sessiond/notification-thread-commands.$(OBJEXT) \ - $(top_builddir)/src/bin/lttng-sessiond/kernel.$(OBJEXT) \ - $(top_builddir)/src/bin/lttng-sessiond/ht-cleanup.$(OBJEXT) \ - $(top_builddir)/src/bin/lttng-sessiond/notification-thread.$(OBJEXT) \ - $(top_builddir)/src/bin/lttng-sessiond/action-executor.$(OBJEXT) \ - $(top_builddir)/src/bin/lttng-sessiond/lttng-syscall.$(OBJEXT) \ - $(top_builddir)/src/bin/lttng-sessiond/channel.$(OBJEXT) \ - $(top_builddir)/src/bin/lttng-sessiond/agent.$(OBJEXT) \ - $(top_builddir)/src/bin/lttng-sessiond/kernel-consumer.$(OBJEXT) \ - $(top_builddir)/src/bin/lttng-sessiond/trace-kernel.$(OBJEXT) \ - $(top_builddir)/src/bin/lttng-sessiond/rotation-thread.$(OBJEXT) \ - $(top_builddir)/src/bin/lttng-sessiond/context.$(OBJEXT) \ - $(top_builddir)/src/bin/lttng-sessiond/consumer.$(OBJEXT) \ - $(top_builddir)/src/bin/lttng-sessiond/utils.$(OBJEXT) \ - $(top_builddir)/src/bin/lttng-sessiond/fd-limit.$(OBJEXT) \ - $(top_builddir)/src/bin/lttng-sessiond/notification-thread-events.$(OBJEXT) \ - $(top_builddir)/src/bin/lttng-sessiond/event.$(OBJEXT) \ - $(top_builddir)/src/bin/lttng-sessiond/event-notifier-error-accounting.$(OBJEXT) \ - $(top_builddir)/src/bin/lttng-sessiond/timer.$(OBJEXT) \ - $(top_builddir)/src/bin/lttng-sessiond/snapshot.$(OBJEXT) \ - $(top_builddir)/src/bin/lttng-sessiond/sessiond-config.$(OBJEXT) \ - $(top_builddir)/src/bin/lttng-sessiond/rotate.$(OBJEXT) \ - $(top_builddir)/src/bin/lttng-sessiond/modprobe.$(OBJEXT) \ - $(top_builddir)/src/bin/lttng-sessiond/session.$(OBJEXT) \ - $(top_builddir)/src/bin/lttng-sessiond/globals.$(OBJEXT) \ - $(top_builddir)/src/bin/lttng-sessiond/thread-utils.$(OBJEXT) \ - $(top_builddir)/src/bin/lttng-sessiond/process-utils.$(OBJEXT) \ - $(top_builddir)/src/bin/lttng-sessiond/thread.$(OBJEXT) \ - $(top_builddir)/src/bin/lttng-sessiond/tracker.$(OBJEXT) \ - $(top_builddir)/src/bin/lttng-sessiond/trigger-error-query.$(OBJEXT) \ - $(top_builddir)/src/common/libcommon.la \ - $(top_builddir)/src/common/testpoint/libtestpoint.la \ - $(top_builddir)/src/common/compat/libcompat.la \ - $(top_builddir)/src/common/health/libhealth.la \ - $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la - -if HAVE_LIBLTTNG_UST_CTL -SESSIOND_OBJS += $(top_builddir)/src/bin/lttng-sessiond/trace-ust.$(OBJEXT) \ - $(top_builddir)/src/bin/lttng-sessiond/ust-registry.$(OBJEXT) \ - $(top_builddir)/src/bin/lttng-sessiond/ust-app.$(OBJEXT) \ - $(top_builddir)/src/bin/lttng-sessiond/ust-consumer.$(OBJEXT) \ - $(top_builddir)/src/bin/lttng-sessiond/notify-apps.$(OBJEXT) \ - $(top_builddir)/src/bin/lttng-sessiond/ust-metadata.$(OBJEXT) \ - $(top_builddir)/src/bin/lttng-sessiond/agent-thread.$(OBJEXT) \ - $(top_builddir)/src/bin/lttng-sessiond/ust-field-utils.$(OBJEXT) -endif - RELAYD_OBJS = $(top_builddir)/src/bin/lttng-relayd/backward-compatibility-group-by.$(OBJEXT) test_session_SOURCES = test_session.c -test_session_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM) \ - $(LIBHASHTABLE) $(DL_LIBS) -lrt $(URCU_LIBS) \ - $(KMOD_LIBS) \ - $(top_builddir)/src/lib/lttng-ctl/liblttng-ctl.la \ - $(top_builddir)/src/common/kernel-ctl/libkernel-ctl.la \ - $(top_builddir)/src/common/compat/libcompat.la \ - $(top_builddir)/src/common/testpoint/libtestpoint.la \ - $(top_builddir)/src/common/health/libhealth.la \ - $(top_builddir)/src/common/config/libconfig.la \ - $(top_builddir)/src/common/string-utils/libstring-utils.la - -test_session_LDADD += $(SESSIOND_OBJS) +test_session_LDADD = $(LIBTAP) $(LIBLTTNG_SESSIOND_COMMON) $(DL_LIBS) if HAVE_LIBLTTNG_UST_CTL test_session_SOURCES += ust-sigbus.c @@ -157,18 +94,7 @@ endif # UST data structures unit test if HAVE_LIBLTTNG_UST_CTL test_ust_data_SOURCES = test_ust_data.c -test_ust_data_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM) \ - $(LIBHASHTABLE) $(DL_LIBS) -lrt $(URCU_LIBS) \ - $(UST_CTL_LIBS) \ - $(KMOD_LIBS) \ - $(top_builddir)/src/lib/lttng-ctl/liblttng-ctl.la \ - $(top_builddir)/src/common/kernel-ctl/libkernel-ctl.la \ - $(top_builddir)/src/common/compat/libcompat.la \ - $(top_builddir)/src/common/testpoint/libtestpoint.la \ - $(top_builddir)/src/common/health/libhealth.la \ - $(top_builddir)/src/common/config/libconfig.la \ - $(top_builddir)/src/common/string-utils/libstring-utils.la -test_ust_data_LDADD += $(SESSIOND_OBJS) +test_ust_data_LDADD = $(LIBTAP) $(LIBLTTNG_SESSIOND_COMMON) $(DL_LIBS) endif test_kernel_data_SOURCES = test_kernel_data.c diff --git a/tests/unit/test_session.c b/tests/unit/test_session.c index e6d9ec8bc..675f710ae 100644 --- a/tests/unit/test_session.c +++ b/tests/unit/test_session.c @@ -35,11 +35,6 @@ static struct ltt_session_list *session_list; -/* For error.h */ -int lttng_opt_quiet = 1; -int lttng_opt_verbose = 0; -int lttng_opt_mi; - static const char alphanum[] = "0123456789" "ABCDEFGHIJKLMNOPQRSTUVWXYZ" diff --git a/tests/unit/test_ust_data.c b/tests/unit/test_ust_data.c index 87da5b4b6..1fc74fc33 100644 --- a/tests/unit/test_ust_data.c +++ b/tests/unit/test_ust_data.c @@ -35,11 +35,6 @@ DEFINE_LTTNG_UST_SIGBUS_STATE(); -/* For error.h */ -int lttng_opt_quiet = 1; -int lttng_opt_verbose; -int lttng_opt_mi; - static const char alphanum[] = "0123456789" "ABCDEFGHIJKLMNOPQRSTUVWXYZ" -- 2.34.1