summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2015-05-28 08:53:26 +0200
committerNeilBrown <neilb@suse.de>2015-05-28 09:00:36 +0200
commit4a859abdc9dfd8f3de42e748a8ed96a14f8c9339 (patch)
tree73a6be50be270d2c6295a275c7877cb68c72cb11
parenttests/imsm-grow-template change 'wait' to 'check wait' (diff)
downloadmdadm-4a859abdc9dfd8f3de42e748a8ed96a14f8c9339.tar.xz
mdadm-4a859abdc9dfd8f3de42e748a8ed96a14f8c9339.zip
test: make 'check wait' more reliable.
'recover' etc doesn't appear in /proc/mdstat immediately. The "sync" thread must be started first. But 'sync_action' shows it as soon as MD_RECOVERY_NEEDED is set in the kernel. So look there too. Now maybe I can get rid of some of those silly 'sleep' calls. Signed-off-by: NeilBrown <neilb@suse.de>
-rwxr-xr-xtest2
1 files changed, 1 insertions, 1 deletions
diff --git a/test b/test
index 50acedfe..9610b657 100755
--- a/test
+++ b/test
@@ -200,7 +200,7 @@ check() {
p=`cat /proc/sys/dev/raid/speed_limit_max`
echo 2000000 > /proc/sys/dev/raid/speed_limit_max
sleep 0.1
- while grep -E '(resync|recovery|reshape|check|repair) *=' > /dev/null /proc/mdstat
+ while grep -E '(resync|recovery|reshape|check|repair) *=' > /dev/null /proc/mdstat /sys/block/md*/md/sync_action
do sleep 0.5;
done
echo $p > /proc/sys/dev/raid/speed_limit_max