• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2012 Collabora Ltd. 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.client.cros import storage as storage_mod
6
7NAME = "hardware_Usb30Throughput"
8AUTHOR = "Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>"
9PURPOSE = "Check that there are no transfer speed downgrade after suspend."
10CRITERIA = "Fails if transfer rate is below expectations"
11TIME="SHORT"
12TEST_CATEGORY = "Functional"
13TEST_CLASS = "hardware"
14TEST_TYPE = "client"
15
16DOC = """Measure transfer rates for a number of times.
17If any of the transfer rate is below expectation the test fails.
18
19This test need a high-speed USB 3.0 device connected, with a mountable file
20system on a single partition.
21No user should be logged in via GUI to avoid automounter interfere with the
22test.
23
24@param measurements: (10) number of times to repeat xfer rate measureaments
25@param size: (10Mb) the size of the file to transfer for each |measureaments|
26@param fs_uuid: UUID for USB storage define volume, if auto detection does not
27       work.
28@param min_speed: (300Mb/sec) a float number for the minimum speed accepted.
29       Any |measureaments| performing below it will make the test fail
30"""
31
32storage_filter, args_dict = storage_mod.args_to_storage_dict(args)
33if not storage_filter:
34    storage_filter = {'bus': 'usb'}
35measurements = int(args_dict.get('measurements', 10))
36size = int(args_dict.get('size', 10))
37min_speed = float(args_dict.get('min_speed', 300))
38
39job.run_test('hardware_Usb30Throughput', storage_filter=storage_filter,
40             measurements=measurements, size=size, min_speed=min_speed)
41