* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
+#define BT_LOG_OUTPUT_LEVEL BT_LOG_WARNING
+#define BT_LOG_TAG "TEST/BIN-INFO"
+#include "logging/log.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
ret = bin_info_lookup_function_name(bin, SO_INV_ADDR, &_func_name);
ok(ret == -1 && _func_name == NULL,
"bin_info_lookup_function_name - fail on invalid addr");
- if (_func_name) {
- free(_func_name);
- }
+ free(_func_name);
}
static
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 */
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 */
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 */
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 */
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);