check wait waits reshape finishes, but it doesn't wait level changes.
The level change happens in a forked child progress. So we need to
search the child progress and monitor it.
Signed-off-by: Xiao Ni <xni@redhat.com>
Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
testdev $md0 3 19456 512
mdadm -G $md0 -l0
check wait; sleep 1
+while ps auxf | grep "mdadm -G" | grep -v grep
+do
+ sleep 1
+done
check raid0
testdev $md0 3 19456 512
mdadm -G $md0 -l5 --add $dev3 $dev4