From b85f86b08fc1a95f1d2f00f5346be7682cc1f315 Mon Sep 17 00:00:00 2001 From: grev Date: Fri, 1 Aug 2008 16:02:46 +0000 Subject: [PATCH] b=16264 i=Adilger new t-f init clients list fn --- lustre/tests/test-framework.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index 3ee33cc..b1b5df1 100644 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -1561,6 +1561,29 @@ nodes_list () { echo $myNODES_sort } +init_clients_lists () { + # Sanity check: exclude the local client from RCLIENTS + local rclients=$(echo " $RCLIENTS " | sed -re "s/\s+$HOSTNAME\s+/ /g") + + # Sanity check: exclude the dup entries + rclients=$(for i in $rclients; do echo $i; done | sort -u) + + local clients="$SINGLECLIENT $HOSTNAME $rclients" + + # Sanity check: exclude the dup entries from CLIENTS + # for those configs which has SINGLCLIENT set to local client + clients=$(for i in $clients; do echo $i; done | sort -u) + + CLIENTS=`comma_list $clients` + local -a remoteclients=($rclients) + for ((i=0; $i<${#remoteclients[@]}; i++)); do + varname=CLIENT$((i + 2)) + eval $varname=${remoteclients[i]} + done + + CLIENTCOUNT=$((${#remoteclients[@]} + 1)) +} + is_patchless () { lctl get_param version | grep -q patchless -- 1.8.3.1