export NAME MOUNT START CLEAN
. $LUSTRE/tests/cfg/$NAME.sh
- if [ ! -f /lib/modules/$(uname -r)/kernel/fs/lustre/mds.ko -a \
- ! -f `dirname $0`/../mds/mds.ko ]; then
- export CLIENTMODSONLY=true
- fi
-
assert_env mds_HOST MDS_MKFS_OPTS
assert_env ost_HOST OST_MKFS_OPTS OSTCOUNT
assert_env FSNAME MOUNT MOUNT2
test_32a() {
# this test is totally useless on a client-only system
- [ -n "$CLIENTONLY" -o -n "$CLIENTMODSONLY" ] && skip "client only testing" && return 0
+ client_only && skip "client only testing" && return 0
[ "$NETTYPE" = "tcp" ] || { skip "NETTYPE != tcp" && return 0; }
[ -z "$TUNEFS" ] && skip_env "No tunefs" && return 0
test_32b() {
# this test is totally useless on a client-only system
- [ -n "$CLIENTONLY" -o -n "$CLIENTMODSONLY" ] && skip "client only testing" && return 0
+ client_only && skip "client only testing" && return 0
[ "$NETTYPE" = "tcp" ] || { skip "NETTYPE != tcp" && return 0; }
[ -z "$TUNEFS" ] && skip_env "No tunefs" && return
run_test 36 "df report consistency on OSTs with different block size"
test_37() {
- [ -n "$CLIENTONLY" -o -n "$CLIENTMODSONLY" ] && skip "client only testing" && return 0
+ client_only && skip "client only testing" && return 0
LOCAL_MDSDEV="$TMP/mdt.img"
SYM_MDSDEV="$TMP/sym_mdt.img"
test_55() {
rm -rf $DIR/d55
mkdir $DIR/d55
- check_fstype && skip_env "can't find fs $FSTYPE" && return
+ client_only && skip "Not a server" && return
mount -t $FSTYPE -o loop,iopen $EXT2_DEV $DIR/d55 || error "mounting"
touch $DIR/d55/foo
$IOPENTEST1 $DIR/d55/foo $DIR/d55 || error "running $IOPENTEST1"
export RLUSTRE=${RLUSTRE:-$LUSTRE}
export RPWD=${RPWD:-$PWD}
export I_MOUNTED=${I_MOUNTED:-"no"}
+ if [ ! -f /lib/modules/$(uname -r)/kernel/fs/lustre/mds.ko -a \
+ ! -f `dirname $0`/../mds/mds.ko ]; then
+ export CLIENTMODSONLY=yes
+ fi
# command line
load_module osc/osc
load_module lov/lov
load_module mgc/mgc
- if [ -z "$CLIENTONLY" ] && [ -z "$CLIENTMODSONLY" ]; then
+ if ! client_only; then
grep -q crc16 /proc/kallsyms || { modprobe crc16 2>/dev/null || true; }
grep -q jbd /proc/kallsyms || { modprobe jbd 2>/dev/null || true; }
[ "$FSTYPE" = "ldiskfs" ] && load_module ../ldiskfs/ldiskfs/ldiskfs
echo ${nodes[i]}
}
+client_only () {
+ [ "$CLIENTONLY" ] || [ "$CLIENTMODSONLY" = yes ]
+}
+
is_patchless ()
{
lctl get_param version | grep -q patchless