1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-28 11:55:55 +03:00

Relax the mirror test in test/lib/check.sh.

This commit is contained in:
Petr Rockai 2011-01-07 13:03:46 +00:00
parent 2479e17526
commit 55be86d4c7

View File

@ -140,9 +140,15 @@ mirror() {
mirror_nonredundant() { mirror_nonredundant() {
lv="$1/$2" lv="$1/$2"
lvs -oattr "$lv" | grep -q "^ *m.....$" || { lvs -oattr "$lv" | grep -q "^ *m.....$" || {
echo "$lv expected a mirror, but is not:" if lvs -oattr "$lv" | grep -q "^ *o.....$" &&
lvs -a $lv lvs -a | fgrep -q "[${lv}_mimage"; then
exit 1 echo "TEST WARNING: $lv is a snapshot origin and looks like a mirror,"
echo "assuming it is actually a mirror"
else
echo "$lv expected a mirror, but is not:"
lvs -a $lv
exit 1
fi
} }
if test -n "$3"; then mirror_log_on "$1" "$2" "$3"; fi if test -n "$3"; then mirror_log_on "$1" "$2" "$3"; fi
} }