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