• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
5from autotest_lib.server import autotest
6from autotest_lib.server import hosts
7from autotest_lib.server import test
8
9
10class hardware_StorageQualSuspendStress(test.test):
11    """ Run Fio while suspending aggressively."""
12
13    version = 1
14
15    def run_once(self, client_ip, duration):
16        client = hosts.create_host(client_ip)
17        client_at = autotest.Autotest(client)
18        timeout = int(duration * 1.5)
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                check_connection=True)],
23            [lambda: job.run_test('hardware_StorageFio', test_length=%d,
24                disable_sysinfo=True, requirements=[('write_stress', [])],
25                tag='qual_suspend')], timeout=%d)""" % \
26            (duration, duration, timeout)
27        client_at.run(control, '.', None)
28
29