mgs_HOST=${mgs_HOST:-$mds_HOST}
ost_HOST=${ost_HOST:-$(hostname)}
ostfailover_HOST=${ostfailover_HOST}
-CLIENTS=""
# FILESET variable is used by sanity.sh to verify fileset
# feature, tests should pass even under subdirectory namespace.
FILESET=${FILESET:-""}
# For multiple clients testing, we need use the cfg/ncli.sh config file, and
# only need specify the "RCLIENTS" variable. The "CLIENTS" and "CLIENTCOUNT"
# variables are defined in init_clients_lists(), called from cfg/ncli.sh.
-CLIENT1=${CLIENT1:-$(hostname)}
-SINGLECLIENT=$CLIENT1
RCLIENTS=${RCLIENTS:-""}
init_clients_lists
run_test 2 "run llverfs on OST ldiskfs/zfs filesystem"
test_3 () {
- [ -z "$CLIENTS" ] && skip_env "CLIENTS not defined, skipping"
[ -z "$MPIRUN" ] && skip_env "MIPRUN not defined, skipping"
[ -z "$MDSRATE" ] && skip_env "MDSRATE not defined, skipping"
[ ! -x $MDSRATE ] && skip_env "$MDSRATE not built, skipping"
remote_mds_nodsh && skip "remote MDS with nodsh"
-[ -z "$CLIENTS" ] && skip_env "$TESTSUITE: Need two or more clients"
[ $CLIENTCOUNT -lt 2 ] &&
skip_env "$TESTSUITE: Need 2+ clients, have only $CLIENTCOUNT"
remote_mds_nodsh && skip_env "remote MDS with nodsh"
remote_ost_nodsh && skip_env "remote OST with nodsh"
-[ -z "$CLIENTS" -o $CLIENTCOUNT -lt 3 ] &&
+[$CLIENTCOUNT -lt 3 ] &&
skip_env "need three or more clients"
if [ -z "$SHARED_DIRECTORY" ] || ! check_shared_dir $SHARED_DIRECTORY; then
remote_mds_nodsh && skip_env "remote MDS with nodsh" && exit 0
remote_ost_nodsh && skip_env "remote OST with nodsh" && exit 0
-[ -z "$CLIENTS" -o $CLIENTCOUNT -lt 3 ] &&
+[ $CLIENTCOUNT -lt 3 ] &&
skip_env "need three or more clients" && exit 0
if [ -z "$SHARED_DIRECTORY" ] || ! check_shared_dir $SHARED_DIRECTORY; then
remote_mds_nodsh && skip_env "remote MDS with nodsh" && exit 0
remote_ost_nodsh && skip_env "remote OST with nodsh" && exit 0
-[ -z "$CLIENTS" -o $CLIENTCOUNT -lt 3 ] &&
+[ $CLIENTCOUNT -lt 3 ] &&
skip_env "need three or more clients" && exit 0
if [ -z "$SHARED_DIRECTORY" ] || ! check_shared_dir $SHARED_DIRECTORY; then
run_test 133 "don't fail on flock resend"
test_134() {
- [ -z "$CLIENTS" ] && skip "Need two or more clients" && return
[ $CLIENTCOUNT -lt 2 ] &&
{ skip "Need 2+ clients, have $CLIENTCOUNT" && return; }
}
test_21b() {
- [ -z "$CLIENTS" ] && skip "Need two or more clients" && return
[ $CLIENTCOUNT -lt 2 ] &&
{ skip "Need 2+ clients, have $CLIENTCOUNT" && return; }
# start multi-client tests
test_70a () {
- [ -z "$CLIENTS" ] &&
- { skip "Need two or more clients." && return; }
[ $CLIENTCOUNT -lt 2 ] &&
{ skip "Need two or more clients, have $CLIENTCOUNT" && return; }
test_70f() {
# [ x$ost1failover_HOST = x$ost_HOST ] &&
# { skip "Failover host not defined" && return; }
-# [ -z "$CLIENTS" ] &&
-# { skip "CLIENTS are not specified." && return; }
# [ $CLIENTCOUNT -lt 2 ] &&
# { skip "Need 2 or more clients, have $CLIENTCOUNT" && return; }
local post
local var=${SINGLEMDS}_svc
- [ -n "$CLIENTS" ] || { skip "Need two or more clients" && exit 0; }
[ $CLIENTCOUNT -ge 2 ] || \
{ skip "Need two or more clients, have $CLIENTCOUNT" && \
exit 0; }
test_33a() {
remote_mds_nodsh && skip "remote MDS with nodsh" && return
- [ -z "$CLIENTS" ] && skip "Need two or more clients, have $CLIENTS"
[ $CLIENTCOUNT -lt 2 ] &&
skip "Need two or more clients, have $CLIENTCOUNT"
test_33b() {
remote_mds_nodsh && skip "remote MDS with nodsh" && return
- [ -n "$CLIENTS" ] || { skip "Need two or more clients" && return 0; }
[ $CLIENTCOUNT -ge 2 ] ||
{ skip "Need two or more clients, have $CLIENTCOUNT" &&
return 0; }
run_test 33d "DNE distributed operation should trigger COS"
test_33e() {
- [ -n "$CLIENTS" ] || skip "Need two or more clients"
[ $CLIENTCOUNT -ge 2 ] ||
skip "Need two or more clients, have $CLIENTCOUNT"
[ $MDSCOUNT -lt 2 ] && skip "needs >= 2 MDTs"
# Sanity check: exclude the dup entries
RCLIENTS=$(for i in ${rclients//,/ }; do echo $i; done | sort -u)
- clients="$SINGLECLIENT $HOSTNAME $RCLIENTS"
+ export CLIENT1=${CLIENT1:-$HOSTNAME}
+ export SINGLECLIENT=$CLIENT1
+
+ 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)
+ export CLIENTS=$(comma_list $clients)
local -a remoteclients=($RCLIENTS)
for ((i=0; $i<${#remoteclients[@]}; i++)); do
varname=CLIENT$((i + 2))
- eval $varname=${remoteclients[i]}
+ eval export $varname=${remoteclients[i]}
done
- CLIENTCOUNT=$((${#remoteclients[@]} + 1))
+ export CLIENTCOUNT=$((${#remoteclients[@]} + 1))
}
get_random_entry () {