Introduce LTTNG_UST_CTL_PATH environment variable
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 20 Oct 2023 20:39:40 +0000 (16:39 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 25 Oct 2024 18:26:23 +0000 (14:26 -0400)
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 <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: Ifcd05c366004b5fc0a4a362ad3556d7e6d8658b1

12 files changed:
src/bin/lttng-crash/Makefile.am
src/bin/lttng-sessiond/register.cpp
src/bin/lttng-sessiond/sessiond-config.cpp
src/bin/lttng-sessiond/sessiond-config.hpp
src/common/Makefile.am
src/common/defaults.hpp
src/common/shm.cpp
src/common/shm.hpp
src/common/utils.cpp
src/common/utils.hpp
tests/unit/Makefile.am
tests/unit/ini_config/Makefile.am

index 59a5bfa0c891389d8eca51f0338261f9b4675052..f57d1a59c6d189f43f049573dd7ec294a9a862fc 100644 (file)
@@ -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
index 0191adc9420f04cc0c96943e3477f4a945f51b14..80cd830f0b6611ec355e8a41995e92a387217512 100644 (file)
@@ -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;
        }
index 037488b8a86c96f97660b3b8810337051190619e..774a2c14378963c622c99202b68502715a4a0351 100644 (file)
@@ -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",
index 6b98a59a7fb56a53b7d6435e66c234f9939eb48d..ed009bd447d664b829964c3d0cc864c5fb981e5e 100644 (file)
@@ -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;
        /*
index 499ffa9d8dce0f43e17e0451046164c01a6b0b86..6f059a1bcc745d9ad7cfce82d54e7eb15516d6f9 100644 (file)
@@ -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 \
index 2be3648cc5421d5d514c39f2f7a15d0a54681586..8fbe819f313618ca343ba5e96390f6a9e747a483 100644 (file)
 /* 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"
index deaf715a651cd62ba156dbf2f173da0d5526fcec..e55e4a7edf52ee35b8005eefe5bc85562851296d 100644 (file)
 #include <unistd.h>
 #include <urcu.h>
 
+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;
        }
index 76c81486bf6bcb879ed29b2c162e9f1d2e329527..ee71b60f4e7f8f29a85815f1c55ac945dbbeea90 100644 (file)
@@ -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);
 
index c6b9a55b135e5ee4da511ad5c250e19f86f1387b..3140033309fbbb8921409ec537bdbdda5bf4f8d0 100644 (file)
@@ -17,6 +17,7 @@
 #include <common/compat/getenv.hpp>
 #include <common/compat/string.hpp>
 #include <common/dynamic-buffer.hpp>
+#include <common/format.hpp>
 #include <common/readwrite.hpp>
 #include <common/runas.hpp>
 #include <common/string-utils/format.hpp>
@@ -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.
index 36cb690d447ff13fead85997160ca609099f0242..e1ff53fc491555583ec31d4980e842416d881c83 100644 (file)
@@ -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);
index bfeed35de6ebe268ed07f2fb35bd5430a5cd1dd9..68828e368adb7344878d1216c85b58d638bef247 100644 (file)
@@ -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
index 6bb88df485776d23621076dfb7ab0407ad7b990a..20579636704359d1b9829d3f05d3dbd0e09149f4 100644 (file)
@@ -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 \
This page took 0.033954 seconds and 4 git commands to generate.