Whamcloud - gitweb
Branch HEAD
authorfanyong <fanyong>
Thu, 4 Dec 2008 03:31:15 +0000 (03:31 +0000)
committerfanyong <fanyong>
Thu, 4 Dec 2008 03:31:15 +0000 (03:31 +0000)
b=17770
i=Elena Gryaznova

avoid using quota_usr/quota_2usr groups

lustre/tests/acceptance-small.sh
lustre/tests/sanity-quota.sh
lustre/tests/sanity.sh
lustre/tests/sanityN.sh
lustre/tests/test-framework.sh

index f80ce68..7b320d8 100755 (executable)
@@ -148,7 +148,7 @@ for NAME in $CONFIGS; do
                $DEBUG_OFF
                myUID=$RUNAS_ID
                myRUNAS=$RUNAS
-               FAIL_ON_ERROR=false check_runas_id_ret $myUID $myRUNAS || { myRUNAS="" && myUID=$UID; }
+               FAIL_ON_ERROR=false check_runas_id_ret $myUID $myUID $myRUNAS || { myRUNAS="" && myUID=$UID; }
                chown $myUID:$myUID $DBENCHDIR
                duration=""
                [ "$SLOW" = "no" ] && duration=" -t 120"
@@ -183,7 +183,7 @@ for NAME in $CONFIGS; do
                $DEBUG_OFF
                myUID=$RUNAS_ID
                myRUNAS=$RUNAS
-               FAIL_ON_ERROR=false check_runas_id_ret $myUID $myRUNAS || { myRUNAS="" && myUID=$UID; }
+               FAIL_ON_ERROR=false check_runas_id_ret $myUID $myUID $myRUNAS || { myRUNAS="" && myUID=$UID; }
                chown $myUID:$myUID $BONDIR             
                $myRUNAS bonnie++ -f -r 0 -s$((SIZE / 1024)) -n 10 -u$myUID:$myUID -d$BONDIR
                $DEBUG_ON
@@ -213,7 +213,7 @@ for NAME in $CONFIGS; do
                $DEBUG_OFF
                myUID=$RUNAS_ID
                myRUNAS=$RUNAS
-               FAIL_ON_ERROR=false check_runas_id_ret $myUID $myRUNAS || { myRUNAS="" && myUID=$UID; }
+               FAIL_ON_ERROR=false check_runas_id_ret $myUID $myUID $myRUNAS || { myRUNAS="" && myUID=$UID; }
                chown $myUID:$myUID $IOZDIR
                $myRUNAS iozone $IOZONE_OPTS -s $SIZE -f $IOZFILE 2>&1 | tee $IOZLOG
                tail -1 $IOZLOG | grep -q complete || \
index 7cf7cbb..939afef 100644 (file)
@@ -137,10 +137,10 @@ lustre_fail() {
        esac
 }
 
-RUNAS="runas -u $TSTID"
-RUNAS2="runas -u $TSTID2"
-FAIL_ON_ERROR=true check_runas_id $TSTID $RUNAS
-FAIL_ON_ERROR=true check_runas_id $TSTID2 $RUNAS2
+RUNAS="runas -u $TSTID -g $TSTID"
+RUNAS2="runas -u $TSTID2 -g $TSTID2"
+FAIL_ON_ERROR=true check_runas_id $TSTID $TSTID $RUNAS
+FAIL_ON_ERROR=true check_runas_id $TSTID2 $TSTID2 $RUNAS2
 
 FAIL_ON_ERROR=false
 
index a7437dc..3d05213 100644 (file)
@@ -126,7 +126,7 @@ rm -rf $DIR/[Rdfs][0-9]*
 # $RUNAS_ID may get set incorrectly somewhere else
 [ $UID -eq 0 -a $RUNAS_ID -eq 0 ] && error "\$RUNAS_ID set to 0, but \$UID is also 0!"
 
-check_runas_id $RUNAS_ID $RUNAS
+check_runas_id $RUNAS_ID $RUNAS_ID $RUNAS
 
 build_test_filter
 
@@ -3162,7 +3162,7 @@ test_72() { # bug 5695 - Test that on 2.6 remove_suid works properly
        [ "$RUNAS_ID" = "$UID" ] && skip "RUNAS_ID = UID = $UID -- skipping" && return
 
         # Check that testing environment is properly set up. Skip if not
-        FAIL_ON_ERROR=false check_runas_id_ret $RUNAS_ID $RUNAS || {
+        FAIL_ON_ERROR=false check_runas_id_ret $RUNAS_ID $RUNAS_ID $RUNAS || {
                 skip "User $RUNAS_ID does not exist - skipping"
                 return 0
         }
index a0ef265..1dba529 100644 (file)
@@ -67,7 +67,7 @@ rm -rf $DIR1/[df][0-9]* $DIR1/lnk
 # $RUNAS_ID may get set incorrectly somewhere else
 [ $UID -eq 0 -a $RUNAS_ID -eq 0 ] && error "\$RUNAS_ID set to 0, but \$UID is also 0!"
 
-check_runas_id $RUNAS_ID $RUNAS
+check_runas_id $RUNAS_ID $RUNAS_ID $RUNAS
 
 build_test_filter
 
index afbe3e4..42b3963 100644 (file)
@@ -2020,8 +2020,9 @@ get_stripe () {
 
 check_runas_id_ret() {
     local myRC=0
-    local myRUNAS_ID=$1
-    shift
+    local myRUNAS_UID=$1
+    local myRUNAS_GID=$2
+    shift 2
     local myRUNAS=$@
     if [ -z "$myRUNAS" ]; then
         error_exit "myRUNAS command must be specified for check_runas_id"
@@ -2032,20 +2033,21 @@ check_runas_id_ret() {
     fi
     mkdir $DIR/d0_runas_test
     chmod 0755 $DIR
-    chown $myRUNAS_ID:$myRUNAS_ID $DIR/d0_runas_test
+    chown $myRUNAS_UID:$myRUNAS_GID $DIR/d0_runas_test
     $myRUNAS touch $DIR/d0_runas_test/f$$ || myRC=$?
     rm -rf $DIR/d0_runas_test
     return $myRC
 }
 
 check_runas_id() {
-    local myRUNAS_ID=$1
-    shift
+    local myRUNAS_UID=$1
+    local myRUNAS_GID=$2
+    shift 2
     local myRUNAS=$@
-    check_runas_id_ret $myRUNAS_ID $myRUNAS || \
-        error "unable to write to $DIR/d0_runas_test as UID $myRUNAS_ID.
+    check_runas_id_ret $myRUNAS_UID $myRUNAS_GID $myRUNAS || \
+        error "unable to write to $DIR/d0_runas_test as UID $myRUNAS_UID.
         Please set RUNAS_ID to some UID which exists on MDS and client or
-        add user $myRUNAS_ID:$myRUNAS_ID on these nodes."
+        add user $myRUNAS_UID:$myRUNAS_GID on these nodes."
 }
 
 # Run multiop in the background, but wait for it to print