CHERRY-PICK: hardware_SAT: add disk_thread argument to control disk stressing
We can use disk_thread to enable/disable -f argument in stressapptest.
This is useful when running stress test for long time and the MLC NAND has
low erase cycle counts.
BUG=chrome-os-partner:22209
TEST=run hardware_SAT test with disk_thread argument to True/False,
check the command of stressapptest.
Change-Id: I276e4391145dc923fb4aab2620db17a93bdebd66
Reviewed-on: https://chromium-review.googlesource.com/167827
Reviewed-by: Justin Chuang <jchuang@chromium.org>
Commit-Queue: Cheng-Yi Chiang <cychiang@chromium.org>
Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/195810
Reviewed-by: Bowgo Tsai <bowgotsai@chromium.org>
Commit-Queue: Justin Chuang <jchuang@chromium.org>
Tested-by: Justin Chuang <jchuang@chromium.org>
diff --git a/client/site_tests/hardware_SAT/hardware_SAT.py b/client/site_tests/hardware_SAT/hardware_SAT.py
index eb7c291..e3fdcfc 100644
--- a/client/site_tests/hardware_SAT/hardware_SAT.py
+++ b/client/site_tests/hardware_SAT/hardware_SAT.py
@@ -70,12 +70,14 @@
utils.make()
- def run_once(self, seconds=60, free_memory_fraction=0.95, wait_secs=0):
+ def run_once(self, seconds=60, free_memory_fraction=0.95, wait_secs=0,
+ disk_thread=True):
'''
Args:
free_memory_fraction: Fraction of free memory (as determined by
utils.freememtotal()) to use.
wait_secs: time to wait in seconds before executing stressapptest.
+ disk_thread: also stress disk using -f argument of stressapptest.
'''
assert free_memory_fraction > 0
assert free_memory_fraction < 1
@@ -116,8 +118,9 @@
# south bridge and SATA, as well as potentially finding SSD
# or disk cache problems. Two threads ensure multiple
# outstanding transactions to the disk, if supported.
- args += ' -f sat.diskthread.a' # disk thread
- args += ' -f sat.diskthread.b'
+ if disk_thread:
+ args += ' -f sat.diskthread.a' # disk thread
+ args += ' -f sat.diskthread.b'
if utils.get_board() == 'link':
args += memory_channel_args_sandybridge([