From 3770f0097ef8cd4cbb8fa0527e49ce37980b52d5 Mon Sep 17 00:00:00 2001 From: grev Date: Wed, 23 Sep 2009 19:25:40 +0000 Subject: [PATCH] b=20748 i=Alexey.Lyashkov skip test_55 for client only testing; new client_only fn --- lustre/tests/acceptance-small.sh | 5 ----- lustre/tests/conf-sanity.sh | 6 +++--- lustre/tests/sanity.sh | 2 +- lustre/tests/test-framework.sh | 10 +++++++++- 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/lustre/tests/acceptance-small.sh b/lustre/tests/acceptance-small.sh index c55f7b9..687c7e6 100755 --- a/lustre/tests/acceptance-small.sh +++ b/lustre/tests/acceptance-small.sh @@ -102,11 +102,6 @@ for NAME in $CONFIGS; do 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 MDSDEV assert_env ost_HOST OST_MKFS_OPTS OSTCOUNT assert_env FSNAME MOUNT MOUNT2 diff --git a/lustre/tests/conf-sanity.sh b/lustre/tests/conf-sanity.sh index 73c63df..36dfc89 100644 --- a/lustre/tests/conf-sanity.sh +++ b/lustre/tests/conf-sanity.sh @@ -966,7 +966,7 @@ cleanup_32() { 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 @@ -1024,7 +1024,7 @@ run_test 32a "Upgrade from 1.6 (not live)" 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 @@ -1308,7 +1308,7 @@ test_36() { # 12743 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" diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 1789969..86a899a 100644 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -2474,7 +2474,7 @@ check_fstype() { 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" diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index d1d9f87..d8b75b3 100644 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -135,6 +135,10 @@ init_test_env() { 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 @@ -213,7 +217,7 @@ load_modules_local() { load_module osc/osc load_module lov/lov load_module mgc/mgc - if [ -z "$CLIENTONLY" ] && [ -z "$CLIENTMODSONLY" ]; then + if ! client_only; then load_module mgs/mgs load_module mds/mds grep -q crc16 /proc/kallsyms || { modprobe crc16 2>/dev/null || true; } @@ -2295,6 +2299,10 @@ get_random_entry () { echo ${nodes[i]} } +client_only () { + [ "$CLIENTONLY" ] || [ "$CLIENTMODSONLY" = yes ] +} + is_patchless () { lctl get_param version | grep -q patchless -- 1.8.3.1