diff --git a/unit/test-mbim.c b/unit/test-mbim.c index fb0b53eb..88d54b5f 100644 --- a/unit/test-mbim.c +++ b/unit/test-mbim.c @@ -112,6 +112,13 @@ static const struct message_data message_data_phonebook_read = { .binary_len = sizeof(message_binary_phonebook_read), }; +static void do_debug(const char *str, void *user_data) +{ + const char *prefix = user_data; + + l_info("%s%s", prefix, str); +} + static struct mbim_message *build_message(const struct message_data *msg_data) { static const int frag_size = 64; @@ -149,6 +156,11 @@ static bool check_message(struct mbim_message *message, void *message_binary = _mbim_message_to_bytearray(message, &len); bool r = false; + l_util_hexdump(false, msg_data->binary, msg_data->binary_len, + do_debug, "[MSG] "); + + l_util_hexdump(true, message_binary, len, do_debug, "[MSG] "); + assert(message_binary); if (len != msg_data->binary_len) goto done;