From: grev Date: Tue, 27 Nov 2007 12:52:21 +0000 (+0000) Subject: b=13769 X-Git-Tag: v1_7_0_51~462 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=e664ea39c7cd659b4d2d7f7223af2d9553f38003;p=fs%2Flustre-release.git b=13769 i=Adilger i=Nathan t-f helper check_runas_id() b=14148 i=Adilger check_runas_id() modification --- diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 2cd7334..e6625536 100644 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -143,6 +143,8 @@ MAXFREE=${MAXFREE:-$((200000 * $OSTCOUNT))} [ -f $DIR/d52b/foo ] && chattr -i $DIR/d52b/foo rm -rf $DIR/[Rdfs][1-9]* +check_runas_id $RUNAS_ID $RUNAS + build_test_filter if [ "${ONLY}" = "MOUNT" ] ; then diff --git a/lustre/tests/sanityN.sh b/lustre/tests/sanityN.sh index ea6a79c..4ba69e8 100644 --- a/lustre/tests/sanityN.sh +++ b/lustre/tests/sanityN.sh @@ -75,6 +75,8 @@ OSTCOUNT=`cat $LPROC/lov/$LOVNAME/numobd` rm -rf $DIR1/[df][0-9]* $DIR1/lnk +check_runas_id $RUNAS_ID $RUNAS + build_test_filter test_1a() { diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index 6158781..cfaba5f 100644 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -931,7 +931,7 @@ cleanup_and_setup_lustre() { check_and_cleanup_lustre() { if [ "`mount | grep $MOUNT`" ]; then - rm -rf $DIR/[Rdfs][1-9]* + rm -rf $DIR/[Rdfs][0-9]* rm -f $DIR/${TESTSUITE}/[Rdfs][1-9]* fi if [ "$I_MOUNTED" = "yes" ]; then @@ -1374,3 +1374,17 @@ is_patchless () { grep -q patchless $LPROC/version } + +check_runas_id() { + local myRUNAS_ID=$1 + shift + local myRUNAS=$@ + mkdir $DIR/d0_runas_test + chmod 0755 $DIR + chown $myRUNAS_ID:$myRUNAS_ID $DIR/d0_runas_test + $myRUNAS touch $DIR/d0_runas_test/f$$ || \ + error "unable to write to $DIR/d0_runas_test as UID $myRUNAS_ID. + Please set RUNAS_ID to some UID which exists on MDS and client or + add user $myRUNAS_ID:$myRUNAS_ID on these nodes." + rm -rf $DIR/d0_runas_test +}