summaryrefslogtreecommitdiffstats
path: root/tests/bugs/glusterd/bug-857330/common.rc
diff options
context:
space:
mode:
Diffstat (limited to 'tests/bugs/glusterd/bug-857330/common.rc')
-rw-r--r--tests/bugs/glusterd/bug-857330/common.rc10
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/bugs/glusterd/bug-857330/common.rc b/tests/bugs/glusterd/bug-857330/common.rc
index 8342dccb442..d0aa4b1a640 100644
--- a/tests/bugs/glusterd/bug-857330/common.rc
+++ b/tests/bugs/glusterd/bug-857330/common.rc
@@ -47,9 +47,11 @@ function get-task-id-xml()
function get-task-status()
{
- $CLI $COMMAND | grep -o $PATTERN
- if [ ${PIPESTATUS[0]} -ne 0 ]; then
- return 1
+ pattern=$1
+ val=1
+ test=$(gluster $COMMAND | grep -o $pattern 2>&1)
+ if [ $? -eq 0 ]; then
+ val=0
fi
- return 0
+ echo $val
}