flt.lttng-utils.debug-info: use BT_COMP_LOG*() instead of BT_LOG*()
[babeltrace.git] / tests / plugins / flt.lttng-utils.debug-info / test_bin_info.c
index d681ef5621abc948c00b6d6266fda030a7c9e4e2..36bfd7f04292cd113f6f111b3a2505c2fd2d9e5e 100644 (file)
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
+#define BT_LOG_OUTPUT_LEVEL BT_LOG_WARN
+#define BT_LOG_TAG "TEST/BIN-INFO"
+#include "logging/log.h"
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -223,14 +227,14 @@ void test_bin_info_build_id(const char *bin_info_dir)
                exit(EXIT_FAILURE);
        }
 
-       ret = bt_fd_cache_init(&fdc);
+       ret = bt_fd_cache_init(&fdc, BT_LOG_OUTPUT_LEVEL);
        if (ret != 0) {
                diag("Failed to initialize FD cache");
                exit(EXIT_FAILURE);
        }
 
        bin = bin_info_create(&fdc, bin_path, SO_LOW_ADDR, SO_MEMSZ, true,
-                             data_dir, NULL);
+                             data_dir, NULL, BT_LOG_OUTPUT_LEVEL, NULL);
        ok(bin != NULL, "bin_info_create successful (%s)", bin_path);
 
        /* Test setting invalid build_id */
@@ -277,14 +281,14 @@ void test_bin_info_debug_link(const char *bin_info_dir)
                exit(EXIT_FAILURE);
        }
 
-       ret = bt_fd_cache_init(&fdc);
+       ret = bt_fd_cache_init(&fdc, BT_LOG_OUTPUT_LEVEL);
        if (ret != 0) {
                diag("Failed to initialize FD cache");
                exit(EXIT_FAILURE);
        }
 
        bin = bin_info_create(&fdc, bin_path, SO_LOW_ADDR, SO_MEMSZ, true,
-                             data_dir, NULL);
+               data_dir, NULL, BT_LOG_OUTPUT_LEVEL, NULL);
        ok(bin != NULL, "bin_info_create successful (%s)", bin_path);
 
        /* Test setting debug link */
@@ -327,14 +331,14 @@ void test_bin_info_elf(const char *bin_info_dir)
                exit(EXIT_FAILURE);
        }
 
-       ret = bt_fd_cache_init(&fdc);
+       ret = bt_fd_cache_init(&fdc, BT_LOG_OUTPUT_LEVEL);
        if (ret != 0) {
                diag("Failed to initialize FD cache");
                exit(EXIT_FAILURE);
        }
 
        bin = bin_info_create(&fdc, bin_path, SO_LOW_ADDR, SO_MEMSZ, true,
-                             data_dir, NULL);
+               data_dir, NULL, BT_LOG_OUTPUT_LEVEL, NULL);
        ok(bin != NULL, "bin_info_create successful (%s)", bin_path);
 
        /* Test bin_info_has_address */
@@ -375,14 +379,14 @@ void test_bin_info_bundled(const char *bin_info_dir)
                exit(EXIT_FAILURE);
        }
 
-       ret = bt_fd_cache_init(&fdc);
+       ret = bt_fd_cache_init(&fdc, BT_LOG_OUTPUT_LEVEL);
        if (ret != 0) {
                diag("Failed to initialize FD cache");
                exit(EXIT_FAILURE);
        }
 
        bin = bin_info_create(&fdc, bin_path, SO_LOW_ADDR, SO_MEMSZ, true,
-                             data_dir, NULL);
+               data_dir, NULL, BT_LOG_OUTPUT_LEVEL, NULL);
        ok(bin != NULL, "bin_info_create successful (%s)", bin_path);
 
        /* Test bin_info_has_address */
@@ -435,7 +439,7 @@ int main(int argc, char **argv)
 
        plan_tests(NR_TESTS);
 
-       ret = bin_info_init();
+       ret = bin_info_init(BT_LOG_OUTPUT_LEVEL, NULL);
        ok(ret == 0, "bin_info_init successful");
 
        test_bin_info_elf(opt_debug_info_dir);
This page took 0.02452 seconds and 4 git commands to generate.