From fc2192cfaace9b7ad86690a828eeb2392f69ac03 Mon Sep 17 00:00:00 2001 From: "matthias.ringwald" Date: Thu, 12 Jun 2014 09:05:24 +0000 Subject: [PATCH] fix ACL test packet data to get security manager test working again --- test/security_manager/Makefile | 2 +- test/security_manager/security_manager.c | 21 +++++++++++++-------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/test/security_manager/Makefile b/test/security_manager/Makefile index c8bb91b7d..9ffac85d9 100644 --- a/test/security_manager/Makefile +++ b/test/security_manager/Makefile @@ -5,7 +5,7 @@ CC = g++ BTSTACK_ROOT = ../.. CPPUTEST_HOME = ${BTSTACK_ROOT}/test/cpputest -CFLAGS = -DUNIT_TEST -x c++ -g -Wall -I. -I${BTSTACK_ROOT}/src -I${BTSTACK_ROOT}/ble -I${BTSTACK_ROOT}/include -I$(CPPUTEST_HOME)/include +CFLAGS = -DUNIT_TEST -x c++ -g -Wall -Wno-unused -I. -I${BTSTACK_ROOT}/src -I${BTSTACK_ROOT}/ble -I${BTSTACK_ROOT}/include -I$(CPPUTEST_HOME)/include LDFLAGS += -L$(CPPUTEST_HOME)/lib -lCppUTest -lCppUTestExt COMMON = \ diff --git a/test/security_manager/security_manager.c b/test/security_manager/security_manager.c index 9d2481cea..bfe4a96f5 100644 --- a/test/security_manager/security_manager.c +++ b/test/security_manager/security_manager.c @@ -33,7 +33,7 @@ uint8_t test_command_packet_02[] = { 0x92, 0x91, 0x90, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; uint8_t test_acl_packet_03[] = { - 0x40, 0x20, 0x0b, 0x00, 0x07, 0x00, 0x06, 0x00, 0x02, 0x03, 0x00, 0x01, 0x10, 0x07, 0x07, }; + 0x40, 0x00, 0x0b, 0x00, 0x07, 0x00, 0x06, 0x00, 0x02, 0x03, 0x00, 0x01, 0x10, 0x07, 0x07, }; uint8_t test_command_packet_04[] = { 0x18, 0x20, 0x00, }; uint8_t test_command_packet_05[] = { @@ -47,7 +47,7 @@ uint8_t test_command_packet_07[] = { 0x00, 0x00, 0x00, 0x87, 0xd0, 0x7b, 0x7f, 0xad, 0x4d, 0x47, 0xa6, 0x84, 0x2c, 0x85, 0x79, 0x58, 0xd3, 0xfe, 0xcd, }; uint8_t test_acl_packet_08[] = { - 0x40, 0x20, 0x15, 0x00, 0x11, 0x00, 0x06, 0x00, 0x03, 0xa9, 0xe9, 0x8d, 0x9a, 0xc3, 0x96, 0xe3, + 0x40, 0x00, 0x15, 0x00, 0x11, 0x00, 0x06, 0x00, 0x03, 0xa9, 0xe9, 0x8d, 0x9a, 0xc3, 0x96, 0xe3, 0x52, 0xa1, 0x17, 0xc0, 0xb2, 0xbe, 0x76, 0x42, 0xda, }; uint8_t test_command_packet_09[] = { 0x17, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -58,7 +58,7 @@ uint8_t test_command_packet_10[] = { 0x00, 0x00, 0x00, 0x71, 0xd8, 0xbe, 0xe4, 0xb5, 0x48, 0x4d, 0x35, 0x80, 0x5e, 0x95, 0xf9, 0xb9, 0xaf, 0xc2, 0x55, }; uint8_t test_acl_packet_11[] = { - 0x40, 0x20, 0x15, 0x00, 0x11, 0x00, 0x06, 0x00, 0x04, 0x7a, 0x05, 0xd5, 0xeb, 0x0e, 0x27, 0x3f, + 0x40, 0x00, 0x15, 0x00, 0x11, 0x00, 0x06, 0x00, 0x04, 0x7a, 0x05, 0xd5, 0xeb, 0x0e, 0x27, 0x3f, 0x48, 0x93, 0x9c, 0x46, 0x72, 0x84, 0x82, 0x04, 0x2f, }; uint8_t test_command_packet_12[] = { 0x17, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -81,18 +81,18 @@ uint8_t test_command_packet_17[] = { 0x00, 0x00, 0x00, }; uint8_t test_acl_packet_18[] = { - 0x40, 0x20, 0x15, 0x00, 0x11, 0x00, 0x06, 0x00, 0x06, 0xef, 0x2f, 0xd9, 0x0b, 0x04, 0x7a, 0xe9, + 0x40, 0x00, 0x15, 0x00, 0x11, 0x00, 0x06, 0x00, 0x06, 0xef, 0x2f, 0xd9, 0x0b, 0x04, 0x7a, 0xe9, 0xa1, 0xcf, 0xc3, 0xa3, 0x83, 0xb7, 0x38, 0x30, 0x73, }; uint8_t test_acl_packet_19[] = { - 0x40, 0x20, 0x0f, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x07, 0x5b, 0xb4, 0xcf, 0x10, 0x70, 0x5f, 0x3c, + 0x40, 0x00, 0x0f, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x07, 0x5b, 0xb4, 0xcf, 0x10, 0x70, 0x5f, 0x3c, 0x2d, 0xe3, 0xb3, }; uint8_t test_acl_packet_20[] = { - 0x40, 0x20, 0x15, 0x00, 0x11, 0x00, 0x06, 0x00, 0x08, 0xe6, 0xea, 0xee, 0x60, 0x31, 0x7b, 0xfc, + 0x40, 0x00, 0x15, 0x00, 0x11, 0x00, 0x06, 0x00, 0x08, 0xe6, 0xea, 0xee, 0x60, 0x31, 0x7b, 0xfc, 0xa2, 0x3f, 0xa5, 0x79, 0x59, 0xe7, 0x41, 0xcf, 0xc7, }; uint8_t test_acl_packet_21[] = { - 0x40, 0x20, 0x0c, 0x00, 0x08, 0x00, 0x06, 0x00, 0x09, 0x00, 0xef, 0x32, 0x07, 0xdc, 0x1b, 0x00, }; + 0x40, 0x00, 0x0c, 0x00, 0x08, 0x00, 0x06, 0x00, 0x09, 0x00, 0xef, 0x32, 0x07, 0xdc, 0x1b, 0x00, }; uint8_t test_acl_packet_22[] = { - 0x40, 0x20, 0x15, 0x00, 0x11, 0x00, 0x06, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x40, 0x00, 0x15, 0x00, 0x11, 0x00, 0x06, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; @@ -118,6 +118,11 @@ void hexdump2(void const *data, int size){ void CHECK_EQUAL_ARRAY(uint8_t * expected, uint8_t * actual, int size){ int i; for (i=0; i