[sheepdog] [PATCH stable-0.6 11/22] tests/functional: fixed wrong error message

Hitoshi Mitake mitake.hitoshi at gmail.com
Mon Aug 12 16:55:15 CEST 2013


From: Kai Zhang <kyle at zelin.io>

v2:
- fixed indention error

Signed-off-by: Kai Zhang <kyle at zelin.io>
Signed-off-by: Liu Yuan <namei.unix at gmail.com>
---
 tests/functional/common.rc | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/tests/functional/common.rc b/tests/functional/common.rc
index 88f4c24..1ef9992 100644
--- a/tests/functional/common.rc
+++ b/tests/functional/common.rc
@@ -209,12 +209,13 @@ _wait_for_sheep()
         fi
 
         nr_sheep="$(echo "$node_list" | wc -l)"
+        nr_sheep=$(($nr_sheep-1))
 
-        if [ ${nr_sheep} -eq $(($1+1)) ]; then
+        if [ ${nr_sheep} -eq $1 ]; then
             break
         fi
-        if [ ${nr_sheep} -gt $(($1+1)) ]; then
-            _die "ERROR: too many sheep in cluster: ${nr_sheep}"
+        if [ ${nr_sheep} -gt $1 ]; then
+            _die "ERROR: too many sheep in cluster: ${nr_sheep}, expect: $1"
         fi
     done
 }
-- 
1.8.1.2




More information about the sheepdog mailing list