From 269d635983d578e622ef0a329e4dc070034c9814 Mon Sep 17 00:00:00 2001 From: grev Date: Mon, 6 Jul 2009 13:35:23 +0000 Subject: [PATCH] b=19737 i=Robert.Read acc-sm, t-f NFSCLIENT changes --- lustre/tests/acceptance-small.sh | 2 ++ lustre/tests/test-framework.sh | 23 +++++++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/lustre/tests/acceptance-small.sh b/lustre/tests/acceptance-small.sh index 540d11e..c8a6be6 100755 --- a/lustre/tests/acceptance-small.sh +++ b/lustre/tests/acceptance-small.sh @@ -50,6 +50,8 @@ FORMAT=${FORMAT:-formatall} CLEANUP=${CLEANUP:-stopall} setup_if_needed() { + nfs_client_mode && return + local MOUNTED=$(mounted_lustre_filesystems) if $(echo $MOUNTED | grep -w -q $MOUNT); then check_config $MOUNT diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index 6a93c7d..c589231 100644 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -1317,6 +1317,8 @@ stopall() { } cleanupall() { + nfs_client_mode && return + stopall $* unload_modules } @@ -1371,6 +1373,8 @@ writeconf_all () { } setupall() { + nfs_client_mode && return + sanity_mount_check || error "environments are insane!" @@ -1477,7 +1481,24 @@ init_param_vars () { fi } +nfs_client_mode () { + if [ "$NFSCLIENT" ]; then + echo "NFSCLIENT mode: setup, cleanup, check config skipped" + local clients=$CLIENTS + [ -z $clients ] && clients=$(hostname) + + # FIXME: remove hostname when 19215 fixed + do_nodes $clients "echo \\\$(hostname); grep ' '$MOUNT' ' /proc/mounts" + declare -a nfsexport=(`grep ' '$MOUNT' ' /proc/mounts | awk '{print $1}' | awk -F: '{print $1 " " $2}'`) + do_nodes ${nfsexport[0]} "echo \\\$(hostname); df -T ${nfsexport[1]}" + return + fi + return 1 +} + check_config () { + nfs_client_mode && return + local mntpt=$1 local mounted=$(mount | grep " $mntpt ") @@ -1531,6 +1552,8 @@ check_timeout () { } check_and_setup_lustre() { + nfs_client_mode && return + local MOUNTED=$(mounted_lustre_filesystems) if [ -z "$MOUNTED" ] || ! $(echo $MOUNTED | grep -w -q $MOUNT); then [ "$REFORMAT" ] && formatall -- 1.8.3.1