[PATCH v2 07/10] mgmt-tester: Print unexpected command responses

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx>

This prints the difference between the command response and the
expected command response to make it easier to debug.
---
 tools/mgmt-tester.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tools/mgmt-tester.c b/tools/mgmt-tester.c
index a5bfa1ce1..bb8eb578c 100644
--- a/tools/mgmt-tester.c
+++ b/tools/mgmt-tester.c
@@ -6315,6 +6315,9 @@ static void command_generic_callback(uint8_t status, uint16_t length,
 		if (expect_param && expect_len > 0 &&
 					memcmp(param, expect_param, length)) {
 			tester_warn("Unexpected cmd response parameter value");
+			util_hexdump('>', param, length, print_debug, "");
+			util_hexdump('!', expect_param, length, print_debug,
+								"");
 			tester_test_failed();
 			return;
 		}
-- 
2.26.2




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux