test: make sure udev isn't opening a device before closing it.

As we open and close so quickly, udev might still have the device
open.  so call udevsettle before stopping an array during testing.

Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
NeilBrown 2008-11-04 20:51:12 +11:00
parent 90c8d6680d
commit 045495a394
1 changed files with 3 additions and 0 deletions

3
test
View File

@ -77,6 +77,9 @@ fi
# mdadm always adds --quiet, and we want to see any unexpected messages
mdadm() {
rm -f $targetdir/stderr
case $* in
*-S* ) udevsettle;;
esac
case $* in
*-C* ) $mdadm 2> $targetdir/stderr --quiet "$@" --auto=yes;;
* ) $mdadm 2> $targetdir/stderr --quiet "$@"