From: Zdenek Kabelac Date: Fri, 9 Sep 2011 13:19:19 +0000 (+0000) Subject: Updated testing script X-Git-Tag: v2_02_91~576 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=eeef3558876b7e2797b5179f859a06c4ede2b7f2;p=lvm2.git Updated testing script Since attrs were extended by 2 new fields update check functions. --- diff --git a/test/lib/check.sh b/test/lib/check.sh index 116ecdc14..2837a226e 100644 --- a/test/lib/check.sh +++ b/test/lib/check.sh @@ -139,8 +139,8 @@ mirror() { mirror_nonredundant() { lv="$1/$2" - lvs -oattr "$lv" | grep "^ *m.....$" >/dev/null || { - if lvs -oattr "$lv" | grep "^ *o.....$" >/dev/null && + lvs -oattr "$lv" | grep "^ *m.......$" >/dev/null || { + if lvs -oattr "$lv" | grep "^ *o.......$" >/dev/null && lvs -a | fgrep "[${2}_mimage" >/dev/null; then echo "TEST WARNING: $lv is a snapshot origin and looks like a mirror," echo "assuming it is actually a mirror" @@ -183,7 +183,7 @@ linear() { active() { lv="$1/$2" - lvl -oattr "$lv" 2> /dev/null | grep "^ *....a.$" >/dev/null || { + lvl -oattr "$lv" 2> /dev/null | grep "^ *....a...$" >/dev/null || { echo "$lv expected active, but lvs says it's not:" lvl "$lv" -o+devices 2>/dev/null exit 1 @@ -197,7 +197,7 @@ active() { inactive() { lv="$1/$2" - lvl -oattr "$lv" 2> /dev/null | grep '^ *....[-isd].$' >/dev/null || { + lvl -oattr "$lv" 2> /dev/null | grep '^ *....[-isd]...$' >/dev/null || { echo "$lv expected inactive, but lvs says it's not:" lvl "$lv" -o+devices 2>/dev/null exit 1