NeilBrown: ism-tests: fix the imsm-create-fail-rebuild test
Martin F. Krafft
madduck at alioth.debian.org
Thu May 7 12:11:33 UTC 2009
Module: mdadm
Branch: debian/experimental
Commit: 37353437daabcf05eb389782f61b90ae181b8979
URL: http://git.debian.org/?p=pkg-mdadm/mdadm.git;a=commit;h=37353437daabcf05eb389782f61b90ae181b8979
Author: NeilBrown <neilb at suse.de>
Date: Wed Apr 1 13:51:57 2009 +1100
ism-tests: fix the imsm-create-fail-rebuild test
it was testing the return status of mdadm wrongly, and
I found I needed a 'udevadm settle'.
---
tests/env-09imsm-create-fail-rebuild | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/tests/env-09imsm-create-fail-rebuild b/tests/env-09imsm-create-fail-rebuild
index 2fc90ed..b44746c 100644
--- a/tests/env-09imsm-create-fail-rebuild
+++ b/tests/env-09imsm-create-fail-rebuild
@@ -1,5 +1,5 @@
imsm_check_hold() {
- if [ mdadm --remove $1 $2 -eq 0 ]; then
+ if mdadm --remove $1 $2; then
echo "$2 removal from $1 should have been blocked" >&2
cat /proc/mdstat >&2
mdadm -E $2
@@ -8,7 +8,7 @@ imsm_check_hold() {
}
imsm_check_removal() {
- if [ mdadm --remove $1 $2 -ne 0 ]; then
+ if ! mdadm --remove $1 $2 ; then
echo "$2 removal from $1 should have succeeded" >&2
cat /proc/mdstat >&2
mdadm -E $2
@@ -17,6 +17,7 @@ imsm_check_removal() {
}
imsm_check() {
+ udevadm settle
case $1 in
container )
grep -s "$(((418 * $2)/2)) blocks super external:imsm" /proc/mdstat > /dev/null || {
More information about the pkg-mdadm-commits
mailing list