Allow test to detect 'resync=DELAYED' state

There is no space around the '=' when resync is delayed,
so allow for that in pattern matching.

Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
NeilBrown 2011-01-31 16:59:40 +11:00
parent ca4fe0bfd3
commit 0d711ba4d3
1 changed files with 2 additions and 2 deletions

4
test
View File

@ -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
;;