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 from autotest_lib.server import autotest 6 from autotest_lib.server import hosts 7 from autotest_lib.server import test 8 9 10 #TODO(chromium:500040) Do not assume eth0 as network interface to monitor. 11 class hardware_StorageQualSuspendStress(test.test): 12 """ Run Fio while suspending aggressively.""" 13 14 version = 1 15 16 def run_once(self, client_ip, duration): 17 client = hosts.create_host(client_ip) 18 client_at = autotest.Autotest(client) 19 control = """job.parallel( 20 [lambda: job.run_test('power_SuspendStress', tag='disk', 21 duration=%d, init_delay=10, min_suspend=7, min_resume=30, 22 interface='eth0')], 23 [lambda: job.run_test('hardware_StorageFio', test_length=%d+30, 24 disable_sysinfo=True, requirements=[('write_stress', [])], 25 tag='qual_suspend')])""" % (duration, duration-30) 26 client_at.run(control, '.', None) 27 28