]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Allow test to detect 'resync=DELAYED' state
authorNeilBrown <neilb@suse.de>
Mon, 31 Jan 2011 05:59:40 +0000 (16:59 +1100)
committerNeilBrown <neilb@suse.de>
Mon, 31 Jan 2011 05:59:40 +0000 (16:59 +1100)
There is no space around the '=' when resync is delayed,
so allow for that in pattern matching.

Signed-off-by: NeilBrown <neilb@suse.de>
test

diff --git a/test b/test
index a94aef32f9d2956055a0ba10af35b21ef8b490dd..277f94a8b2eb621821c97e0a244569d5beab8880 100755 (executable)
--- a/test
+++ b/test
@@ -127,14 +127,14 @@ check() {
 
      nosync )
        sleep 0.5
-       if grep -s -E '(resync|recovery|reshape) =' > /dev/null /proc/mdstat ; then
+       if grep -s -E '(resync|recovery|reshape) *=' > /dev/null /proc/mdstat ; then
                echo >&2 "ERROR resync or recovery is happening!"; cat /proc/mdstat ; exit 1;
        fi
      ;;
 
     wait )
       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
       do sleep 2;
       done
       ;;