Linux RAID subsystem development
 help / color / mirror / Atom feed
From: Adam Kwolek <adam.kwolek@intel.com>
To: neilb@suse.de
Cc: linux-raid@vger.kernel.org, dan.j.williams@intel.com,
	ed.ciechanowski@intel.com, wojciech.neubauer@intel.com
Subject: [PATCH 2/6] UT FIX: imsm container can have different blocks number
Date: Tue, 08 Feb 2011 14:30:45 +0100	[thread overview]
Message-ID: <20110208133045.8787.69711.stgit@gklab-128-013.igk.intel.com> (raw)
In-Reply-To: <20110208131046.8787.1777.stgit@gklab-128-013.igk.intel.com>

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>
---

 tests/env-imsm-template |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tests/env-imsm-template b/tests/env-imsm-template
index 74c43c6..7a2890c 100644
--- a/tests/env-imsm-template
+++ b/tests/env-imsm-template
@@ -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 )


  parent reply	other threads:[~2011-02-08 13:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-08 13:30 [PATCH 0/6] Reshape fixes (expansion) Adam Kwolek
2011-02-08 13:30 ` [PATCH 1/6] imsm: FIX: Wrong output string format Adam Kwolek
2011-02-08 13:30 ` Adam Kwolek [this message]
2011-02-08 13:30 ` [PATCH 3/6] FIX: Compare the same units Adam Kwolek
2011-02-08 13:31 ` [PATCH 4/6] FIX: compare blocks on all data disks Adam Kwolek
2011-02-08 13:31 ` [PATCH 5/6] FIX: Container can be left frozen Adam Kwolek
2011-02-08 13:31 ` [PATCH 6/6] FIX: md runs recovery instead reshape for growing single disk raid0 array Adam Kwolek
2011-02-09  3:10 ` [PATCH 0/6] Reshape fixes (expansion) NeilBrown
2011-02-09  7:31   ` Kwolek, Adam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110208133045.8787.69711.stgit@gklab-128-013.igk.intel.com \
    --to=adam.kwolek@intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=ed.ciechanowski@intel.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=wojciech.neubauer@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox