pts/sm_test: all tests run

This commit is contained in:
Matthias Ringwald 2018-04-03 18:37:07 +02:00
parent f4487237df
commit d68c09c21c
3 changed files with 29 additions and 30 deletions

View File

@ -322,7 +322,7 @@ static void app_packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *
case SM_EVENT_AUTHORIZATION_REQUEST: case SM_EVENT_AUTHORIZATION_REQUEST:
break; break;
case SM_EVENT_PAIRING_COMPLETE: 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 (sm_event_pairing_complete_get_status(packet)) break;
if (we_are_central){ if (we_are_central){
printf("Search for LE Counter service.\n"); printf("Search for LE Counter service.\n");

View File

@ -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-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/01,2,0,12,8,0,0,3
SM/SLA/SCPK/BI-04-C/02,0,0,8,8,0,0,8 SM/SLA/SCPK/BI-04-C/02,2,0,12,8,0,0,8
SM/SLA/SCPK/BI-04-C/03,0,0,8,8,0,0,5 SM/SLA/SCPK/BI-04-C/03,2,0,12,8,0,0,5
SM/SLA/SCPK/BI-04-C/04,0,0,8,8,0,0,9 SM/SLA/SCPK/BI-04-C/04,2,0,12,8,0,0,9
SM/SLA/SCPK/BI-04-C/05,0,2,8,12,0,0,1 SM/SLA/SCPK/BI-04-C/05,2,0,12,8,0,0,1
# -- Out-of-Band (SCOB) # -- 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/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/02,0,0,12,12,1,0,0
SM/MAS/SCOB/BV-01-C/03,0,0,12,12,1,1,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/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/02,0,0,12,12,1,0,0
SM/SLA/SCOB/BV-02-C/03,0,0,12,12,1,1,0 SM/SLA/SCOB/BV-02-C/03,0,0,12,12,1,1,0
# RFU # RFU
SM/SLA/SCOB/BV-03-C/01,0,0,12,12,76,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,12,140,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,12,204,1,0 SM/SLA/SCOB/BV-03-C/03,0,0,12,204,1,1,0
# RFU # RFU
SM/MAS/SCOB/BV-04-C/01,0,0,12,12,76,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,12,140,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,12,204,1,0 SM/MAS/SCOB/BV-04-C/03,0,0,12,204,1,1,0
# failures # failures
SM/MAS/SCOB/BI-01-C/01,0,0,12,12,1,1,3 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/04,0,0,12,12,1,1,9
SM/SLA/SCOB/BI-02-C/05,0,0,12,12,1,1,2 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,12,12,1,1,4
SM/SLA/SCOB/BI-03-C,0,3,8,8,0,0,4 SM/MAS/SCOB/BI-04-C,0,2,12,12,1,1,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

1 name,iut_io_capabilities,tester_io_capabilities,iut_auth_req,tester_auth_req,iut_oob_data,tester_oob_data,tester_failure
92 # RFU SM/MAS/SCOB/BV-04-C/02,0,0,12,140,1,1,0
93 SM/MAS/SCOB/BV-04-C/01,0,0,12,12,76,1,0 SM/MAS/SCOB/BV-04-C/03,0,0,12,204,1,1,0
94 SM/MAS/SCOB/BV-04-C/02,0,0,12,12,140,1,0 # failures
95 SM/MAS/SCOB/BV-04-C/03,0,0,12,12,204,1,0 SM/MAS/SCOB/BI-01-C/01,0,0,12,12,1,1,3
96 # failures SM/MAS/SCOB/BI-01-C/02,0,0,12,12,1,1,8
97 SM/MAS/SCOB/BI-01-C/01,0,0,12,12,1,1,3 SM/MAS/SCOB/BI-01-C/03,0,0,12,12,1,1,5
98 SM/MAS/SCOB/BI-01-C/02,0,0,12,12,1,1,8 SM/MAS/SCOB/BI-01-C/04,0,0,12,12,1,1,9
99 SM/MAS/SCOB/BI-01-C/03,0,0,12,12,1,1,5 SM/MAS/SCOB/BI-01-C/05,0,0,12,12,1,1,2
100 SM/MAS/SCOB/BI-01-C/04,0,0,12,12,1,1,9 # failures
101 SM/MAS/SCOB/BI-01-C/05,0,0,12,12,1,1,2 SM/SLA/SCOB/BI-02-C/01,0,0,12,12,1,1,3
102 # failures SM/SLA/SCOB/BI-02-C/02,0,0,12,12,1,1,8
103 SM/SLA/SCOB/BI-02-C/01,0,0,12,12,1,1,3 SM/SLA/SCOB/BI-02-C/03,0,0,12,12,1,1,5
104 SM/SLA/SCOB/BI-02-C/02,0,0,12,12,1,1,8 SM/SLA/SCOB/BI-02-C/04,0,0,12,12,1,1,9
105 SM/SLA/SCOB/BI-02-C/03,0,0,12,12,1,1,5 SM/SLA/SCOB/BI-02-C/05,0,0,12,12,1,1,2
106 SM/SLA/SCOB/BI-02-C/04,0,0,12,12,1,1,9 SM/SLA/SCOB/BI-03-C,0,3,12,12,1,1,4
SM/SLA/SCOB/BI-02-C/05,0,0,12,12,1,1,2
107 # TODO: tester responds with pairing failure during phase 2 SM/MAS/SCOB/BI-04-C,0,2,12,12,1,1,4
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
136
137
138
139
140

View File

@ -238,6 +238,9 @@ def run(test_descriptor, nodes):
passkey = line.split(': ')[1] passkey = line.split(': ')[1]
print('%s passkey display %s' % (node.get_name(), passkey)) print('%s passkey display %s' % (node.get_name(), passkey))
test_descriptor['passkey'] = 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': if state == 'W4_PAIRING':
state = 'W4_PASSKEY_INPUT' state = 'W4_PASSKEY_INPUT'
else: else:
@ -324,6 +327,8 @@ def write_config(fout, test_descriptor):
iut = test_descriptor['passkey'] iut = test_descriptor['passkey']
tester = test_descriptor['passkey'] tester = test_descriptor['passkey']
elif attribute == 'method': elif attribute == 'method':
if not 'method' in test_descriptor:
continue
iut = test_descriptor['method'] iut = test_descriptor['method']
tester = test_descriptor['method'] tester = test_descriptor['method']
elif attribute == 'failure': elif attribute == 'failure':
@ -406,12 +411,14 @@ def run_test(test_descriptor):
test_ok &= test_descriptor['iut_pairing_complete_status'] == '0' test_ok &= test_descriptor['iut_pairing_complete_status'] == '0'
# check pairing method # check pairing method
if 'SCJW' in test_name and ( test_descriptor['method'] != 'Just Works' and test_descriptor['method' != 'Numeric Comparison']): if 'method' in test_descriptor:
test_ok = False method = test_descriptor['method']
if 'SCPK' in test_name and test_descriptor['method'] != 'Passkey Entry': if 'SCJW' in test_name and (method != 'Just Works' and method != 'Numeric Comparison'):
test_ok = False test_ok = False
if 'SCOB' in test_name and test_descriptor['method'] != 'OOB': if 'SCPK' in test_name and method != 'Passkey Entry':
test_ok = False test_ok = False
if 'SCOB' in test_name and method != 'OOB':
test_ok = False
# rename folder if test not ok # rename folder if test not ok
if not test_ok: if not test_ok: