1# Copyright 2014 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 5NAME = 'hardware_StorageStress.stress' 6AUTHOR = 'mohsinally' 7PURPOSE = 'Run various storage stress tests' 8ATTRIBUTES = "suite:stress" 9SUITE = "stress" 10TIME = 'LONG' 11TEST_CLASS = 'stress' 12TEST_TYPE = 'server' 13 14DOC = """ 15Variants of the test are run to simulate a number of scenarios while execising 16device storage. 17 18run_hardware_storage_stress_suspend: 19This test calls hardware_StorageFio to write data once and repeatedly verifies 20data in the storage for 20 minutes with machine suspended 1 minute between 21each verify. 22 23run_hardware_storage_stress: 24This test calls hardware_StorageFio to write data once and repeatedly verifies 25data in the storage for 5 minutes. 26 27While the test is running, we can corrupt the SSD and check the test is 28finding it with: 29 30 dd if=/dev/zero of=<tested partition> bs=512k 31 32run_hardware_storage_reboot: 33This test calls hardware_StorageFio to write data once and repeatedly verifies 34data in the storage for 5 minutes with machine rebooted between each verify. 35""" 36 37def run_hardware_storage_stress_suspend(machine): 38 job.run_test('hardware_StorageStress', client_ip=machine, 39 power_command='suspend', suspend_duration=60, duration=1200, 40 tag='suspend') 41 42def run_hardware_storage_stress(machine): 43 job.run_test('hardware_StorageStress', client_ip=machine, 44 power_command='nothing', gap=5, duration=300, tag='bare') 45 46def run_hardware_storage_stress_reboot(machine): 47 job.run_test('hardware_StorageStress', client_ip=machine, 48 gap=5, duration=300, tag='reboot') 49 50job.parallel_simple(run_hardware_storage_stress_suspend, machines) 51job.parallel_simple(run_hardware_storage_stress, machines) 52job.parallel_simple(run_hardware_storage_stress_reboot, machines) 53