summaryrefslogtreecommitdiffstats
path: root/tests/cluster.rc
diff options
context:
space:
mode:
authorHarshavardhana <harsha@harshavardhana.net>2014-08-23 02:14:36 -0700
committerHarshavardhana <harsha@harshavardhana.net>2014-09-05 10:04:20 -0700
commitfd500d4396f910e4cf759e0fffa4daf4ed24745a (patch)
tree2e52c1b64659efc3cf98fed31a8a2fc6f8a4bc26 /tests/cluster.rc
parent88159becd90d40323ecfc24cf40813538c9204cc (diff)
porting: Provide setfattr/getfattr implementation
- Use 'getfattr' properly avoid redundant options during xattr query - Untabify certain parts of tests (remove tabs) - Avoid backtick evaluation for certain values to make code more portable. - Use awk on FreeBSD/Darwin, since 'wc' implementation is broken and adds spurious spaces in its output. Change-Id: I7dcc0b70874e43b4cda8c306ed18a31b7a3f990a BUG: 1131713 Signed-off-by: Harshavardhana <harsha@harshavardhana.net> Reviewed-on: http://review.gluster.org/8520 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Emmanuel Dreyfus <manu@netbsd.org> Tested-by: Emmanuel Dreyfus <manu@netbsd.org>
Diffstat (limited to 'tests/cluster.rc')
-rwxr-xr-xtests/cluster.rc44
1 files changed, 22 insertions, 22 deletions
diff --git a/tests/cluster.rc b/tests/cluster.rc
index 49bd3caedec..42f3ad24434 100755
--- a/tests/cluster.rc
+++ b/tests/cluster.rc
@@ -21,12 +21,12 @@ function define_backends() {
local b;
for i in `seq 1 $count`; do
- eval "B$i=$B0/$i";
+ eval "B$i=$B0/$i";
done
for i in `seq 1 $count`; do
- b="B$i";
- mkdir -p ${!b}/glusterd;
+ b="B$i";
+ mkdir -p ${!b}/glusterd;
done
}
@@ -40,11 +40,11 @@ function define_glusterds() {
local popt;
for i in `seq 1 $count`; do
- b="B$i";
- h="H$i";
- wopt="management.working-directory=${!b}/glusterd";
- bopt="management.transport.socket.bind-address=${!h}";
- popt="--pid-file=${!b}/glusterd.pid";
+ b="B$i";
+ h="H$i";
+ wopt="management.working-directory=${!b}/glusterd";
+ bopt="management.transport.socket.bind-address=${!h}";
+ popt="--pid-file=${!b}/glusterd.pid";
sopt="management.glusterd-sockfile=${!b}/glusterd/gd.sock"
#Get the logdir
logdir=`gluster --print-logdir`
@@ -66,8 +66,8 @@ function start_glusterds() {
local g;
for i in `seq 1 $CLUSTER_COUNT`; do
- g="glusterd_$i";
- ${!g};
+ g="glusterd_$i";
+ ${!g};
done
}
@@ -98,15 +98,15 @@ function define_hosts() {
local count=$1;
for i in `seq 1 $count`; do
- eval "H_$i=${CLUSTER_PFX}.$i"
- eval "H$i=${CLUSTER_PFX}.$i";
- case $OSTYPE in
- NetBSD)
- ifconfig lo0 alias ${CLUSTER_PFX}.$i 2>/dev/null
- ;;
- *)
- ;;
- esac
+ eval "H_$i=${CLUSTER_PFX}.$i"
+ eval "H$i=${CLUSTER_PFX}.$i";
+ case $OSTYPE in
+ NetBSD)
+ ifconfig lo0 alias ${CLUSTER_PFX}.$i 2>/dev/null
+ ;;
+ *)
+ ;;
+ esac
done
}
@@ -116,9 +116,9 @@ function define_clis() {
local h;
for i in `seq 1 $count`; do
- b="B$i";
- eval "CLI_$i='$CLI --glusterd-sock=${!b}/glusterd/gd.sock'";
- eval "CLI$i='$CLI --glusterd-sock=${!b}/glusterd/gd.sock'";
+ b="B$i";
+ eval "CLI_$i='$CLI --glusterd-sock=${!b}/glusterd/gd.sock'";
+ eval "CLI$i='$CLI --glusterd-sock=${!b}/glusterd/gd.sock'";
done
}