tools/mgmt-tester: Print hexdump if mgmt event parameters not match
authorTedd Ho-Jeong An <tedd.an@intel.com>
Wed, 26 May 2021 05:13:09 +0000 (22:13 -0700)
committerAyush Garg <ayush.garg@samsung.com>
Fri, 11 Mar 2022 13:38:35 +0000 (19:08 +0530)
This patch displays the hexdump of expected and received mgmt event
parameters.

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

index c9de770..767e010 100755 (executable)
@@ -6780,6 +6780,9 @@ static bool verify_alt_ev(const void *param, uint16_t length)
        if (test->expect_alt_ev_param &&
                        memcmp(test->expect_alt_ev_param, param, length)) {
                tester_warn("Event parameters do not match");
+               util_hexdump('>', param, length, print_debug, "");
+               util_hexdump('!', test->expect_alt_ev_param, length,
+                                                       print_debug, "");
                return false;
        }