Etan Cohen | fc5f373 | 2017-06-02 17:31:52 -0700 | [diff] [blame] | 1 | #!/usr/bin/python3.4 |
| 2 | # |
| 3 | # Copyright 2017 - The Android Open Source Project |
| 4 | # |
| 5 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | # you may not use this file except in compliance with the License. |
| 7 | # You may obtain a copy of the License at |
| 8 | # |
| 9 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | # |
| 11 | # Unless required by applicable law or agreed to in writing, software |
| 12 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | # See the License for the specific language governing permissions and |
| 15 | # limitations under the License. |
| 16 | |
| 17 | import time |
| 18 | |
| 19 | from acts.test_utils.net import connectivity_const as cconsts |
| 20 | from acts.test_utils.wifi.aware import aware_const as aconsts |
| 21 | from acts.test_utils.wifi.aware import aware_test_utils as autils |
| 22 | from acts.test_utils.wifi.aware.AwareBaseTest import AwareBaseTest |
| 23 | |
| 24 | |
| 25 | class DataPathTest(AwareBaseTest): |
| 26 | """Set of tests for Wi-Fi Aware discovery.""" |
| 27 | |
| 28 | # configuration parameters used by tests |
| 29 | ENCR_TYPE_OPEN = 0 |
| 30 | ENCR_TYPE_PASSPHRASE = 1 |
| 31 | |
| 32 | PASSPHRASE = "This is some random passphrase - very very secure!!" |
| 33 | |
| 34 | PING_MSG = "ping" |
| 35 | |
| 36 | # message re-transmit counter (increases reliability in open-environment) |
| 37 | # Note: reliability of message transmission is tested elsewhere |
| 38 | MSG_RETX_COUNT = 5 # hard-coded max value, internal API |
| 39 | |
Etan Cohen | ba8a53f | 2017-06-05 12:55:02 -0700 | [diff] [blame] | 40 | # number of second to 'reasonably' wait to make sure that devices synchronize |
| 41 | # with each other - useful for OOB test cases, where the OOB discovery would |
| 42 | # take some time |
| 43 | WAIT_FOR_CLUSTER = 5 |
| 44 | |
Etan Cohen | fc5f373 | 2017-06-02 17:31:52 -0700 | [diff] [blame] | 45 | def __init__(self, controllers): |
| 46 | AwareBaseTest.__init__(self, controllers) |
| 47 | |
| 48 | def create_config(self, dtype): |
| 49 | """Create a base configuration based on input parameters. |
| 50 | |
| 51 | Args: |
| 52 | dtype: Publish or Subscribe discovery type |
| 53 | |
| 54 | Returns: |
| 55 | Discovery configuration object. |
| 56 | """ |
| 57 | config = {} |
| 58 | config[aconsts.DISCOVERY_KEY_DISCOVERY_TYPE] = dtype |
| 59 | config[aconsts.DISCOVERY_KEY_SERVICE_NAME] = "GoogleTestServiceDataPath" |
| 60 | return config |
| 61 | |
| 62 | def request_network(self, dut, ns): |
| 63 | """Request a Wi-Fi Aware network. |
| 64 | |
| 65 | Args: |
| 66 | dut: Device |
| 67 | ns: Network specifier |
| 68 | Returns: the request key |
| 69 | """ |
| 70 | network_req = {"TransportType": 5, "NetworkSpecifier": ns} |
| 71 | return dut.droid.connectivityRequestWifiAwareNetwork(network_req) |
| 72 | |
| 73 | def run_ib_data_path_test(self, ptype, stype, encr_type, use_peer_id): |
| 74 | """Runs the in-band data-path tests. |
| 75 | |
| 76 | Args: |
| 77 | ptype: Publish discovery type |
| 78 | stype: Subscribe discovery type |
| 79 | encr_type: Encryption type, one of ENCR_TYPE_* |
| 80 | use_peer_id: On Responder (publisher): True to use peer ID, False to |
| 81 | accept any request |
| 82 | """ |
| 83 | p_dut = self.android_devices[0] |
| 84 | p_dut.pretty_name = "Publisher" |
| 85 | s_dut = self.android_devices[1] |
| 86 | s_dut.pretty_name = "Subscriber" |
| 87 | |
| 88 | # Publisher+Subscriber: attach and wait for confirmation |
| 89 | p_id = p_dut.droid.wifiAwareAttach() |
| 90 | autils.wait_for_event(p_dut, aconsts.EVENT_CB_ON_ATTACHED) |
| 91 | s_id = s_dut.droid.wifiAwareAttach() |
| 92 | autils.wait_for_event(s_dut, aconsts.EVENT_CB_ON_ATTACHED) |
| 93 | |
| 94 | # Publisher: start publish and wait for confirmation |
| 95 | p_disc_id = p_dut.droid.wifiAwarePublish(p_id, self.create_config(ptype)) |
| 96 | autils.wait_for_event(p_dut, aconsts.SESSION_CB_ON_PUBLISH_STARTED) |
| 97 | |
| 98 | # Subscriber: start subscribe and wait for confirmation |
| 99 | s_disc_id = s_dut.droid.wifiAwareSubscribe(s_id, self.create_config(stype)) |
| 100 | autils.wait_for_event(s_dut, aconsts.SESSION_CB_ON_SUBSCRIBE_STARTED) |
| 101 | |
| 102 | # Subscriber: wait for service discovery |
| 103 | discovery_event = autils.wait_for_event( |
| 104 | s_dut, aconsts.SESSION_CB_ON_SERVICE_DISCOVERED) |
| 105 | peer_id_on_sub = discovery_event["data"][aconsts.SESSION_CB_KEY_PEER_ID] |
| 106 | |
| 107 | if use_peer_id: # only need message to receive peer ID |
| 108 | # Subscriber: send message to peer (Publisher - so it knows our address) |
| 109 | s_dut.droid.wifiAwareSendMessage(s_disc_id, peer_id_on_sub, |
| 110 | self.get_next_msg_id(), self.PING_MSG, |
| 111 | self.MSG_RETX_COUNT) |
| 112 | autils.wait_for_event(s_dut, aconsts.SESSION_CB_ON_MESSAGE_SENT) |
| 113 | |
| 114 | # Publisher: wait for received message |
| 115 | pub_rx_msg_event = autils.wait_for_event( |
| 116 | p_dut, aconsts.SESSION_CB_ON_MESSAGE_RECEIVED) |
| 117 | peer_id_on_pub = pub_rx_msg_event["data"][aconsts.SESSION_CB_KEY_PEER_ID] |
| 118 | |
| 119 | # Publisher: request network |
| 120 | p_req_key = self.request_network( |
| 121 | p_dut, |
| 122 | p_dut.droid.wifiAwareCreateNetworkSpecifier( |
| 123 | p_disc_id, peer_id_on_pub if use_peer_id else None, self.PASSPHRASE |
| 124 | if encr_type == self.ENCR_TYPE_PASSPHRASE else None)) |
| 125 | |
| 126 | # Subscriber: request network |
| 127 | s_req_key = self.request_network( |
| 128 | s_dut, |
| 129 | s_dut.droid.wifiAwareCreateNetworkSpecifier( |
| 130 | s_disc_id, peer_id_on_sub, self.PASSPHRASE |
| 131 | if encr_type == self.ENCR_TYPE_PASSPHRASE else None)) |
| 132 | |
| 133 | # Publisher & Subscriber: wait for network formation |
| 134 | p_net_event = autils.wait_for_event_with_keys( |
| 135 | p_dut, cconsts.EVENT_NETWORK_CALLBACK, |
| 136 | autils.EVENT_TIMEOUT, |
| 137 | (cconsts.NETWORK_CB_KEY_EVENT, |
| 138 | cconsts.NETWORK_CB_LINK_PROPERTIES_CHANGED), |
| 139 | (cconsts.NETWORK_CB_KEY_ID, p_req_key)) |
| 140 | s_net_event = autils.wait_for_event_with_keys( |
| 141 | s_dut, cconsts.EVENT_NETWORK_CALLBACK, |
| 142 | autils.EVENT_TIMEOUT, |
| 143 | (cconsts.NETWORK_CB_KEY_EVENT, |
| 144 | cconsts.NETWORK_CB_LINK_PROPERTIES_CHANGED), |
| 145 | (cconsts.NETWORK_CB_KEY_ID, s_req_key)) |
| 146 | |
| 147 | p_aware_if = p_net_event["data"][cconsts.NETWORK_CB_KEY_INTERFACE_NAME] |
| 148 | s_aware_if = s_net_event["data"][cconsts.NETWORK_CB_KEY_INTERFACE_NAME] |
| 149 | self.log.info("Interface names: p=%s, s=%s", p_aware_if, s_aware_if) |
| 150 | |
| 151 | p_ipv6 = p_dut.droid.connectivityGetLinkLocalIpv6Address(p_aware_if).split( |
| 152 | "%")[0] |
| 153 | s_ipv6 = s_dut.droid.connectivityGetLinkLocalIpv6Address(s_aware_if).split( |
| 154 | "%")[0] |
| 155 | self.log.info("Interface addresses (IPv6): p=%s, s=%s", p_ipv6, s_ipv6) |
| 156 | |
| 157 | # TODO: possibly send messages back and forth, prefer to use netcat/nc |
| 158 | |
Etan Cohen | ce20229 | 2017-06-05 13:55:54 -0700 | [diff] [blame^] | 159 | # terminate sessions and wait for ON_LOST callbacks |
| 160 | p_dut.droid.wifiAwareDestroy(p_id) |
| 161 | s_dut.droid.wifiAwareDestroy(s_id) |
| 162 | |
| 163 | autils.wait_for_event_with_keys( |
| 164 | p_dut, cconsts.EVENT_NETWORK_CALLBACK, autils.EVENT_TIMEOUT, |
| 165 | (cconsts.NETWORK_CB_KEY_EVENT, |
| 166 | cconsts.NETWORK_CB_LOST), (cconsts.NETWORK_CB_KEY_ID, p_req_key)) |
| 167 | autils.wait_for_event_with_keys( |
| 168 | s_dut, cconsts.EVENT_NETWORK_CALLBACK, autils.EVENT_TIMEOUT, |
| 169 | (cconsts.NETWORK_CB_KEY_EVENT, |
| 170 | cconsts.NETWORK_CB_LOST), (cconsts.NETWORK_CB_KEY_ID, s_req_key)) |
| 171 | |
Etan Cohen | fc5f373 | 2017-06-02 17:31:52 -0700 | [diff] [blame] | 172 | # clean-up |
| 173 | p_dut.droid.connectivityUnregisterNetworkCallback(p_req_key) |
| 174 | s_dut.droid.connectivityUnregisterNetworkCallback(s_req_key) |
| 175 | |
Etan Cohen | ba8a53f | 2017-06-05 12:55:02 -0700 | [diff] [blame] | 176 | def run_oob_data_path_test(self, encr_type, use_peer_id): |
| 177 | """Runs the out-of-band data-path tests. |
| 178 | |
| 179 | Args: |
| 180 | encr_type: Encryption type, one of ENCR_TYPE_* |
| 181 | use_peer_id: On Responder: True to use peer ID, False to accept any |
| 182 | request |
| 183 | """ |
| 184 | init_dut = self.android_devices[0] |
| 185 | init_dut.pretty_name = "Initiator" |
| 186 | resp_dut = self.android_devices[1] |
| 187 | resp_dut.pretty_name = "Responder" |
| 188 | |
| 189 | # Publisher+Subscriber: attach and wait for confirmation & identity |
| 190 | init_id = init_dut.droid.wifiAwareAttach(True) |
| 191 | autils.wait_for_event(init_dut, aconsts.EVENT_CB_ON_ATTACHED) |
| 192 | init_ident_event = autils.wait_for_event( |
| 193 | init_dut, aconsts.EVENT_CB_ON_IDENTITY_CHANGED) |
| 194 | init_mac = init_ident_event["data"]["mac"] |
| 195 | resp_id = resp_dut.droid.wifiAwareAttach(True) |
| 196 | autils.wait_for_event(resp_dut, aconsts.EVENT_CB_ON_ATTACHED) |
| 197 | resp_ident_event = autils.wait_for_event( |
| 198 | resp_dut, aconsts.EVENT_CB_ON_IDENTITY_CHANGED) |
| 199 | resp_mac = resp_ident_event["data"]["mac"] |
| 200 | |
| 201 | # wait for for devices to synchronize with each other - there are no other |
| 202 | # mechanisms to make sure this happens for OOB discovery (except retrying |
| 203 | # to execute the data-path request) |
| 204 | time.sleep(self.WAIT_FOR_CLUSTER) |
| 205 | |
| 206 | # Responder: request network |
| 207 | resp_req_key = self.request_network( |
| 208 | resp_dut, |
| 209 | resp_dut.droid.wifiAwareCreateNetworkSpecifierOob( |
| 210 | resp_id, aconsts.DATA_PATH_RESPONDER, init_mac |
| 211 | if use_peer_id else None, self.PASSPHRASE |
| 212 | if encr_type == self.ENCR_TYPE_PASSPHRASE else None)) |
| 213 | |
| 214 | # Initiator: request network |
| 215 | init_req_key = self.request_network( |
| 216 | init_dut, |
| 217 | init_dut.droid.wifiAwareCreateNetworkSpecifierOob( |
| 218 | init_id, aconsts.DATA_PATH_INITIATOR, resp_mac, self.PASSPHRASE |
| 219 | if encr_type == self.ENCR_TYPE_PASSPHRASE else None)) |
| 220 | |
| 221 | # Initiator & Responder: wait for network formation |
| 222 | init_net_event = autils.wait_for_event_with_keys( |
| 223 | init_dut, cconsts.EVENT_NETWORK_CALLBACK, |
| 224 | autils.EVENT_TIMEOUT, |
| 225 | (cconsts.NETWORK_CB_KEY_EVENT, |
| 226 | cconsts.NETWORK_CB_LINK_PROPERTIES_CHANGED), |
| 227 | (cconsts.NETWORK_CB_KEY_ID, init_req_key)) |
| 228 | resp_net_event = autils.wait_for_event_with_keys( |
| 229 | resp_dut, cconsts.EVENT_NETWORK_CALLBACK, |
| 230 | autils.EVENT_TIMEOUT, |
| 231 | (cconsts.NETWORK_CB_KEY_EVENT, |
| 232 | cconsts.NETWORK_CB_LINK_PROPERTIES_CHANGED), |
| 233 | (cconsts.NETWORK_CB_KEY_ID, resp_req_key)) |
| 234 | |
| 235 | init_aware_if = init_net_event["data"][ |
| 236 | cconsts.NETWORK_CB_KEY_INTERFACE_NAME] |
| 237 | resp_aware_if = resp_net_event["data"][ |
| 238 | cconsts.NETWORK_CB_KEY_INTERFACE_NAME] |
| 239 | self.log.info("Interface names: I=%s, R=%s", init_aware_if, resp_aware_if) |
| 240 | |
| 241 | init_ipv6 = init_dut.droid.connectivityGetLinkLocalIpv6Address( |
| 242 | init_aware_if).split("%")[0] |
| 243 | resp_ipv6 = resp_dut.droid.connectivityGetLinkLocalIpv6Address( |
| 244 | resp_aware_if).split("%")[0] |
| 245 | self.log.info("Interface addresses (IPv6): I=%s, R=%s", init_ipv6, |
| 246 | resp_ipv6) |
| 247 | |
| 248 | # TODO: possibly send messages back and forth, prefer to use netcat/nc |
| 249 | |
Etan Cohen | ce20229 | 2017-06-05 13:55:54 -0700 | [diff] [blame^] | 250 | # terminate sessions and wait for ON_LOST callbacks |
| 251 | init_dut.droid.wifiAwareDestroy(init_id) |
| 252 | resp_dut.droid.wifiAwareDestroy(resp_id) |
| 253 | |
| 254 | autils.wait_for_event_with_keys( |
| 255 | init_dut, cconsts.EVENT_NETWORK_CALLBACK, autils.EVENT_TIMEOUT, |
| 256 | (cconsts.NETWORK_CB_KEY_EVENT, |
| 257 | cconsts.NETWORK_CB_LOST), (cconsts.NETWORK_CB_KEY_ID, init_req_key)) |
| 258 | autils.wait_for_event_with_keys( |
| 259 | resp_dut, cconsts.EVENT_NETWORK_CALLBACK, autils.EVENT_TIMEOUT, |
| 260 | (cconsts.NETWORK_CB_KEY_EVENT, |
| 261 | cconsts.NETWORK_CB_LOST), (cconsts.NETWORK_CB_KEY_ID, resp_req_key)) |
| 262 | |
Etan Cohen | ba8a53f | 2017-06-05 12:55:02 -0700 | [diff] [blame] | 263 | # clean-up |
| 264 | resp_dut.droid.connectivityUnregisterNetworkCallback(resp_req_key) |
| 265 | init_dut.droid.connectivityUnregisterNetworkCallback(init_req_key) |
| 266 | |
| 267 | |
Etan Cohen | fc5f373 | 2017-06-02 17:31:52 -0700 | [diff] [blame] | 268 | ####################################### |
| 269 | # Positive In-Band (IB) tests key: |
| 270 | # |
| 271 | # names is: test_ib_<pub_type>_<sub_type>_<encr_type>_<peer_spec> |
| 272 | # where: |
| 273 | # |
| 274 | # pub_type: Type of publish discovery session: unsolicited or solicited. |
| 275 | # sub_type: Type of subscribe discovery session: passive or active. |
| 276 | # encr_type: Encription type: open, passphrase |
| 277 | # peer_spec: Peer specification method: any or specific |
| 278 | # |
| 279 | # Note: In-Band means using Wi-Fi Aware for discovery and referring to the |
| 280 | # peer using the Aware-provided peer handle (as opposed to a MAC address). |
| 281 | ####################################### |
| 282 | |
| 283 | def test_ib_unsolicited_passive_open_specific(self): |
| 284 | """Data-path: in-band, unsolicited/passive, open encryption, specific peer |
| 285 | |
| 286 | Verifies end-to-end discovery + data-path creation. |
| 287 | """ |
| 288 | self.run_ib_data_path_test( |
| 289 | ptype=aconsts.PUBLISH_TYPE_UNSOLICITED, |
| 290 | stype=aconsts.SUBSCRIBE_TYPE_PASSIVE, |
| 291 | encr_type=self.ENCR_TYPE_OPEN, |
| 292 | use_peer_id=True) |
| 293 | |
| 294 | def test_ib_unsolicited_passive_open_any(self): |
| 295 | """Data-path: in-band, unsolicited/passive, open encryption, any peer |
| 296 | |
| 297 | Verifies end-to-end discovery + data-path creation. |
| 298 | """ |
| 299 | self.run_ib_data_path_test( |
| 300 | ptype=aconsts.PUBLISH_TYPE_UNSOLICITED, |
| 301 | stype=aconsts.SUBSCRIBE_TYPE_PASSIVE, |
| 302 | encr_type=self.ENCR_TYPE_OPEN, |
| 303 | use_peer_id=False) |
| 304 | |
| 305 | def test_ib_unsolicited_passive_passphrase_specific(self): |
| 306 | """Data-path: in-band, unsolicited/passive, passphrase, specific peer |
| 307 | |
| 308 | Verifies end-to-end discovery + data-path creation. |
| 309 | """ |
| 310 | self.run_ib_data_path_test( |
| 311 | ptype=aconsts.PUBLISH_TYPE_UNSOLICITED, |
| 312 | stype=aconsts.SUBSCRIBE_TYPE_PASSIVE, |
| 313 | encr_type=self.ENCR_TYPE_PASSPHRASE, |
| 314 | use_peer_id=True) |
| 315 | |
| 316 | def test_ib_unsolicited_passive_passphrase_any(self): |
| 317 | """Data-path: in-band, unsolicited/passive, passphrase, any peer |
| 318 | |
| 319 | Verifies end-to-end discovery + data-path creation. |
| 320 | """ |
| 321 | self.run_ib_data_path_test( |
| 322 | ptype=aconsts.PUBLISH_TYPE_UNSOLICITED, |
| 323 | stype=aconsts.SUBSCRIBE_TYPE_PASSIVE, |
| 324 | encr_type=self.ENCR_TYPE_PASSPHRASE, |
| 325 | use_peer_id=False) |
| 326 | |
| 327 | def test_ib_solicited_active_open_specific(self): |
Etan Cohen | ba8a53f | 2017-06-05 12:55:02 -0700 | [diff] [blame] | 328 | """Data-path: in-band, solicited/active, open encryption, specific peer |
Etan Cohen | fc5f373 | 2017-06-02 17:31:52 -0700 | [diff] [blame] | 329 | |
Etan Cohen | ba8a53f | 2017-06-05 12:55:02 -0700 | [diff] [blame] | 330 | Verifies end-to-end discovery + data-path creation. |
| 331 | """ |
| 332 | self.run_ib_data_path_test( |
| 333 | ptype=aconsts.PUBLISH_TYPE_SOLICITED, |
| 334 | stype=aconsts.SUBSCRIBE_TYPE_ACTIVE, |
| 335 | encr_type=self.ENCR_TYPE_OPEN, |
| 336 | use_peer_id=True) |
Etan Cohen | fc5f373 | 2017-06-02 17:31:52 -0700 | [diff] [blame] | 337 | |
| 338 | def test_ib_solicited_active_open_any(self): |
Etan Cohen | ba8a53f | 2017-06-05 12:55:02 -0700 | [diff] [blame] | 339 | """Data-path: in-band, solicited/active, open encryption, any peer |
Etan Cohen | fc5f373 | 2017-06-02 17:31:52 -0700 | [diff] [blame] | 340 | |
Etan Cohen | ba8a53f | 2017-06-05 12:55:02 -0700 | [diff] [blame] | 341 | Verifies end-to-end discovery + data-path creation. |
| 342 | """ |
| 343 | self.run_ib_data_path_test( |
| 344 | ptype=aconsts.PUBLISH_TYPE_SOLICITED, |
| 345 | stype=aconsts.SUBSCRIBE_TYPE_ACTIVE, |
| 346 | encr_type=self.ENCR_TYPE_OPEN, |
| 347 | use_peer_id=False) |
Etan Cohen | fc5f373 | 2017-06-02 17:31:52 -0700 | [diff] [blame] | 348 | |
| 349 | def test_ib_solicited_active_passphrase_specific(self): |
Etan Cohen | ba8a53f | 2017-06-05 12:55:02 -0700 | [diff] [blame] | 350 | """Data-path: in-band, solicited/active, passphrase, specific peer |
Etan Cohen | fc5f373 | 2017-06-02 17:31:52 -0700 | [diff] [blame] | 351 | |
Etan Cohen | ba8a53f | 2017-06-05 12:55:02 -0700 | [diff] [blame] | 352 | Verifies end-to-end discovery + data-path creation. |
| 353 | """ |
| 354 | self.run_ib_data_path_test( |
| 355 | ptype=aconsts.PUBLISH_TYPE_SOLICITED, |
| 356 | stype=aconsts.SUBSCRIBE_TYPE_ACTIVE, |
| 357 | encr_type=self.ENCR_TYPE_PASSPHRASE, |
| 358 | use_peer_id=True) |
Etan Cohen | fc5f373 | 2017-06-02 17:31:52 -0700 | [diff] [blame] | 359 | |
| 360 | def test_ib_solicited_active_passphrase_any(self): |
Etan Cohen | ba8a53f | 2017-06-05 12:55:02 -0700 | [diff] [blame] | 361 | """Data-path: in-band, solicited/active, passphrase, any peer |
Etan Cohen | fc5f373 | 2017-06-02 17:31:52 -0700 | [diff] [blame] | 362 | |
Etan Cohen | ba8a53f | 2017-06-05 12:55:02 -0700 | [diff] [blame] | 363 | Verifies end-to-end discovery + data-path creation. |
| 364 | """ |
| 365 | self.run_ib_data_path_test( |
| 366 | ptype=aconsts.PUBLISH_TYPE_SOLICITED, |
| 367 | stype=aconsts.SUBSCRIBE_TYPE_ACTIVE, |
| 368 | encr_type=self.ENCR_TYPE_PASSPHRASE, |
| 369 | use_peer_id=False) |
Etan Cohen | fc5f373 | 2017-06-02 17:31:52 -0700 | [diff] [blame] | 370 | |
Etan Cohen | ba8a53f | 2017-06-05 12:55:02 -0700 | [diff] [blame] | 371 | ####################################### |
| 372 | # Positive Out-of-Band (OOB) tests key: |
| 373 | # |
| 374 | # names is: test_oob_<encr_type>_<peer_spec> |
| 375 | # where: |
| 376 | # |
| 377 | # encr_type: Encription type: open, passphrase |
| 378 | # peer_spec: Peer specification method: any or specific |
| 379 | # |
| 380 | # Note: Out-of-Band means using a non-Wi-Fi Aware mechanism for discovery and |
| 381 | # exchange of MAC addresses and then Wi-Fi Aware for data-path. |
| 382 | ####################################### |
| 383 | |
| 384 | def test_oob_open_specific(self): |
| 385 | """Data-path: out-of-band, open encryption, specific peer |
| 386 | |
| 387 | Verifies end-to-end discovery + data-path creation. |
| 388 | """ |
| 389 | self.run_oob_data_path_test( |
| 390 | encr_type=self.ENCR_TYPE_OPEN, |
| 391 | use_peer_id=True) |
| 392 | |
| 393 | def test_oob_open_any(self): |
| 394 | """Data-path: out-of-band, open encryption, any peer |
| 395 | |
| 396 | Verifies end-to-end discovery + data-path creation. |
| 397 | """ |
| 398 | self.run_oob_data_path_test( |
| 399 | encr_type=self.ENCR_TYPE_OPEN, |
| 400 | use_peer_id=False) |
| 401 | |
| 402 | def test_oob_passphrase_specific(self): |
| 403 | """Data-path: out-of-band, passphrase, specific peer |
| 404 | |
| 405 | Verifies end-to-end discovery + data-path creation. |
| 406 | """ |
| 407 | self.run_oob_data_path_test( |
| 408 | encr_type=self.ENCR_TYPE_PASSPHRASE, |
| 409 | use_peer_id=True) |
| 410 | |
| 411 | def test_oob_passphrase_any(self): |
| 412 | """Data-path: out-of-band, passphrase, any peer |
| 413 | |
| 414 | Verifies end-to-end discovery + data-path creation. |
| 415 | """ |
| 416 | self.run_oob_data_path_test( |
| 417 | encr_type=self.ENCR_TYPE_PASSPHRASE, |
| 418 | use_peer_id=False) |