From fa423043b3bb152730f698cb5bf6126e2df882c2 Mon Sep 17 00:00:00 2001 From: Jian Yu Date: Fri, 18 Jan 2013 17:26:49 +0800 Subject: [PATCH] LU-2592 tests: do not remove $TMP/*active in rpc.sh The $TMP/*active files record the current active facets info under failover test configuration. They are removed from init_test_env() initially. If failover tests use do_rpc_nodes() which performs rpc.sh and in which init_test_env() is used, then the active facets info will be lost during the testing. This patch fixes the above issue by introducing an RPC_MODE variable which controls that the $TMP/*active files will not be removed from init_test_env() in rpc.sh. Test-Parameters: envdefinitions=SLOW=yes,ENABLE_QUOTA=yes clientcount=4 osscount=2 mdscount=2 austeroptions=-R failover=true useiscsi=true testlist=replay-vbr Signed-off-by: Jian Yu Change-Id: Iab464449e7c41ffd76256e9ec60b48b326f3ea9e Reviewed-on: http://review.whamcloud.com/5127 Tested-by: Hudson Tested-by: Maloo Reviewed-by: Keith Mannthey Reviewed-by: Wei Liu Reviewed-by: Oleg Drokin --- lustre/tests/rpc.sh | 2 +- lustre/tests/test-framework.sh | 19 +++++++++++-------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/lustre/tests/rpc.sh b/lustre/tests/rpc.sh index 098df10..bbe9337 100755 --- a/lustre/tests/rpc.sh +++ b/lustre/tests/rpc.sh @@ -9,7 +9,7 @@ if [ ! -f $LUSTRE/tests/rpc.sh ]; then fi . $LUSTRE/tests/test-framework.sh -init_test_env +RPC_MODE=true init_test_env . ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh} # Reset the trap on ERR set by the framework. Noticing this failure is the diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index f195b97..989031b 100644 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -118,10 +118,11 @@ print_summary () { } init_test_env() { - export LUSTRE=`absolute_path $LUSTRE` - export TESTSUITE=`basename $0 .sh` - export TEST_FAILED=false - export FAIL_ON_SKIP_ENV=${FAIL_ON_SKIP_ENV:-false} + export LUSTRE=$(absolute_path $LUSTRE) + export TESTSUITE=$(basename $0 .sh) + export TEST_FAILED=false + export FAIL_ON_SKIP_ENV=${FAIL_ON_SKIP_ENV:-false} + export RPC_MODE=${RPC_MODE:-false} export MKE2FS=$MKE2FS if [ -z "$MKE2FS" ]; then @@ -312,10 +313,12 @@ init_test_env() { shift $((OPTIND - 1)) ONLY=${ONLY:-$*} - # print the durations of each test if "true" - DDETAILS=${DDETAILS:-false} - [ "$TESTSUITELOG" ] && rm -f $TESTSUITELOG || true - rm -f $TMP/*active + # print the durations of each test if "true" + DDETAILS=${DDETAILS:-false} + [ "$TESTSUITELOG" ] && rm -f $TESTSUITELOG || true + if ! $RPC_MODE; then + rm -f $TMP/*active + fi } check_cpt_number() { -- 1.8.3.1