1# Copyright 2015 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 5from autotest_lib.server import utils 6 7AUTHOR = 'samueltan, ejcaruso' 8NAME = 'network_WiFi_DarkResumeActiveScans' 9TIME = 'MEDIUM' 10TEST_TYPE = 'Server' 11DEPENDENCIES = 'wificell, servo, lucidsleep' 12ATTRIBUTES = 'suite:wifi_correctness_cros_core, suite:wifi_lucidsleep' 13SUITE = 'wifi_correctness_cros_core, wifi_lucidsleep' 14 15DOC = """ 16When wake on WiFi is supported and enabled, our system could wake up from 17suspend in dark resume for several reasons. Due to privacy concerns, we do not 18want active scans to be launched on certain types of dark resume wakes where the 19user does not expect information that can uniquely identify their system 20(e.g. MAC addresses) to be broadcasted. 21 22We permit active scans to be launched when the system wakes up due to a SSID 23match or disconnect, since we might try to connect or reconnect to known 24networks during these periods, and the connection/authentication process 25inevitably broadcasts MAC addresses. 26 27However, when the system wakes up due to a RTC timer (e.g. the periodic scan 28timer or DHCP lease renewal timer) or a packet pattern match, we expect the 29system to carry out its tasks and re-suspend without active scanning and 30broadcasting MAC addresses. 31 32This test attempts to verify that no active scans are started in dark resumes 33that are triggered by RTC timers or packet pattern matches. Verify this by 34triggering these wake events and analyzing packet captures to ensure that the 35DUT does not launch any probe requests during these dark resumes. 36""" 37 38args_dict = utils.args_to_dict(args) 39servo_args = hosts.CrosHost.get_servo_arguments(args_dict) 40 41def run(machine): 42 host = hosts.create_host(machine, servo_args=servo_args) 43 job.run_test('network_WiFi_DarkResumeActiveScans', 44 host=host, 45 raw_cmdline_args=args) 46 47parallel_simple(run, machines) 48