diff mbox series

[BlueZ,3/4] tools/mgmt-tester: Print hexdump if mgmt event parameters not match

Message ID 20210526002024.412237-3-hj.tedd.an@gmail.com
State New
Headers show
Series [BlueZ,1/4] tools/btmgmt: Add device flags commands | expand

Commit Message

Tedd Ho-Jeong An May 26, 2021, 12:20 a.m. UTC
From: Tedd Ho-Jeong An <tedd.an@intel.com>

This patch displays the hexdump of expected and received mgmt event
parameters.
---
 tools/mgmt-tester.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/tools/mgmt-tester.c b/tools/mgmt-tester.c
index c9de770c1..767e010a6 100644
--- a/tools/mgmt-tester.c
+++ b/tools/mgmt-tester.c
@@ -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;
 	}