summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtest11
1 files changed, 10 insertions, 1 deletions
diff --git a/test b/test
index 8a6418d6..850084c4 100755
--- a/test
+++ b/test
@@ -157,10 +157,13 @@ check() {
;;
wait )
+ 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
- do sleep 2;
+ do sleep 0.5;
done
+ echo $p > /proc/sys/dev/raid/speed_limit_max
;;
state )
@@ -217,6 +220,10 @@ testdev() {
fi
}
+fast_sync() {
+ echo 200000 > /proc/sys/dev/raid/speed_limit_max
+}
+
rotest() {
dev=$1
fsck -fn $dev >&2
@@ -232,6 +239,8 @@ do_test() {
$mdadm -Ssq 2> /dev/null
mdadm --zero $devlist 2> /dev/null
mdadm --zero $devlist 2> /dev/null
+ # this might have been reset: restore the default.
+ echo 2000 > /proc/sys/dev/raid/speed_limit_max
# source script in a subshell, so it has access to our
# namespace, but cannot change it.
echo -ne "$_script... "