diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2014-08-11 11:52:04 +0300 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2014-08-11 21:20:33 +0300 |
commit | 3d8a888a7596435fbd5da28f23dddfc46ddff0e7 (patch) | |
tree | 4f076cc626e0002bcaa51158acbb71a578f205ec /tools/smp-tester.c | |
parent | c6a0c46151beded4b8f68ef44189795cec081bae (diff) | |
download | bluez-3d8a888a7596435fbd5da28f23dddfc46ddff0e7.tar.gz |
smp-tester: Add invalid opcode test case
Diffstat (limited to 'tools/smp-tester.c')
-rw-r--r-- | tools/smp-tester.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/smp-tester.c b/tools/smp-tester.c index a9a883059..f63813217 100644 --- a/tools/smp-tester.c +++ b/tools/smp-tester.c @@ -295,6 +295,19 @@ static const struct smp_data smp_server_nval_req_3_test = { .req_count = G_N_ELEMENTS(srv_nval_req_2), }; +static const uint8_t smp_nval_req_4[] = { 0xff, 0xff }; +static const uint8_t smp_nval_req_4_rsp[] = { 0x05, 0x07 }; + +static const struct smp_req_rsp srv_nval_req_3[] = { + { smp_nval_req_4, sizeof(smp_nval_req_4), + smp_nval_req_4_rsp, sizeof(smp_nval_req_4_rsp) }, +}; + +static const struct smp_data smp_server_nval_req_4_test = { + .req = srv_nval_req_3, + .req_count = G_N_ELEMENTS(srv_nval_req_3), +}; + static const uint8_t smp_basic_req_1[] = { 0x01, /* Pairing Request */ 0x03, /* NoInputNoOutput */ 0x00, /* OOB Flag */ @@ -728,6 +741,9 @@ int main(int argc, char *argv[]) test_smp("SMP Server - Invalid Request 3", &smp_server_nval_req_3_test, setup_powered_server, test_server); + test_smp("SMP Server - Invalid Request 4", + &smp_server_nval_req_4_test, + setup_powered_server, test_server); test_smp("SMP Client - Basic Request 1", &smp_client_basic_req_1_test, |