Whamcloud - gitweb
Branch HEAD
[fs/lustre-release.git] / lustre / tests / test-framework.sh
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