[lvm-devel] master - tests: check.sh better if

Zdenek Kabelac zkabelac at sourceware.org
Thu Jun 29 20:28:47 UTC 2017


Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=51237cb5047a93382f8d239e9aa9d3899154300f
Commit:        51237cb5047a93382f8d239e9aa9d3899154300f
Parent:        db338c2b42abb6b5274fba5f93a982241afa8ecf
Author:        Zdenek Kabelac <zkabelac at redhat.com>
AuthorDate:    Thu Jun 29 09:40:01 2017 +0200
Committer:     Zdenek Kabelac <zkabelac at redhat.com>
CommitterDate: Thu Jun 29 22:23:17 2017 +0200

tests: check.sh better if

Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
---
 test/lib/check.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/test/lib/check.sh b/test/lib/check.sh
index 8555235..64019da 100644
--- a/test/lib/check.sh
+++ b/test/lib/check.sh
@@ -225,7 +225,7 @@ in_sync() {
 
 	b=( $(echo "${a[$idx]}" | sed s:/:' ':) )
 
-	if [ "${b[0]}" -eq 0 -o "${b[0]}" != "${b[1]}" ]; then
+	if [ "${b[0]}" -eq 0 ] || [ "${b[0]}" != "${b[1]}" ]; then
 		echo "$lvm_name ($type$snap) is not in-sync"
 		return 1
 	fi




More information about the lvm-devel mailing list