From: Mathieu Desnoyers Date: Fri, 20 Oct 2023 20:39:40 +0000 (-0400) Subject: Introduce LTTNG_UST_CTL_PATH environment variable X-Git-Url: http://git.lttng.org./?a=commitdiff_plain;h=8f896827f04943c99eafd5869def13bca657a6b9;p=lttng-tools.git Introduce LTTNG_UST_CTL_PATH environment variable Example use to trace lttng-sessiond (tracee) with another lttng-sessiond (tracer): ``` mkdir /tmp/tracer-ust mkdir /tmp/tracee-ust mkdir /tmp/tracer-home mkdir /tmp/tracee-home LTTNG_HOME=/tmp/tracer-home LTTNG_UST_CTL_PATH=/tmp/tracer-ust lttng-sessiond --daemon LTTNG_HOME=/tmp/tracee-home LTTNG_UST_CTL_PATH=/tmp/tracee-ust \ LTTNG_UST_APP_PATH=/tmp/tracer-ust \ LD_PRELOAD=/usr/local/lib/liblttng-ust-fork.so:/usr/local/lib/liblttng-ust-fd.so \ lttng-sessiond --daemon ``` * Control the tracer sessiond by setting LTTNG_HOME=/tmp/tracer-home * Control the tracee sessiond by setting LTTNG_HOME=/tmp/tracee-home * Run an application traced by the tracee sessiond ``` LTTNG_UST_APP_PATH=/tmp/tracee-ust myapp ``` * Run an application traced by the tracer sessiond ``` LTTNG_UST_APP_PATH=/tmp/tracer-ust myapp ``` Signed-off-by: Mathieu Desnoyers Signed-off-by: Jérémie Galarneau Change-Id: Ifcd05c366004b5fc0a4a362ad3556d7e6d8658b1 --- diff --git a/src/bin/lttng-crash/Makefile.am b/src/bin/lttng-crash/Makefile.am index 59a5bfa0c..f57d1a59c 100644 --- a/src/bin/lttng-crash/Makefile.am +++ b/src/bin/lttng-crash/Makefile.am @@ -11,4 +11,5 @@ bin_PROGRAMS = lttng-crash lttng_crash_SOURCES = lttng-crash.cpp lttng_crash_LDADD = $(top_builddir)/src/common/libcommon-gpl.la \ - $(top_builddir)/src/common/libconfig.la + $(top_builddir)/src/common/libconfig.la \ + $(top_builddir)/src/vendor/fmt/libfmt.la diff --git a/src/bin/lttng-sessiond/register.cpp b/src/bin/lttng-sessiond/register.cpp index 0191adc94..80cd830f0 100644 --- a/src/bin/lttng-sessiond/register.cpp +++ b/src/bin/lttng-sessiond/register.cpp @@ -92,7 +92,8 @@ static int notify_ust_apps(int active, bool is_root) DBG("Notifying applications of session daemon state: %d", active); /* See shm.c for this call implying mmap, shm and futex calls */ - wait_shm_mmap = shm_ust_get_mmap(the_config.wait_shm_path.value, is_root); + wait_shm_mmap = shm_ust_get_mmap( + the_config.wait_shm.path.value, the_config.wait_shm.is_regular_path, is_root); if (wait_shm_mmap == nullptr) { goto error; } diff --git a/src/bin/lttng-sessiond/sessiond-config.cpp b/src/bin/lttng-sessiond/sessiond-config.cpp index 037488b8a..774a2c143 100644 --- a/src/bin/lttng-sessiond/sessiond-config.cpp +++ b/src/bin/lttng-sessiond/sessiond-config.cpp @@ -45,7 +45,7 @@ static struct sessiond_config sessiond_config_build_defaults = { .apps_unix_sock_path = { nullptr, false }, .client_unix_sock_path = { nullptr, false }, - .wait_shm_path = { nullptr, false }, + .wait_shm = { false, {nullptr, false}}, .health_unix_sock_path = { nullptr, false }, .lttng_ust_clock_plugin = { nullptr, false }, .pid_file_path = { nullptr, false }, @@ -153,6 +153,42 @@ end: return ret; } +static int config_set_ust_ctl_paths(struct sessiond_config *config, + const char *lttng_ust_ctl_path_override) +{ + char *str; + int ret; + + ret = asprintf(&str, "%s/%s", lttng_ust_ctl_path_override, LTTNG_UST_SOCK_FILENAME); + if (ret < 0) { + ERR("Failed to set default ust_ctl unix socket path"); + return ret; + } + + config_string_set(&config->apps_unix_sock_path, str); + str = nullptr; + ret = asprintf(&str, "%s/%s", lttng_ust_ctl_path_override, LTTNG_UST_WAIT_FILENAME); + if (ret < 0) { + ERR("Failed to set default ust_ctl wait shm path"); + return ret; + } + + config->wait_shm.is_regular_path = true; + config_string_set(&config->wait_shm.path, str); + str = nullptr; + + ret = asprintf( + &str, "%s/%s", lttng_ust_ctl_path_override, DEFAULT_LTTNG_SESSIOND_AGENTPORT_FILE); + if (ret < 0) { + ERR("Failed to set ust_ctl agent port file path"); + return ret; + } + + config_string_set(&config->agent_port_file_path, str); + str = nullptr; + return 0; +} + static int config_set_paths_root(struct sessiond_config *config) { int ret = 0; @@ -165,8 +201,8 @@ static int config_set_paths_root(struct sessiond_config *config) } config_string_set_static(&config->apps_unix_sock_path, DEFAULT_GLOBAL_APPS_UNIX_SOCK); + config_string_set_static(&config->wait_shm.path, DEFAULT_GLOBAL_APPS_WAIT_SHM_PATH); config_string_set_static(&config->client_unix_sock_path, DEFAULT_GLOBAL_CLIENT_UNIX_SOCK); - config_string_set_static(&config->wait_shm_path, DEFAULT_GLOBAL_APPS_WAIT_SHM_PATH); config_string_set_static(&config->health_unix_sock_path, DEFAULT_GLOBAL_HEALTH_UNIX_SOCK); end: return ret; @@ -201,23 +237,24 @@ static int config_set_paths_non_root(struct sessiond_config *config) ERR("Failed to set default home apps unix socket path"); goto end; } + config_string_set(&config->apps_unix_sock_path, str); str = nullptr; - - ret = asprintf(&str, DEFAULT_HOME_CLIENT_UNIX_SOCK, home_path); + ret = asprintf(&str, DEFAULT_HOME_APPS_WAIT_SHM_PATH, getuid()); if (ret < 0) { - ERR("Failed to set default home client unix socket path"); + ERR("Failed to set default home apps wait shm path"); goto end; } - config_string_set(&config->client_unix_sock_path, str); + + config_string_set(&config->wait_shm.path, str); str = nullptr; - ret = asprintf(&str, DEFAULT_HOME_APPS_WAIT_SHM_PATH, getuid()); + ret = asprintf(&str, DEFAULT_HOME_CLIENT_UNIX_SOCK, home_path); if (ret < 0) { - ERR("Failed to set default home apps wait shm path"); + ERR("Failed to set default home client unix socket path"); goto end; } - config_string_set(&config->wait_shm_path, str); + config_string_set(&config->client_unix_sock_path, str); str = nullptr; ret = asprintf(&str, DEFAULT_HOME_HEALTH_UNIX_SOCK, home_path); @@ -235,6 +272,7 @@ end: int sessiond_config_init(struct sessiond_config *config) { + const char *lttng_ust_ctl_path_override = utils_get_lttng_ust_ctl_path_override_dir(); int ret; const bool is_root = (getuid() == 0); char *str; @@ -251,6 +289,30 @@ int sessiond_config_init(struct sessiond_config *config) goto error; } + if (lttng_ust_ctl_path_override) { + /* + * Since a ustctl path override has been specified, re-evaluate the following paths + * to take it into account: + * - apps_unix_sock_path + * - wait_shm_path + * - agent_port_file_path + */ + ret = config_set_ust_ctl_paths(config, lttng_ust_ctl_path_override); + if (ret < 0) { + goto error; + } + } else { + ret = asprintf( + &str, "%s/%s", config->rundir.value, DEFAULT_LTTNG_SESSIOND_AGENTPORT_FILE); + if (ret < 0) { + ERR("Failed to set agent port file path"); + goto error; + } + + config_string_set(&config->agent_port_file_path, str); + str = nullptr; + } + /* 32 bits consumerd path setup */ ret = asprintf(&str, DEFAULT_USTCONSUMERD32_PATH, config->rundir.value); if (ret < 0) { @@ -342,14 +404,6 @@ int sessiond_config_init(struct sessiond_config *config) config_string_set(&config->lock_file_path, str); str = nullptr; - ret = asprintf(&str, "%s/%s", config->rundir.value, DEFAULT_LTTNG_SESSIOND_AGENTPORT_FILE); - if (ret < 0) { - ERR("Failed to set agent port file path"); - goto error; - } - config_string_set(&config->agent_port_file_path, str); - str = nullptr; - /* * Allow INSTALL_BIN_PATH to be used as a target path for the * native architecture size consumer if CONFIG_CONSUMER*_PATH @@ -381,7 +435,7 @@ void sessiond_config_fini(struct sessiond_config *config) config_string_fini(&config->rundir); config_string_fini(&config->apps_unix_sock_path); config_string_fini(&config->client_unix_sock_path); - config_string_fini(&config->wait_shm_path); + config_string_fini(&config->wait_shm.path); config_string_fini(&config->health_unix_sock_path); config_string_fini(&config->lttng_ust_clock_plugin); config_string_fini(&config->pid_file_path); @@ -431,7 +485,7 @@ int sessiond_config_resolve_paths(struct sessiond_config *config) { RESOLVE_CHECK(&config->apps_unix_sock_path); RESOLVE_CHECK(&config->client_unix_sock_path); - RESOLVE_CHECK(&config->wait_shm_path); + RESOLVE_CHECK(&config->wait_shm.path); RESOLVE_CHECK(&config->health_unix_sock_path); RESOLVE_CHECK(&config->lttng_ust_clock_plugin); RESOLVE_CHECK(&config->pid_file_path); @@ -495,7 +549,7 @@ void sessiond_config_log(struct sessiond_config *config) config->apps_unix_sock_path.value ?: "Unknown"); DBG_NO_LOC("\tclient socket path: %s", config->client_unix_sock_path.value ?: "Unknown"); - DBG_NO_LOC("\twait shm path: %s", config->wait_shm_path.value ?: "Unknown"); + DBG_NO_LOC("\twait shm path: %s", config->wait_shm.path.value ?: "Unknown"); DBG_NO_LOC("\thealth socket path: %s", config->health_unix_sock_path.value ?: "Unknown"); DBG_NO_LOC("\tLTTNG_UST_CLOCK_PLUGIN: %s", diff --git a/src/bin/lttng-sessiond/sessiond-config.hpp b/src/bin/lttng-sessiond/sessiond-config.hpp index 6b98a59a7..ed009bd44 100644 --- a/src/bin/lttng-sessiond/sessiond-config.hpp +++ b/src/bin/lttng-sessiond/sessiond-config.hpp @@ -52,8 +52,20 @@ struct sessiond_config { struct config_string apps_unix_sock_path; /* Global client Unix socket path */ struct config_string client_unix_sock_path; - /* Global wait shm path for UST */ - struct config_string wait_shm_path; + struct { + /* + * Whether wait_shm is a regular file path or an shm_open parameter (false). + * The default configuration values assume the path refers to a POSIX shared memory + * object by name. + * + * When an ustctl override path is specified, the path is assumed to point to a + * regular file path. + */ + bool is_regular_path; + /* Global wait shm path for UST */ + struct config_string path; + + } wait_shm; /* Global health check unix path */ struct config_string health_unix_sock_path; /* diff --git a/src/common/Makefile.am b/src/common/Makefile.am index 499ffa9d8..6f059a1bc 100644 --- a/src/common/Makefile.am +++ b/src/common/Makefile.am @@ -438,7 +438,8 @@ libstring_utils_la_SOURCES = \ noinst_PROGRAMS = filter-grammar-test filter_grammar_test_SOURCES = filter-grammar-test.cpp -filter_grammar_test_LDADD = libcommon-gpl.la +filter_grammar_test_LDADD = libcommon-gpl.la \ + $(top_builddir)/src/vendor/fmt/libfmt.la EXTRA_DIST = \ mi-lttng-4.1.xsd \ diff --git a/src/common/defaults.hpp b/src/common/defaults.hpp index 2be3648cc..8fbe819f3 100644 --- a/src/common/defaults.hpp +++ b/src/common/defaults.hpp @@ -105,6 +105,7 @@ /* Default lttng run directory */ #define DEFAULT_LTTNG_HOME_ENV_VAR "LTTNG_HOME" #define DEFAULT_LTTNG_FALLBACK_HOME_ENV_VAR "HOME" +#define DEFAULT_LTTNG_UST_CTL_PATH_ENV_VAR "LTTNG_UST_CTL_PATH" #define DEFAULT_LTTNG_RUNDIR CONFIG_LTTNG_SYSTEM_RUNDIR #define DEFAULT_LTTNG_HOME_RUNDIR "%s/.lttng" #define DEFAULT_LTTNG_SESSIOND_PIDFILE "lttng-sessiond.pid" diff --git a/src/common/shm.cpp b/src/common/shm.cpp index deaf715a6..e55e4a7ed 100644 --- a/src/common/shm.cpp +++ b/src/common/shm.cpp @@ -20,6 +20,15 @@ #include #include +static int wait_shm_open(const char *wait_shm_path, int flags, mode_t mode, bool wait_shm_is_file) +{ + if (wait_shm_is_file) { + return open(wait_shm_path, flags, mode); + } else { + return shm_open(wait_shm_path, flags, mode); + } +} + /* * We deal with the shm_open vs ftruncate race (happening when the sessiond owns * the shm and does not let everybody modify it, to ensure safety against @@ -27,7 +36,7 @@ * seconds. For global shm, everybody has rw access to it until the sessiond * starts. */ -static int get_wait_shm(char *shm_path, size_t mmap_size, int global) +static int get_wait_shm(char *shm_path, bool wait_shm_is_file, size_t mmap_size, int global) { int wait_shm_fd, ret; mode_t mode, old_mode; @@ -79,7 +88,7 @@ static int get_wait_shm(char *shm_path, size_t mmap_size, int global) * use a now-unlinked shm, while the next application would create * a new named shm. */ - wait_shm_fd = shm_open(shm_path, O_RDWR | O_CREAT, mode); + wait_shm_fd = wait_shm_open(shm_path, O_RDWR | O_CREAT, mode, wait_shm_is_file); if (wait_shm_fd < 0) { if (errno == EACCES) { /* Work around sysctl fs.protected_regular. */ @@ -88,7 +97,7 @@ static int get_wait_shm(char *shm_path, size_t mmap_size, int global) "Attempting to open the shm without " "creating it.", shm_path); - wait_shm_fd = shm_open(shm_path, O_RDWR, mode); + wait_shm_fd = wait_shm_open(shm_path, O_RDWR, mode, wait_shm_is_file); } if (wait_shm_fd < 0) { PERROR("Failed to open \"wait\" shared memory object: path = '%s'", @@ -166,7 +175,7 @@ error: * This returned value is used by futex_wait_update() in futex.c to WAKE all * waiters which are UST application waiting for a session daemon. */ -char *shm_ust_get_mmap(char *shm_path, int global) +char *shm_ust_get_mmap(char *shm_path, bool wait_shm_is_file, int global) { size_t mmap_size; int wait_shm_fd, ret; @@ -182,7 +191,7 @@ char *shm_ust_get_mmap(char *shm_path, int global) } mmap_size = sys_page_size; - wait_shm_fd = get_wait_shm(shm_path, mmap_size, global); + wait_shm_fd = get_wait_shm(shm_path, wait_shm_is_file, mmap_size, global); if (wait_shm_fd < 0) { goto error; } diff --git a/src/common/shm.hpp b/src/common/shm.hpp index 76c81486b..ee71b60f4 100644 --- a/src/common/shm.hpp +++ b/src/common/shm.hpp @@ -9,7 +9,7 @@ #ifndef _LTT_SHM_H #define _LTT_SHM_H -char *shm_ust_get_mmap(char *shm_path, int global); +char *shm_ust_get_mmap(char *shm_path, bool wait_shm_is_file, int global); int shm_create_anonymous(const char *owner_name); diff --git a/src/common/utils.cpp b/src/common/utils.cpp index c6b9a55b1..314003330 100644 --- a/src/common/utils.cpp +++ b/src/common/utils.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -740,6 +741,23 @@ end: return val; } +/* + * Obtain the value of LTTNG_UST_CTL_PATH environment variable, if + * exists. Otherwise return NULL. + */ +const char *utils_get_lttng_ust_ctl_path_override_dir() +{ + const auto *val = lttng_secure_getenv(DEFAULT_LTTNG_UST_CTL_PATH_ENV_VAR); + if (val == nullptr) { + return nullptr; + } + + DBG_FMT("LTTng ust-ctl override path specified: {}=`{}`", + DEFAULT_LTTNG_UST_CTL_PATH_ENV_VAR, + val); + return val; +} + /* * Get user's home directory. Dynamically allocated, must be freed * by the caller. diff --git a/src/common/utils.hpp b/src/common/utils.hpp index 36cb690d4..e1ff53fc4 100644 --- a/src/common/utils.hpp +++ b/src/common/utils.hpp @@ -44,6 +44,7 @@ int utils_get_count_order_u32(uint32_t x); int utils_get_count_order_u64(uint64_t x); const char *utils_get_home_dir(); char *utils_get_user_home_dir(uid_t uid); +const char *utils_get_lttng_ust_ctl_path_override_dir(); size_t utils_get_current_time_str(const char *format, char *dst, size_t len) ATTR_FORMAT_STRFTIME(1); diff --git a/tests/unit/Makefile.am b/tests/unit/Makefile.am index bfeed35de..68828e368 100644 --- a/tests/unit/Makefile.am +++ b/tests/unit/Makefile.am @@ -78,7 +78,8 @@ endif # URI unit tests test_uri_SOURCES = test_uri.cpp -test_uri_LDADD = $(LIBTAP) $(LIBCOMMON_GPL) $(DL_LIBS) +test_uri_LDADD = $(LIBTAP) $(LIBCOMMON_GPL) $(DL_LIBS) \ + $(top_builddir)/src/vendor/fmt/libfmt.la RELAYD_OBJS = $(top_builddir)/src/bin/lttng-relayd/backward-compatibility-group-by.$(OBJEXT) @@ -103,16 +104,19 @@ test_kernel_data_LDADD = $(LIBTAP) $(LIBLTTNG_SESSIOND_COMMON) $(DL_LIBS) # parse_size_suffix unit test test_utils_parse_size_suffix_SOURCES = test_utils_parse_size_suffix.cpp -test_utils_parse_size_suffix_LDADD = $(LIBTAP) $(LIBCOMMON_GPL) $(DL_LIBS) +test_utils_parse_size_suffix_LDADD = $(LIBTAP) $(LIBCOMMON_GPL) $(DL_LIBS) \ + $(top_builddir)/src/vendor/fmt/libfmt.la # parse_time_suffix unit test test_utils_parse_time_suffix_SOURCES = test_utils_parse_time_suffix.cpp -test_utils_parse_time_suffix_LDADD = $(LIBTAP) $(LIBCOMMON_GPL) +test_utils_parse_time_suffix_LDADD = $(LIBTAP) $(LIBCOMMON_GPL) \ + $(top_builddir)/src/vendor/fmt/libfmt.la # compat_poll unit test test_utils_compat_poll_SOURCES = test_utils_compat_poll.cpp test_utils_compat_poll_LDADD = $(LIBTAP) $(DL_LIBS) \ - $(top_builddir)/src/common/libcompat.la $(LIBCOMMON_GPL) + $(top_builddir)/src/common/libcompat.la $(LIBCOMMON_GPL) \ + $(top_builddir)/src/vendor/fmt/libfmt.la # compat_pthread unit test test_utils_compat_pthread_SOURCES = test_utils_compat_pthread.cpp @@ -125,11 +129,13 @@ test_utils_expand_path_LDADD = $(LIBTAP) $(LIBCOMMON_GPL) $(DL_LIBS) # directory handle unit test test_directory_handle_SOURCES = test_directory_handle.cpp -test_directory_handle_LDADD = $(LIBTAP) $(LIBCOMMON_GPL) $(DL_LIBS) +test_directory_handle_LDADD = $(LIBTAP) $(LIBCOMMON_GPL) $(DL_LIBS) \ + $(top_builddir)/src/vendor/fmt/libfmt.la # string utilities unit test test_string_utils_SOURCES = test_string_utils.cpp -test_string_utils_LDADD = $(LIBTAP) $(LIBCOMMON_GPL) $(LIBSTRINGUTILS) $(DL_LIBS) +test_string_utils_LDADD = $(LIBTAP) $(LIBCOMMON_GPL) $(LIBSTRINGUTILS) $(DL_LIBS) \ + $(top_builddir)/src/vendor/fmt/libfmt.la # Notification api test_notification_SOURCES = test_notification.cpp @@ -138,11 +144,13 @@ test_notification_LDADD = $(LIBTAP) $(LIBLTTNG_CTL) $(DL_LIBS) # Event rule api test_event_rule_SOURCES = test_event_rule.cpp test_event_rule_LDADD = $(LIBTAP) $(LIBCOMMON_GPL) $(LIBLTTNG_CTL) $(DL_LIBS) \ - $(top_builddir)/src/bin/lttng/lttng-loglevel.$(OBJEXT) + $(top_builddir)/src/bin/lttng/lttng-loglevel.$(OBJEXT) \ + $(top_builddir)/src/vendor/fmt/libfmt.la # Condition api test_condition_SOURCES = test_condition.cpp -test_condition_LDADD = $(LIBTAP) $(LIBCOMMON_GPL) $(LIBLTTNG_CTL) $(DL_LIBS) +test_condition_LDADD = $(LIBTAP) $(LIBCOMMON_GPL) $(LIBLTTNG_CTL) $(DL_LIBS) \ + $(top_builddir)/src/vendor/fmt/libfmt.la # relayd backward compat for groou-by-session utilities test_relayd_backward_compat_group_by_session_SOURCES = test_relayd_backward_compat_group_by_session.cpp @@ -152,11 +160,13 @@ test_relayd_backward_compat_group_by_session_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_s # rate policy object unit test test_rate_policy_SOURCES = test_rate_policy.cpp test_rate_policy_LDADD = $(LIBTAP) $(LIBCOMMON_GPL) $(LIBLTTNG_CTL) $(DL_LIBS) \ - $(top_builddir)/src/bin/lttng/lttng-loglevel.$(OBJEXT) + $(top_builddir)/src/bin/lttng/lttng-loglevel.$(OBJEXT) \ + $(top_builddir)/src/vendor/fmt/libfmt.la # fd tracker unit test test_fd_tracker_SOURCES = test_fd_tracker.cpp -test_fd_tracker_LDADD = $(LIBTAP) $(LIBFDTRACKER) $(DL_LIBS) $(URCU_LIBS) $(LIBCOMMON_GPL) +test_fd_tracker_LDADD = $(LIBTAP) $(LIBFDTRACKER) $(DL_LIBS) $(URCU_LIBS) $(LIBCOMMON_GPL) \ + $(top_builddir)/src/vendor/fmt/libfmt.la # uuid unit test test_uuid_SOURCES = test_uuid.cpp @@ -169,25 +179,30 @@ test_buffer_view_LDADD = $(LIBTAP) $(LIBCOMMON_GPL) # payload unit test test_payload_SOURCES = test_payload.cpp -test_payload_LDADD = $(LIBTAP) $(LIBSESSIOND_COMM) $(LIBCOMMON_GPL) +test_payload_LDADD = $(LIBTAP) $(LIBSESSIOND_COMM) $(LIBCOMMON_GPL) \ + $(top_builddir)/src/vendor/fmt/libfmt.la # unix socket test test_unix_socket_SOURCES = test_unix_socket.cpp -test_unix_socket_LDADD = $(LIBTAP) $(LIBSESSIOND_COMM) $(LIBCOMMON_GPL) +test_unix_socket_LDADD = $(LIBTAP) $(LIBSESSIOND_COMM) $(LIBCOMMON_GPL) \ + $(top_builddir)/src/vendor/fmt/libfmt.la # Kernel probe location api test test_kernel_probe_SOURCES = test_kernel_probe.cpp -test_kernel_probe_LDADD = $(LIBTAP) $(LIBCOMMON_GPL) $(LIBLTTNG_CTL) $(DL_LIBS) -# +test_kernel_probe_LDADD = $(LIBTAP) $(LIBCOMMON_GPL) $(LIBLTTNG_CTL) $(DL_LIBS) \ + $(top_builddir)/src/vendor/fmt/libfmt.la + # Event expression to bytecode test test_event_expr_to_bytecode_SOURCES = test_event_expr_to_bytecode.cpp -test_event_expr_to_bytecode_LDADD = $(LIBTAP) $(LIBLTTNG_CTL) $(LIBCOMMON_GPL) +test_event_expr_to_bytecode_LDADD = $(LIBTAP) $(LIBLTTNG_CTL) $(LIBCOMMON_GPL) \ + $(top_builddir)/src/vendor/fmt/libfmt.la # Log level rule api test_log_level_rule_SOURCES = test_log_level_rule.cpp -test_log_level_rule_LDADD = $(LIBTAP) $(LIBCOMMON_GPL) $(LIBLTTNG_CTL) $(DL_LIBS) +test_log_level_rule_LDADD = $(LIBTAP) $(LIBCOMMON_GPL) $(LIBLTTNG_CTL) $(DL_LIBS) \ + $(top_builddir)/src/vendor/fmt/libfmt.la # Action api test_action_SOURCES = test_action.cpp test_action_LDADD = $(LIBTAP) $(LIBCOMMON_GPL) $(LIBLTTNG_CTL) $(DL_LIBS) \ - $(top_builddir)/src/vendor/fmt/libfmt.la + $(top_builddir)/src/vendor/fmt/libfmt.la diff --git a/tests/unit/ini_config/Makefile.am b/tests/unit/ini_config/Makefile.am index 6bb88df48..205796367 100644 --- a/tests/unit/ini_config/Makefile.am +++ b/tests/unit/ini_config/Makefile.am @@ -9,7 +9,8 @@ noinst_PROGRAMS = ini_config EXTRA_DIST = test_ini_config sample.ini ini_config_SOURCES = ini_config.cpp -ini_config_LDADD = $(LIBTAP) $(LIBCOMMON_GPL) +ini_config_LDADD = $(LIBTAP) $(LIBCOMMON_GPL) \ + $(top_builddir)/src/vendor/fmt/libfmt.la all-local: @if [ x"$(srcdir)" != x"$(builddir)" ]; then \