mgmt-tester: Print out the HCI received and expected cmd value
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Tue, 3 Nov 2020 23:36:28 +0000 (15:36 -0800)
committerAyush Garg <ayush.garg@samsung.com>
Fri, 11 Mar 2022 13:38:33 +0000 (19:08 +0530)
This make it simpler to debug when the kernel has been updated and
parameters no longer match:

Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
tools/mgmt-tester.c

index 27a5f0b..4775fb1 100755 (executable)
@@ -6381,7 +6381,9 @@ static void command_hci_callback(uint16_t opcode, const void *param,
        }
 
        if (memcmp(param, expect_hci_param, length) != 0) {
-               tester_warn("Unexpected HCI command parameter value");
+               tester_warn("Unexpected HCI command parameter value:");
+               util_hexdump('>', param, length, print_debug, "");
+               util_hexdump('!', expect_hci_param, length, print_debug, "");
                tester_test_failed();
                return;
        }