mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-02-03 20:54:18 +00:00
pts/sm_test: all tests run
This commit is contained in:
parent
f4487237df
commit
d68c09c21c
@ -322,7 +322,7 @@ static void app_packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *
|
||||
case SM_EVENT_AUTHORIZATION_REQUEST:
|
||||
break;
|
||||
case SM_EVENT_PAIRING_COMPLETE:
|
||||
printf("PAIRING_COMPLETE: %u,%u\n", sm_event_pairing_complete_get_status(packet), sm_event_pairing_complete_get_reason(packet));
|
||||
printf("\nPAIRING_COMPLETE: %u,%u\n", sm_event_pairing_complete_get_status(packet), sm_event_pairing_complete_get_reason(packet));
|
||||
if (sm_event_pairing_complete_get_status(packet)) break;
|
||||
if (we_are_central){
|
||||
printf("Search for LE Counter service.\n");
|
||||
|
@ -92,37 +92,35 @@ SM/MAS/SCPK/BI-01-C/04,0,0,8,8,0,0,9
|
||||
|
||||
SM/MAS/SCPK/BI-01-C/05,0,2,8,12,0,0,1
|
||||
|
||||
SM/MAS/SCPK/BI-02-C,0,3,8,8,0,0,4
|
||||
SM/MAS/SCPK/BI-02-C,0,2,8,12,0,0,4
|
||||
|
||||
SM/SLA/SCPK/BI-03-C,0,3,8,8,0,0,4
|
||||
SM/SLA/SCPK/BI-03-C,0,2,8,12,0,0,4
|
||||
|
||||
SM/SLA/SCPK/BI-04-C/01,0,0,8,8,0,0,3
|
||||
SM/SLA/SCPK/BI-04-C/02,0,0,8,8,0,0,8
|
||||
SM/SLA/SCPK/BI-04-C/03,0,0,8,8,0,0,5
|
||||
SM/SLA/SCPK/BI-04-C/04,0,0,8,8,0,0,9
|
||||
SM/SLA/SCPK/BI-04-C/05,0,2,8,12,0,0,1
|
||||
SM/SLA/SCPK/BI-04-C/01,2,0,12,8,0,0,3
|
||||
SM/SLA/SCPK/BI-04-C/02,2,0,12,8,0,0,8
|
||||
SM/SLA/SCPK/BI-04-C/03,2,0,12,8,0,0,5
|
||||
SM/SLA/SCPK/BI-04-C/04,2,0,12,8,0,0,9
|
||||
SM/SLA/SCPK/BI-04-C/05,2,0,12,8,0,0,1
|
||||
|
||||
# -- Out-of-Band (SCOB)
|
||||
|
||||
# TODO: OOB not selected if at least one has OOB, OOB checked before MITM
|
||||
SM/MAS/SCOB/BV-01-C/01,0,0,12,12,0,1,0
|
||||
SM/MAS/SCOB/BV-01-C/02,0,0,12,12,1,0,0
|
||||
SM/MAS/SCOB/BV-01-C/03,0,0,12,12,1,1,0
|
||||
|
||||
# TODO: OOB not selected if at least one has OOB, OOB checked before MITM
|
||||
SM/SLA/SCOB/BV-02-C/01,0,0,12,12,0,1,0
|
||||
SM/SLA/SCOB/BV-02-C/02,0,0,12,12,1,0,0
|
||||
SM/SLA/SCOB/BV-02-C/03,0,0,12,12,1,1,0
|
||||
|
||||
# RFU
|
||||
SM/SLA/SCOB/BV-03-C/01,0,0,12,12,76,1,0
|
||||
SM/SLA/SCOB/BV-03-C/02,0,0,12,12,140,1,0
|
||||
SM/SLA/SCOB/BV-03-C/03,0,0,12,12,204,1,0
|
||||
SM/SLA/SCOB/BV-03-C/01,0,0,12,76,1,1,0
|
||||
SM/SLA/SCOB/BV-03-C/02,0,0,12,140,1,1,0
|
||||
SM/SLA/SCOB/BV-03-C/03,0,0,12,204,1,1,0
|
||||
|
||||
# RFU
|
||||
SM/MAS/SCOB/BV-04-C/01,0,0,12,12,76,1,0
|
||||
SM/MAS/SCOB/BV-04-C/02,0,0,12,12,140,1,0
|
||||
SM/MAS/SCOB/BV-04-C/03,0,0,12,12,204,1,0
|
||||
SM/MAS/SCOB/BV-04-C/01,0,0,12,76,1,1,0
|
||||
SM/MAS/SCOB/BV-04-C/02,0,0,12,140,1,1,0
|
||||
SM/MAS/SCOB/BV-04-C/03,0,0,12,204,1,1,0
|
||||
|
||||
# failures
|
||||
SM/MAS/SCOB/BI-01-C/01,0,0,12,12,1,1,3
|
||||
@ -138,11 +136,5 @@ SM/SLA/SCOB/BI-02-C/03,0,0,12,12,1,1,5
|
||||
SM/SLA/SCOB/BI-02-C/04,0,0,12,12,1,1,9
|
||||
SM/SLA/SCOB/BI-02-C/05,0,0,12,12,1,1,2
|
||||
|
||||
# TODO: tester responds with pairing failure during phase 2
|
||||
SM/SLA/SCOB/BI-03-C,0,3,8,8,0,0,4
|
||||
|
||||
# TODO: we enter incorrect Passkey, and get DHKey Check error instead of passkey entry failed
|
||||
SM/MAS/SCOB/BI-04-C,0,2,8,12,0,0,1
|
||||
|
||||
|
||||
|
||||
SM/SLA/SCOB/BI-03-C,0,3,12,12,1,1,4
|
||||
SM/MAS/SCOB/BI-04-C,0,2,12,12,1,1,4
|
||||
|
|
@ -238,6 +238,9 @@ def run(test_descriptor, nodes):
|
||||
passkey = line.split(': ')[1]
|
||||
print('%s passkey display %s' % (node.get_name(), passkey))
|
||||
test_descriptor['passkey'] = passkey
|
||||
if node.get_name() == 'tester' and test_descriptor['tester_failure'] == '1':
|
||||
print('Decline bonding')
|
||||
node.write('d')
|
||||
if state == 'W4_PAIRING':
|
||||
state = 'W4_PASSKEY_INPUT'
|
||||
else:
|
||||
@ -324,6 +327,8 @@ def write_config(fout, test_descriptor):
|
||||
iut = test_descriptor['passkey']
|
||||
tester = test_descriptor['passkey']
|
||||
elif attribute == 'method':
|
||||
if not 'method' in test_descriptor:
|
||||
continue
|
||||
iut = test_descriptor['method']
|
||||
tester = test_descriptor['method']
|
||||
elif attribute == 'failure':
|
||||
@ -406,12 +411,14 @@ def run_test(test_descriptor):
|
||||
test_ok &= test_descriptor['iut_pairing_complete_status'] == '0'
|
||||
|
||||
# check pairing method
|
||||
if 'SCJW' in test_name and ( test_descriptor['method'] != 'Just Works' and test_descriptor['method' != 'Numeric Comparison']):
|
||||
test_ok = False
|
||||
if 'SCPK' in test_name and test_descriptor['method'] != 'Passkey Entry':
|
||||
test_ok = False
|
||||
if 'SCOB' in test_name and test_descriptor['method'] != 'OOB':
|
||||
test_ok = False
|
||||
if 'method' in test_descriptor:
|
||||
method = test_descriptor['method']
|
||||
if 'SCJW' in test_name and (method != 'Just Works' and method != 'Numeric Comparison'):
|
||||
test_ok = False
|
||||
if 'SCPK' in test_name and method != 'Passkey Entry':
|
||||
test_ok = False
|
||||
if 'SCOB' in test_name and method != 'OOB':
|
||||
test_ok = False
|
||||
|
||||
# rename folder if test not ok
|
||||
if not test_ok:
|
||||
|
Loading…
x
Reference in New Issue
Block a user