Whamcloud - gitweb
b=20748
authorgrev <grev>
Wed, 23 Sep 2009 19:25:40 +0000 (19:25 +0000)
committergrev <grev>
Wed, 23 Sep 2009 19:25:40 +0000 (19:25 +0000)
i=Alexey.Lyashkov
skip test_55 for client only testing;
new client_only fn

lustre/tests/acceptance-small.sh
lustre/tests/conf-sanity.sh
lustre/tests/sanity.sh
lustre/tests/test-framework.sh

index c55f7b9..687c7e6 100755 (executable)
@@ -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
index 73c63df..36dfc89 100644 (file)
@@ -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"
 
index 1789969..86a899a 100644 (file)
@@ -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"
index d1d9f87..d8b75b3 100644 (file)
@@ -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