Whamcloud - gitweb
b=13774
authorgrev <grev>
Sat, 27 Oct 2007 23:41:41 +0000 (23:41 +0000)
committergrev <grev>
Sat, 27 Oct 2007 23:41:41 +0000 (23:41 +0000)
i=Adilger
i=Walter
test_54e fix

b=13769
i=Adilger
i=Nathan

t-f helper check_runas_id()

lustre/tests/sanity.sh
lustre/tests/sanityN.sh
lustre/tests/test-framework.sh

index d7fecf8..df0ffa1 100644 (file)
@@ -132,7 +132,7 @@ else
        [ $RUNAS_ID -eq 0 ] && error "\$RUNAS_ID set to 0, but \$UID is also 0!"
 fi
 
-$RUNAS ls $DIR >/dev/null || error "uid $RUNAS_ID doesn't exist on MDS!"
+check_runas_id
 
 build_test_filter
 
@@ -2243,7 +2243,7 @@ test_54e() {
        check_kernel_version 46 || return 0
        f="$DIR/f54e"
        string="aaaaaa"
-       mknod $f c 4 0
+       mknod $f c 5 0
        echo $string > $f || error
 }
 run_test 54e "console/tty device works in lustre ======================"
index 975a88b..8773ebe 100644 (file)
@@ -67,6 +67,8 @@ OSTCOUNT=`cat $LPROC/lov/$LOVNAME/numobd`
 
 rm -rf $DIR1/[df][0-9]* $DIR1/lnk
 
+check_runas_id
+
 build_test_filter
 
 test_1a() {
index 88ec6f1..2cd3049 100644 (file)
@@ -749,7 +749,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]*
     fi
     if [ "$I_MOUNTED" = "yes" ]; then
         cleanupall -f || error "cleanup failed"
@@ -1129,3 +1129,13 @@ is_patchless ()
 {
     grep -q patchless $LPROC/version
 }
+
+check_runas_id() {
+    mkdir $DIR/d0_runas_test
+    chown $RUNAS_ID:$RUNAS_ID $DIR/d0_runas_test
+    $RUNAS touch $DIR/d0_runas_test/f$$ || \
+        error "unable to write to $DIR/d0_runas_test as UID $RUNAS_ID. 
+        Please set RUNAS_ID to some UID which exists on MDS and client or 
+        add user $RUNAS_ID:$RUNAS_ID on these nodes."
+    rm -rf $DIR/d0_runas_test
+}