]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
UT FIX: imsm container can have different blocks number
authorAdam Kwolek <adam.kwolek@intel.com>
Tue, 8 Feb 2011 13:30:45 +0000 (14:30 +0100)
committerNeilBrown <neilb@suse.de>
Wed, 9 Feb 2011 02:47:55 +0000 (13:47 +1100)
When imsm container is created it have different blocks number
in /proc/mdstat depending on containing array raid level (raid0/raid5).
raid5 case:
md127 : inactive sdd[3](S) sde[2](S) sdc[1](S) sdb[0](S)
      2884 blocks super external:imsm

raid0 case:
md127 : inactive sdd[3](S) sde[2](S) sdc[1](S) sdb[0](S)
      836 blocks super external:imsm

Due to this, it cannot be compared to one value for both cases.

Test imsm container existence before unit test run only.

Signed-off-by: Adam Kwolek <adam.kwolek@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
tests/env-imsm-template

index 74c43c6803cbb1c54674da6bc6517485628fca08..7a2890cdb3d6c7cb3f9145b5132410de54e61305 100644 (file)
@@ -2,7 +2,7 @@ imsm_check() {
     udevadm settle
     case $1 in
     container )
-        grep -s "$(((418 * $2) / 2)) blocks super external:imsm" /proc/mdstat > /dev/null || {
+        grep -s "blocks super external:imsm" /proc/mdstat > /dev/null || {
             echo >&2 "**Fatal** Correctly formed container not found"; cat /proc/mdstat; exit 1; }
         ;;
     member )