NeilBrown: Fix tests/layouts

Martin F. Krafft madduck at alioth.debian.org
Sun Aug 29 11:55:48 UTC 2010


Module: mdadm
Branch: upstream
Commit: 69a3f12e6ee173964369baf558d71f74748ae3b5
URL:    http://git.debian.org/?p=pkg-mdadm/mdadm.git;a=commit;h=69a3f12e6ee173964369baf558d71f74748ae3b5

Author: NeilBrown <neilb at suse.de>
Date:   Thu Jul 29 14:20:35 2010 +1000

Fix tests/layouts

some attributes files now return "new (old)", so allow for that when
reading the attr file.

Signed-off-by: NeilBrown <neilb at suse.de>

---

 tests/07layouts |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tests/07layouts b/tests/07layouts
index e72bb35..4c20eb8 100644
--- a/tests/07layouts
+++ b/tests/07layouts
@@ -33,7 +33,7 @@ checkgeo() {
    if [ $# -gt 0 ] ; then
       val=$1
       shift
-      if [ " `cat /sys/block/$dev/md/$attr`" != " $val" ]
+      if [ " `sed 's/ .*//' /sys/block/$dev/md/$attr`" != " $val" ]
       then echo "$attr doesn't match for $dev"
            exit 1
       fi




More information about the pkg-mdadm-commits mailing list