| Index: server/site_tests/network_WiFiRoaming/005SuspendRoam
|
| diff --git a/server/site_tests/network_WiFiRoaming/005SuspendRoam b/server/site_tests/network_WiFiRoaming/005SuspendRoam
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..1a45d971d7a1f4ce605fdc008559cabfbbe9558b
|
| --- /dev/null
|
| +++ b/server/site_tests/network_WiFiRoaming/005SuspendRoam
|
| @@ -0,0 +1,66 @@
|
| +# Copyright (c) 2010 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 test that the connection manager is able
|
| +# to roam to a previously connected AP when it loses connectivity to its
|
| +# current AP on resume. To accomplish this, we join one AP (so we are
|
| +# sure that flimflam remembers it), then join a second AP which we
|
| +# shut down while the DUT is suspended. We sit around and observe
|
| +# if and how long it takes for the connection manager to re-acquire
|
| +# connectivity to the first AP. We expect the DUT will resume, find
|
| +# the previous AP is gone, and then roam to the other AP.
|
| +{ "name":"SuspendRoam",
|
| + "steps":[
|
| + [ "create", { "type":"hostap" } ],
|
| +
|
| + # NB: use a fixed SSID so we know what to reference below
|
| + [ "config", { "channel":"2412", "mode":"11g",
|
| + "ssid": 'SuspendRoam_t1'} ],
|
| +
|
| + # Connect to the first AP. This just guarantees that this AP has
|
| + # been placed in the connection manager profile.
|
| + [ "connect", { "security":"none" } ],
|
| + [ "client_ping", { "count":"10" } ],
|
| + [ "deconfig" ],
|
| +
|
| + # Configure and connect to the second AP.
|
| + [ "config", { "channel":"2462", "mode":"11g",
|
| + "ssid_suffix": 't2'} ],
|
| + [ "connect", { "security":"none" } ],
|
| + [ "client_ping", { "count":"10" } ],
|
| + [ "deconfig" ],
|
| +
|
| + # Ask the DUT to sleep for 20 seconds while we switch things around,
|
| + # then see how long it takes for the DUT to return the service to the
|
| + # "ready" state. As a result, the arguments to this command are a
|
| + # combination of suspend and wait_service arguments. In this case,
|
| + # except for "suspend_time", all arguments are to wait_change. Note
|
| + # that the wait_change occurs AFTER the suspend, 20 seconds later in
|
| + # this specific example. Note also that we must specify the SSID of
|
| + # the previous AP to wait for; otherwise this will wait for the AP
|
| + # we just deconfig'd to come ready (and fail).
|
| + [ "wait_service_suspend_bg",
|
| + { "suspend_time": "20", # How long to sleep
|
| + "run_timeout":20, # Maximum time to wait
|
| + "debug":True, # Output all state changes
|
| + "states": [ # Wait for "ready" state
|
| + ('SuspendRoam_t1', 'ready')
|
| + ] } ],
|
| +
|
| + # Locally, let's wait 10 seconds to make sure the DUT is really asleep
|
| + # before we proceed.
|
| + [ "sleep", { "time":"15" } ],
|
| +
|
| + # Shut down the second AP and bring the first one back up
|
| + [ "config", { "channel":"2412", "mode":"11g",
|
| + "ssid": 'SuspendRoam_t1'} ],
|
| +
|
| + # Wait for the DUT to wake up and return the results of wait_suspend
|
| + [ "wait_service_suspend_end", { } ],
|
| +
|
| + [ "client_ping", { "count":"10" } ],
|
| +
|
| + [ "destroy" ],
|
| + ],
|
| +}
|
|
|