]> git.lttng.org Git - lttng-tools.git/commitdiff
tests: Force consumerd_testpoint to always be verbose master
authorKienan Stewart <kstewart@efficios.com>
Thu, 13 Feb 2025 14:14:15 +0000 (09:14 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 21 Feb 2025 22:25:58 +0000 (22:25 +0000)
The `lttng_opt_*` variables aren't actually shared with the
consumerd. When running the consumerd with `--verbose`, the debug
messages from this library were not visible.

Using dlsym() to find the next `lttng_opt_verbose` does find a symbol,
but despite the consumerd running with `--verbose`, the value of that
symbol was 0.

As these testpoints are only used in a couple of situations during the
CI run, the local verbosity level can be forced high to always have
the information available.

Change-Id: Ife79be898f4534f16fc5ee587cb152bb1c591b31
Signed-off-by: Kienan Stewart <kstewart@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
tests/regression/tools/notification/consumer_testpoints.cpp

index 834fff1654a76acb2df083fc6752f1dd7d63e799..dedaba30957212153dd2ba441f66a8352d635d16 100644 (file)
@@ -26,8 +26,6 @@ using lttng_consumer_get_type_func = enum lttng_consumer_type (*)();
 static lttng_consumer_get_type_func lttng_consumer_get_type;
 
 int lttng_opt_verbose;
-int lttng_opt_mi;
-int lttng_opt_quiet;
 
 static void __attribute__((destructor)) pause_pipe_fini()
 {
@@ -55,6 +53,12 @@ int __testpoint_consumerd_thread_data(void)
        int ret = 0;
        const char *pause_pipe_path_prefix, *domain;
 
+       /*
+        * lttng_opt_verbose does not refer to the same one as loaded in the consumerd.
+        * For the debug mode for this TU, as it's only used in testing.
+        */
+       lttng_opt_verbose = 3;
+
        pause_pipe_path_prefix = lttng_secure_getenv("CONSUMER_PAUSE_PIPE_PATH");
        if (!pause_pipe_path_prefix) {
                ret = -1;
This page took 0.030635 seconds and 4 git commands to generate.