• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_correctness_cros_core, suite:wifi_flaky, '
10              'suite:wifi_matfunc, suite:wifi_matfunc_noservo,'
11              'suite:wifi_release, subsystem:wifi,'
12              'suite:android_wifi_connect')
13DEPENDENCIES = 'wificell'
14
15DOC = """
16This test case verifies that the DUT can connect to a hidden SSID
17using all variants of 40/104 bit open/shared WEP encryption.
18"""
19
20
21from autotest_lib.client.common_lib.cros.network import xmlrpc_datatypes
22from autotest_lib.client.common_lib.cros.network import xmlrpc_security_types
23from autotest_lib.server.cros.network import hostap_config
24
25
26def get_configurations():
27    wep40_keys = ['0123456789', '89abcdef01', '9876543210', 'fedcba9876']
28    wep104_keys = ['0123456789abcdef0123456789', '89abcdef0123456789abcdef01',
29                   'fedcba9876543210fedcba9876', '109fedcba987654321fedcba98']
30    auth_algs = (xmlrpc_security_types.WEPConfig.AUTH_ALGORITHM_OPEN,
31                 xmlrpc_security_types.WEPConfig.AUTH_ALGORITHM_SHARED)
32    configurations = []
33    for wep_keys in (wep40_keys, wep104_keys):
34        for auth_alg in auth_algs:
35            wep_config = xmlrpc_security_types.WEPConfig(
36                    wep_keys=wep_keys,
37                    auth_algorithm=auth_alg)
38            ap_config = hostap_config.HostapConfig(
39                    hide_ssid=True,
40                    frequency=2412,
41                    mode=hostap_config.HostapConfig.MODE_11G,
42                    security_config=wep_config)
43            assoc_params = xmlrpc_datatypes.AssociationParameters(
44                    is_hidden=True,
45                    security_config=wep_config)
46            configurations.append((ap_config, assoc_params))
47    return configurations
48
49
50def run(machine):
51    host = hosts.create_host(machine)
52    job.run_test('network_WiFi_SimpleConnect',
53                 tag=NAME.split('.')[1],
54                 host=host,
55                 raw_cmdline_args=args,
56                 additional_params=get_configurations())
57
58
59parallel_simple(run, machines)
60