Home | History | Annotate | Download | only in network_WiFi_SimpleConnect
      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 
      5 AUTHOR = 'wiley, pstew, quiche'
      6 NAME = 'network_WiFi_SimpleConnect.wifi_checkHiddenWEP'
      7 TIME = 'SHORT'
      8 TEST_TYPE = 'Server'
      9 ATTRIBUTES = "suite:wifi_correctness_cros_core, suite:wifi_flaky, suite:wifi_release"
     10 SUITE = 'wifi_flaky, wifi_correctness_cros_core, wifi_release'
     11 DEPENDENCIES = 'wificell'
     12 
     13 DOC = """
     14 This test case verifies that the DUT can connect to a hidden SSID
     15 using all variants of 40/104 bit open/shared WEP encryption.
     16 """
     17 
     18 
     19 from autotest_lib.client.common_lib.cros.network import xmlrpc_datatypes
     20 from autotest_lib.client.common_lib.cros.network import xmlrpc_security_types
     21 from autotest_lib.server.cros.network import hostap_config
     22 
     23 
     24 def 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 
     48 def 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 
     57 parallel_simple(run, machines)
     58