1# Copyright (c) 2013 The Chromium OS Authors. All rights reserved. 2# Use of this source code is governed by a BSD-style license that can be 3# found in the LICENSE file. 4 5AUTHOR = 'wiley, pstew, quiche' 6NAME = 'network_WiFi_SimpleConnect.wifi_checkHiddenWEP' 7TIME = 'SHORT' 8TEST_TYPE = 'Server' 9ATTRIBUTES = ('suite:wifi_flaky, suite:wifi_matfunc,' 10 'suite:wifi_release, subsystem:wifi') 11DEPENDENCIES = 'wificell' 12 13DOC = """ 14This test case verifies that the DUT can connect to a hidden SSID 15using all variants of 40/104 bit open/shared WEP encryption. 16""" 17 18 19from autotest_lib.client.common_lib.cros.network import xmlrpc_datatypes 20from autotest_lib.client.common_lib.cros.network import xmlrpc_security_types 21from autotest_lib.server.cros.network import hostap_config 22 23 24def get_configurations(): 25 wep40_keys = ['0123456789', '89abcdef01', '9876543210', 'fedcba9876'] 26 wep104_keys = ['0123456789abcdef0123456789', '89abcdef0123456789abcdef01', 27 'fedcba9876543210fedcba9876', '109fedcba987654321fedcba98'] 28 auth_algs = (xmlrpc_security_types.WEPConfig.AUTH_ALGORITHM_OPEN, 29 xmlrpc_security_types.WEPConfig.AUTH_ALGORITHM_SHARED) 30 configurations = [] 31 for wep_keys in (wep40_keys, wep104_keys): 32 for auth_alg in auth_algs: 33 wep_config = xmlrpc_security_types.WEPConfig( 34 wep_keys=wep_keys, 35 auth_algorithm=auth_alg) 36 ap_config = hostap_config.HostapConfig( 37 hide_ssid=True, 38 frequency=2412, 39 mode=hostap_config.HostapConfig.MODE_11G, 40 security_config=wep_config) 41 assoc_params = xmlrpc_datatypes.AssociationParameters( 42 is_hidden=True, 43 security_config=wep_config) 44 configurations.append((ap_config, assoc_params)) 45 return configurations 46 47 48def run(machine): 49 host = hosts.create_host(machine) 50 job.run_test('network_WiFi_SimpleConnect', 51 tag=NAME.split('.')[1], 52 host=host, 53 raw_cmdline_args=args, 54 additional_params=get_configurations()) 55 56 57parallel_simple(run, machines) 58