From d42fe6046a17aedc2dfa8b55b1ab0b3b0a9eac70 Mon Sep 17 00:00:00 2001
From: grev <grev>
Date: Wed, 3 Dec 2008 14:42:11 +0000
Subject: [PATCH] b=13584 i=Scjody test_99a fix: use $TMP as working dir

---
 lustre/tests/sanity.sh | 19 ++++---------------
 1 file changed, 4 insertions(+), 15 deletions(-)

diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh
index 79ccaf7b9c..ce38f136d6 100644
--- a/lustre/tests/sanity.sh
+++ b/lustre/tests/sanity.sh
@@ -3628,21 +3628,14 @@ test_80() { # bug 10718
 }
 run_test 80 "Page eviction is equally fast at high offsets too  ===="
 
-# on the LLNL clusters, runas will still pick up root's $TMP settings,
-# which will not be writable for the runas user, and then you get a CVS
-# error message with a corrupt path string (CVS bug) and panic.
-# We're not using much space, so just stick it in /tmp, which is safe.
-OLDTMPDIR=$TMPDIR
-OLDTMP=$TMP
-TMPDIR=/tmp
-TMP=/tmp
-OLDHOME=$HOME
-[ $RUNAS_ID -ne $UID ] && HOME=/tmp
-
 test_99a() {
 	mkdir -p $DIR/d99cvsroot
 	chown $RUNAS_ID $DIR/d99cvsroot
+	local oldPWD=$PWD	# bug 13584, use $TMP as working dir
+	cd $TMP
+	
 	$RUNAS cvs -d $DIR/d99cvsroot init || error
+	cd $oldPWD
 }
 run_test 99a "cvs init ========================================="
 
@@ -5994,10 +5987,6 @@ test_212() {
 }
 run_test 212 "Sendfile test ============================================"
 
-TMPDIR=$OLDTMPDIR
-TMP=$OLDTMP
-HOME=$OLDHOME
-
 log "cleanup: ======================================================"
 check_and_cleanup_lustre
 if [ "$I_MOUNTED" != "yes" ]; then
-- 
GitLab