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