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 #TODO(chromium:500040) Do not assume eth0 as network interface to monitor. 10 class hardware_StorageQualTrimStress(test.test): 11 """Do traffic and trim while suspending aggressively.""" 12 13 version = 1 14 def run_once(self, client_ip, duration): 15 client = hosts.create_host(client_ip) 16 client_at = autotest.Autotest(client) 17 control = """job.parallel( 18 [lambda: job.run_test('power_SuspendStress', tag='disk', 19 duration=%d, init_delay=10, min_suspend=7, min_resume=30, 20 interface='eth0')], 21 [lambda: job.run_test('hardware_TrimIntegrity', test_length=%d+30, 22 disable_sysinfo=True, 23 tag='qual_trim')])""" % (duration, duration-30) 24 client_at.run(control, '.', None) 25 26