tests: wait for complete rebuild in integrity checks

'check wait' seems a bit racy now.
Wait for the array to be fully optimal before proceeding.

Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
NeilBrown 2015-05-15 09:40:33 +10:00
parent ada38ebbcb
commit e2a8e9dcf6
2 changed files with 3 additions and 3 deletions

View File

@ -27,7 +27,7 @@ do
exit 1 exit 1
fi fi
mdadm $md0 -a $i mdadm $md0 -a $i
check wait while ! (check state 'U*'); do check wait; sleep 0.2; done
done done
mdadm -S $md0 mdadm -S $md0
done done

View File

@ -47,10 +47,10 @@ do
exit 1 exit 1
fi fi
mdadm $md0 -a $first mdadm $md0 -a $first
check wait while ! (check state 'U*_U*'); do check wait; sleep 0.2; done
done done
mdadm $md0 -a $second mdadm $md0 -a $second
check wait while ! (check state 'U*'); do check wait; sleep 0.2; done
totest="$totest $second" totest="$totest $second"
done done
mdadm -S $md0 mdadm -S $md0