#ALWAYS_EXCEPT=${ALWAYS_EXCEPT:-"27m 42a 42b 42c 42d 45 68 76"}
# UPDATE THE COMMENT ABOVE WITH BUG NUMBERS WHEN CHANGING ALWAYS_EXCEPT!
-[ "$SLOW" = "no" ] && EXCEPT_SLOW="24o 27m 36f 36g 51b 51c 60c 63 64b 68 71 73 78 101 103 115 120g"
+[ "$SLOW" = "no" ] && EXCEPT_SLOW="24o 27m 36f 36g 51b 51c 60c 63 64b 68 71 73 77f 78 101 103 115 120g 124b"
# Tests that fail on uml
CPU=`awk '/model/ {print $4}' /proc/cpuinfo`
}
run_test 36f "utime on file racing with OST BRW write =========="
-export FMD_MAX_AGE=`do_facet ost1 cat $LPROC/obdfilter/*/client_cache_seconds | head -n 1`
test_36g() {
- [ -z "$FMD_MAX_AGE" ] && skip "skip test for remote OST" && return
+ remote_ost && skip "remote OST" && return
+ export FMD_MAX_AGE=`do_facet ost1 cat $LPROC/obdfilter/*/client_cache_seconds 2> /dev/null | head -n 1`
FMD_BEFORE="`awk '/ll_fmd_cache/ { print $2 }' /proc/slabinfo`"
touch $DIR/d36/$tfile
sleep $((FMD_MAX_AGE + 12))
run_test 65i "set non-default striping on root directory (bug 6367)="
test_65j() { # bug6367
+ sync; sleep 1
# if we aren't already remounting for each test, do so for this test
if [ "$CLEANUP" = ":" -a "$I_MOUNTED" = "yes" ]; then
- cleanup -f || error "failed to unmount"
+ cleanup || error "failed to unmount"
setup
fi
$SETSTRIPE -d $MOUNT || error "setstripe failed"
test_65k() { # bug11679
[ "$OSTCOUNT" -lt 2 ] && skip "too few OSTs" && return
+ remote_mds_nodsh && skip "remote MDS" && return
echo "Check OST status: "
MDS_OSCS=`do_facet mds lctl dl | awk '/[oO][sS][cC].*md[ts]/ { print $4 }'`
test_102e() {
# b10930: star test for trusted.lov xattr
star --xhelp 2>&1 | grep -q nolustre
- if [ $? -ne 0 ]
- then
- skip "being skipped because a lustre-aware star is not installed." && return
- fi
+ [ $? -ne 0 ] && skip "lustre-aware star is not installed" && return
[ "$OSTCOUNT" -lt "4" ] && skip "skipping 4-stripe test" && return
setup_test102
mkdir -p $DIR/d102e
test_102f() {
# b10930: star test for trusted.lov xattr
star --xhelp 2>&1 | grep -q nolustre
- if [ $? -ne 0 ]
- then
- skip "being skipped because a lustre-aware star is not installed." && return
- fi
+ [ $? -ne 0 ] && skip "lustre-aware star is not installed" && return
[ "$OSTCOUNT" -lt "4" ] && skip "skipping 4-stripe test" && return
setup_test102
mkdir -p $DIR/d102f
test_102g() {
# b10930: star test for trusted.lov xattr
star --xhelp 2>&1 | grep -q nolustre
- if [ $? -ne 0 ]
- then
- skip "being skipped because a lustre-aware star is not installed." && return
- fi
+ [ $? -ne 0 ] && skip "lustre-aware star is not installed" && return
[ "$OSTCOUNT" -lt "4" ] && skip "skipping 4-stripe test" && return
setup_test102
mkdir -p $DIR/d102g
test_118b()
{
+ remote_ost_nodsh && skip "remote OST" && return
+
reset_async
#define OBD_FAIL_OST_ENOENT 0x217
test_118c()
{
+ remote_ost_nodsh && skip "remote OST" && return
+
reset_async
#define OBD_FAIL_OST_EROFS 0x216
test_118d()
{
+ remote_ost_nodsh && skip "remote OST" && return
+
reset_async
#define OBD_FAIL_OST_BRW_PAUSE_BULK
run_test 118g "Don't stay in wait if we got local -ENOMEM =========="
test_118h() {
+ remote_ost_nodsh && skip "remote OST" && return
+
reset_async
#define OBD_FAIL_OST_BRW_WRITE_BULK 0x20e
run_test 118h "Verify timeout in handling recoverables errors =========="
test_118i() {
+ remote_ost_nodsh && skip "remote OST" && return
+
reset_async
#define OBD_FAIL_OST_BRW_WRITE_BULK 0x20e
run_test 118i "Fix error before timeout in recoverable error =========="
test_118j() {
+ remote_ost_nodsh && skip "remote OST" && return
+
reset_async
#define OBD_FAIL_OST_BRW_WRITE_BULK2 0x220
get_lru_size "mdc-"
if test $lruresize_delta -gt $nolruresize_delta; then
- log "ls -la is $((lruresize_delta - $nolruresize_delta))s slower with lru resize enabled"
+ log "ls -la is $(((lruresize_delta - $nolruresize_delta) * 100 / $nolruresize_delta))% slower with lru resize enabled"
elif test $nolruresize_delta -gt $lruresize_delta; then
- log "ls -la is $((nolruresize_delta - $lruresize_delta))s faster with lru resize enabled"
+ log "ls -la is $(((nolruresize_delta - $lruresize_delta) * 100 / $nolruresize_delta))% faster with lru resize enabled"
else
log "lru resize performs the same with no lru resize"
fi
[ -d /r ] && export ROOT=${ROOT:-/r}
export TMP=${TMP:-$ROOT/tmp}
export TESTSUITELOG=${TMP}/${TESTSUITE}.log
+ export HOSTNAME=${HOSTNAME:-`hostname`}
export PATH=:$PATH:$LUSTRE/utils:$LUSTRE/utils/gss:$LUSTRE/tests
export LCTL=${LCTL:-"$LUSTRE/utils/lctl"}
load_module llite/lustre
load_module llite/llite_lloop
- rm -f $TMP/ogdb-`hostname`
- $LCTL modules > $TMP/ogdb-`hostname`
+ rm -f $TMP/ogdb-$HOSTNAME
+ OGDB=$TMP
+ [ -d /r ] && OGDB="/r/tmp"
+ $LCTL modules > $OGDB/ogdb-$HOSTNAME
+
# 'mount' doesn't look in $PATH, just sbin
[ -f $LUSTRE/utils/mount.lustre ] && cp $LUSTRE/utils/mount.lustre /sbin/. || true
}
do_node $client "sysctl -w lnet.debug=$PTLDEBUG;
sysctl -w lnet.subsystem_debug=${SUBSYSTEM# };
sysctl -w lnet.debug_mb=${DEBUG_SIZE}"
- [ -d /r ] && $LCTL modules > /r/tmp/ogdb-`hostname`
+ [ -d /r ] && $LCTL modules > /r/tmp/ogdb-$HOSTNAME
return 0
}
local running=$(do_node $client "grep -c $mnt' ' /proc/mounts") || true
if [ $running -ne 0 ]; then
echo "Stopping client $mnt (opts:$force)"
+ lsof | grep "$mnt" || true
do_node $client umount $force $mnt
fi
}
local facet=$1
local active=`facet_active $facet`
if [ "$facet" == client ]; then
- hostname
+ echo $HOSTNAME
else
echo `facet_host $active`
fi
HOST=$1
shift
local myPDSH=$PDSH
- if [ "$HOST" = "$(hostname)" ]; then
+ if [ "$HOST" = "$HOSTNAME" ]; then
myPDSH="no_dsh"
+ elif [ -z "$myPDSH" -o "$myPDSH" = "no_dsh" ]; then
+ echo "cannot run remote command on $HOST with $myPDSH"
+ return 128
fi
if $VERBOSE; then
echo "CMD: $HOST $@" >&2
fi
# assume client mount is local
- grep " $MOUNT " /proc/mounts && zconf_umount `hostname` $MOUNT $*
- grep " $MOUNT2 " /proc/mounts && zconf_umount `hostname` $MOUNT2 $*
+ grep " $MOUNT " /proc/mounts && zconf_umount $HOSTNAME $MOUNT $*
+ grep " $MOUNT2 " /proc/mounts && zconf_umount $HOSTNAME $MOUNT2 $*
[ "$CLIENTONLY" ] && return
for num in `seq $MDSCOUNT`; do
stop mds$num -f
}
mount_client() {
- grep " $1 " /proc/mounts || zconf_mount `hostname` $*
+ grep " $1 " /proc/mounts || zconf_mount $HOSTNAME $*
}
# return value:
[ ! -e /proc/fs/lustre/mdt/*MDT* ]
}
+remote_mds_nodsh()
+{
+ remote_mds && [ "$PDSH" = "no_dsh" -o -z "$PDSH" -o -z "$mds_HOST" ]
+}
+
remote_ost ()
{
[ $(grep -c obdfilter $LPROC/devices) -eq 0 ]
}
+remote_ost_nodsh()
+{
+ remote_ost && [ "$PDSH" = "no_dsh" -o -z "$PDSH" -o -z "$ost_HOST" ]
+}
+
mdts_nodes () {
local MDSNODES=$(facet_host $SINGLEMDS)
local NODES_sort
nodes_list () {
# FIXME. We need a list of clients
- local myNODES=`hostname`
+ local myNODES=$HOSTNAME
local myNODES_sort
- myNODES="$myNODES $(osts_nodes) $(mdts_nodes)"
+ if [ "$PDSH" -a "$PDSH" != "no_dsh" ]; then
+ myNODES="$myNODES $(osts_nodes) $(mdts_nodes)"
+ fi
+
myNODES_sort=$(for i in $myNODES; do echo $i; done | sort -u)
echo $myNODES_sort