From: NeilBrown Date: Thu, 14 May 2015 23:40:33 +0000 (+1000) Subject: tests: wait for complete rebuild in integrity checks X-Git-Tag: mdadm-3.3.3~49 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e2a8e9dcf67a28bc722fa5ab2c49b0bc452d4d74;p=thirdparty%2Fmdadm.git 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 --- diff --git a/tests/01r5integ b/tests/01r5integ index ffb30ce9..48676a22 100644 --- a/tests/01r5integ +++ b/tests/01r5integ @@ -27,7 +27,7 @@ do exit 1 fi mdadm $md0 -a $i - check wait + while ! (check state 'U*'); do check wait; sleep 0.2; done done mdadm -S $md0 done diff --git a/tests/01raid6integ b/tests/01raid6integ index c6fcdae6..12f4d81b 100644 --- a/tests/01raid6integ +++ b/tests/01raid6integ @@ -47,10 +47,10 @@ do exit 1 fi mdadm $md0 -a $first - check wait + while ! (check state 'U*_U*'); do check wait; sleep 0.2; done done mdadm $md0 -a $second - check wait + while ! (check state 'U*'); do check wait; sleep 0.2; done totest="$totest $second" done mdadm -S $md0