blob: b6e4fc89025f8c32e7d41e418680fe80b35d05e1 [file] [log] [blame]
# Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# This test run is designed to check that the connection manager
# re-scans a few times before quiescing after losing a connection.
# We simulate this by shutting off an AP in full sight of the
# DUT, waiting for a bit, and then re-instating the AP. We choose
# a hidden AP since this requires the connection manager to do the
# scans (since only the connection manager knows to scan for them,
# as opposed to wpa_supplicant).
{ "name": "RetryConnectHidden",
"steps":[
[ "create", { "type": "hostap" } ],
# Create a hidden-ssid AP.
[ "config", { "channel": "2412", "mode": "11g",
"hidessid": None } ],
# Connect with the intent of retaining this information in the profile
# so we should auto-connect to it later.
[ "connect", { "security": "none", "hidden":True } ],
# Shut down the AP in full view of the DUT.
[ "deconfig" ],
# Wait for the connection manager to acknowledge the connection loss.
[ "wait_service", { "run_timeout":40, # Timeout is 40 seconds
"debug":True, # Print state transitions
"states":[
(None, 'idle') # Wait for transition to a
] } ], # 'idle' state.
# Allow the client to settle down, so all of the immediate reactions
# to the disconnection by wpa_supplicant and the connection manager
# have completed.
[ "sleep", { "time":"20" } ],
# Start the AP up again, at a different frequency. We start it up
# after a delay in order to simulate the situation where the initial
# connection-manager-initiated scan fails to detect the AP. Scanning
# isn't perfect, so we want to simulate that case.
[ "config", { "channel": "2462", "mode": "11g",
"hidessid": None } ],
# Wait for the connection manager to bring the connection back up after
# scanning.
[ "wait_service", { "run_timeout":40, # Timeout is 40 seconds
"debug":True, # Print state transitions
"states":[
(None, 'ready') # Wait for the default
] } ], # service to become 'ready'.
[ "destroy" ],
],
}