sessiond: Implement kernel event notifier error counter
[lttng-tools.git] / tests / unit / Makefile.am
... / ...
CommitLineData
1# SPDX-License-Identifier: GPL-2.0-only
2
3SUBDIRS = ini_config
4
5AM_CPPFLAGS += -I$(top_srcdir)/tests/utils/ -I$(srcdir)
6
7LOG_DRIVER_FLAGS='--merge'
8LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \
9 $(top_srcdir)/config/tap-driver.sh
10
11TESTS = \
12 ini_config/test_ini_config \
13 test_buffer_view \
14 test_directory_handle \
15 test_event_expr_to_bytecode \
16 test_event_rule \
17 test_fd_tracker \
18 test_kernel_data \
19 test_kernel_probe \
20 test_log_level_rule \
21 test_notification \
22 test_payload \
23 test_relayd_backward_compat_group_by_session \
24 test_session \
25 test_string_utils \
26 test_unix_socket \
27 test_uri \
28 test_utils_compat_poll \
29 test_utils_compat_pthread \
30 test_utils_expand_path \
31 test_utils_parse_size_suffix \
32 test_utils_parse_time_suffix \
33 test_uuid
34
35LIBTAP=$(top_builddir)/tests/utils/tap/libtap.la
36
37LIBCOMMON=$(top_builddir)/src/common/libcommon.la
38LIBSTRINGUTILS=$(top_builddir)/src/common/string-utils/libstring-utils.la
39LIBFDTRACKER=$(top_builddir)/src/common/fd-tracker/libfd-tracker.la
40LIBSESSIOND_COMM=$(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la
41LIBHASHTABLE=$(top_builddir)/src/common/hashtable/libhashtable.la
42LIBRELAYD=$(top_builddir)/src/common/relayd/librelayd.la
43LIBLTTNG_CTL=$(top_builddir)/src/lib/lttng-ctl/liblttng-ctl.la
44
45# Define test programs
46noinst_PROGRAMS = \
47 test_buffer_view \
48 test_condition \
49 test_directory_handle \
50 test_event_expr_to_bytecode \
51 test_event_rule \
52 test_fd_tracker \
53 test_kernel_data \
54 test_kernel_probe \
55 test_log_level_rule \
56 test_notification \
57 test_payload \
58 test_relayd_backward_compat_group_by_session \
59 test_session \
60 test_string_utils \
61 test_unix_socket \
62 test_uri \
63 test_utils_compat_poll \
64 test_utils_compat_pthread \
65 test_utils_expand_path \
66 test_utils_parse_size_suffix \
67 test_utils_parse_time_suffix \
68 test_uuid
69
70if HAVE_LIBLTTNG_UST_CTL
71noinst_PROGRAMS += test_ust_data
72TESTS += test_ust_data
73endif
74
75# URI unit tests
76test_uri_SOURCES = test_uri.c
77test_uri_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBHASHTABLE) $(DL_LIBS)
78
79# Sessiond objects
80SESSIOND_OBJS = $(top_builddir)/src/bin/lttng-sessiond/buffer-registry.$(OBJEXT) \
81 $(top_builddir)/src/bin/lttng-sessiond/cmd.$(OBJEXT) \
82 $(top_builddir)/src/bin/lttng-sessiond/condition-internal.$(OBJEXT) \
83 $(top_builddir)/src/bin/lttng-sessiond/save.$(OBJEXT) \
84 $(top_builddir)/src/bin/lttng-sessiond/notification-thread-commands.$(OBJEXT) \
85 $(top_builddir)/src/bin/lttng-sessiond/kernel.$(OBJEXT) \
86 $(top_builddir)/src/bin/lttng-sessiond/ht-cleanup.$(OBJEXT) \
87 $(top_builddir)/src/bin/lttng-sessiond/notification-thread.$(OBJEXT) \
88 $(top_builddir)/src/bin/lttng-sessiond/action-executor.$(OBJEXT) \
89 $(top_builddir)/src/bin/lttng-sessiond/lttng-syscall.$(OBJEXT) \
90 $(top_builddir)/src/bin/lttng-sessiond/channel.$(OBJEXT) \
91 $(top_builddir)/src/bin/lttng-sessiond/agent.$(OBJEXT) \
92 $(top_builddir)/src/bin/lttng-sessiond/kernel-consumer.$(OBJEXT) \
93 $(top_builddir)/src/bin/lttng-sessiond/trace-kernel.$(OBJEXT) \
94 $(top_builddir)/src/bin/lttng-sessiond/rotation-thread.$(OBJEXT) \
95 $(top_builddir)/src/bin/lttng-sessiond/context.$(OBJEXT) \
96 $(top_builddir)/src/bin/lttng-sessiond/consumer.$(OBJEXT) \
97 $(top_builddir)/src/bin/lttng-sessiond/utils.$(OBJEXT) \
98 $(top_builddir)/src/bin/lttng-sessiond/fd-limit.$(OBJEXT) \
99 $(top_builddir)/src/bin/lttng-sessiond/notification-thread-events.$(OBJEXT) \
100 $(top_builddir)/src/bin/lttng-sessiond/event.$(OBJEXT) \
101 $(top_builddir)/src/bin/lttng-sessiond/event-notifier-error-accounting.$(OBJEXT) \
102 $(top_builddir)/src/bin/lttng-sessiond/timer.$(OBJEXT) \
103 $(top_builddir)/src/bin/lttng-sessiond/snapshot.$(OBJEXT) \
104 $(top_builddir)/src/bin/lttng-sessiond/sessiond-config.$(OBJEXT) \
105 $(top_builddir)/src/bin/lttng-sessiond/rotate.$(OBJEXT) \
106 $(top_builddir)/src/bin/lttng-sessiond/modprobe.$(OBJEXT) \
107 $(top_builddir)/src/bin/lttng-sessiond/session.$(OBJEXT) \
108 $(top_builddir)/src/bin/lttng-sessiond/globals.$(OBJEXT) \
109 $(top_builddir)/src/bin/lttng-sessiond/thread-utils.$(OBJEXT) \
110 $(top_builddir)/src/bin/lttng-sessiond/process-utils.$(OBJEXT) \
111 $(top_builddir)/src/bin/lttng-sessiond/thread.$(OBJEXT) \
112 $(top_builddir)/src/bin/lttng-sessiond/tracker.$(OBJEXT) \
113 $(top_builddir)/src/common/libcommon.la \
114 $(top_builddir)/src/common/testpoint/libtestpoint.la \
115 $(top_builddir)/src/common/compat/libcompat.la \
116 $(top_builddir)/src/common/health/libhealth.la \
117 $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la
118
119if HAVE_LIBLTTNG_UST_CTL
120SESSIOND_OBJS += $(top_builddir)/src/bin/lttng-sessiond/trace-ust.$(OBJEXT) \
121 $(top_builddir)/src/bin/lttng-sessiond/ust-registry.$(OBJEXT) \
122 $(top_builddir)/src/bin/lttng-sessiond/ust-app.$(OBJEXT) \
123 $(top_builddir)/src/bin/lttng-sessiond/ust-consumer.$(OBJEXT) \
124 $(top_builddir)/src/bin/lttng-sessiond/notify-apps.$(OBJEXT) \
125 $(top_builddir)/src/bin/lttng-sessiond/ust-metadata.$(OBJEXT) \
126 $(top_builddir)/src/bin/lttng-sessiond/agent-thread.$(OBJEXT) \
127 $(top_builddir)/src/bin/lttng-sessiond/ust-field-utils.$(OBJEXT)
128endif
129
130RELAYD_OBJS = $(top_builddir)/src/bin/lttng-relayd/backward-compatibility-group-by.$(OBJEXT)
131
132test_session_SOURCES = test_session.c
133test_session_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM) \
134 $(LIBHASHTABLE) $(DL_LIBS) -lrt $(URCU_LIBS) \
135 $(KMOD_LIBS) \
136 $(top_builddir)/src/lib/lttng-ctl/liblttng-ctl.la \
137 $(top_builddir)/src/common/kernel-ctl/libkernel-ctl.la \
138 $(top_builddir)/src/common/compat/libcompat.la \
139 $(top_builddir)/src/common/testpoint/libtestpoint.la \
140 $(top_builddir)/src/common/health/libhealth.la \
141 $(top_builddir)/src/common/config/libconfig.la \
142 $(top_builddir)/src/common/string-utils/libstring-utils.la
143
144test_session_LDADD += $(SESSIOND_OBJS)
145
146if HAVE_LIBLTTNG_UST_CTL
147test_session_LDADD += $(UST_CTL_LIBS)
148endif
149
150# UST data structures unit test
151if HAVE_LIBLTTNG_UST_CTL
152test_ust_data_SOURCES = test_ust_data.c
153test_ust_data_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM) \
154 $(LIBHASHTABLE) $(DL_LIBS) -lrt $(URCU_LIBS) \
155 $(UST_CTL_LIBS) \
156 $(KMOD_LIBS) \
157 $(top_builddir)/src/lib/lttng-ctl/liblttng-ctl.la \
158 $(top_builddir)/src/common/kernel-ctl/libkernel-ctl.la \
159 $(top_builddir)/src/common/compat/libcompat.la \
160 $(top_builddir)/src/common/testpoint/libtestpoint.la \
161 $(top_builddir)/src/common/health/libhealth.la \
162 $(top_builddir)/src/common/config/libconfig.la \
163 $(top_builddir)/src/common/string-utils/libstring-utils.la
164test_ust_data_LDADD += $(SESSIOND_OBJS)
165endif
166
167# Kernel data structures unit test
168KERN_DATA_TRACE=$(top_builddir)/src/bin/lttng-sessiond/trace-kernel.$(OBJEXT) \
169 $(top_builddir)/src/common/compat/libcompat.la \
170 $(top_builddir)/src/bin/lttng-sessiond/consumer.$(OBJEXT) \
171 $(top_builddir)/src/bin/lttng-sessiond/globals.$(OBJEXT) \
172 $(top_builddir)/src/bin/lttng-sessiond/utils.$(OBJEXT) \
173 $(top_builddir)/src/bin/lttng-sessiond/tracker.$(OBJEXT) \
174 $(top_builddir)/src/common/health/libhealth.la \
175 $(top_builddir)/src/bin/lttng-sessiond/notification-thread-commands.$(OBJEXT) \
176 $(LIBLTTNG_CTL)
177
178test_kernel_data_SOURCES = test_kernel_data.c
179test_kernel_data_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM) \
180 $(LIBHASHTABLE) $(DL_LIBS) -lrt
181test_kernel_data_LDADD += $(KERN_DATA_TRACE)
182
183# utils suffix for unit test
184
185# parse_size_suffix unit test
186test_utils_parse_size_suffix_SOURCES = test_utils_parse_size_suffix.c
187test_utils_parse_size_suffix_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON) $(DL_LIBS)
188
189# parse_time_suffix unit test
190test_utils_parse_time_suffix_SOURCES = test_utils_parse_time_suffix.c
191test_utils_parse_time_suffix_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON)
192
193# compat_poll unit test
194test_utils_compat_poll_SOURCES = test_utils_compat_poll.c
195test_utils_compat_poll_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(DL_LIBS) \
196 $(top_builddir)/src/common/compat/libcompat.la $(LIBCOMMON)
197
198# compat_pthread unit test
199test_utils_compat_pthread_SOURCES = test_utils_compat_pthread.c
200test_utils_compat_pthread_LDADD = $(LIBTAP) \
201 $(top_builddir)/src/common/compat/libcompat.la $(LIBCOMMON)
202
203# expand_path unit test
204test_utils_expand_path_SOURCES = test_utils_expand_path.c
205test_utils_expand_path_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON) $(DL_LIBS)
206
207# directory handle unit test
208test_directory_handle_SOURCES = test_directory_handle.c
209test_directory_handle_LDADD = $(LIBTAP) $(LIBHASHTABLE) $(LIBCOMMON) $(DL_LIBS)
210
211# string utilities unit test
212test_string_utils_SOURCES = test_string_utils.c
213test_string_utils_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBSTRINGUTILS) $(DL_LIBS)
214
215# Notification api
216test_notification_SOURCES = test_notification.c
217test_notification_LDADD = $(LIBTAP) $(LIBLTTNG_CTL) $(DL_LIBS)
218
219# Event rule api
220test_event_rule_SOURCES = test_event_rule.c
221test_event_rule_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBLTTNG_CTL) $(DL_LIBS) \
222 $(top_builddir)/src/bin/lttng/lttng-loglevel.$(OBJEXT)
223
224# Condition api
225test_condition_SOURCES = test_condition.c
226test_condition_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBLTTNG_CTL) $(DL_LIBS)
227
228# relayd backward compat for groou-by-session utilities
229test_relayd_backward_compat_group_by_session_SOURCES = test_relayd_backward_compat_group_by_session.c
230test_relayd_backward_compat_group_by_session_LDADD = $(LIBTAP) $(LIBCOMMON) $(RELAYD_OBJS)
231test_relayd_backward_compat_group_by_session_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/src/bin/lttng-relayd
232
233# fd tracker unit test
234test_fd_tracker_SOURCES = test_fd_tracker.c
235test_fd_tracker_LDADD = $(LIBTAP) $(LIBFDTRACKER) $(DL_LIBS) $(URCU_LIBS) $(LIBCOMMON) $(LIBHASHTABLE)
236
237# uuid unit test
238test_uuid_SOURCES = test_uuid.c
239test_uuid_LDADD = $(LIBTAP) $(LIBCOMMON)
240
241# buffer view unit test
242test_buffer_view_SOURCES = test_buffer_view.c
243test_buffer_view_LDADD = $(LIBTAP) $(LIBCOMMON)
244
245# payload unit test
246test_payload_SOURCES = test_payload.c
247test_payload_LDADD = $(LIBTAP) $(LIBSESSIOND_COMM) $(LIBCOMMON)
248
249# unix socket test
250test_unix_socket_SOURCES = test_unix_socket.c
251test_unix_socket_LDADD = $(LIBTAP) $(LIBSESSIOND_COMM) $(LIBCOMMON)
252
253# Kernel probe location api test
254test_kernel_probe_SOURCES = test_kernel_probe.c
255test_kernel_probe_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBLTTNG_CTL) $(DL_LIBS)
256#
257# Event expression to bytecode test
258test_event_expr_to_bytecode_SOURCES = test_event_expr_to_bytecode.c
259test_event_expr_to_bytecode_LDADD = $(LIBTAP) $(LIBLTTNG_CTL) $(LIBCOMMON)
260
261# Log level rule api
262test_log_level_rule_SOURCES = test_log_level_rule.c
263test_log_level_rule_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBLTTNG_CTL) $(DL_LIBS)
This page took 0.02666 seconds and 5 git commands to generate.