diff --git a/lustre/tests/acceptance-small.sh b/lustre/tests/acceptance-small.sh index 14f7d58904a0a827572d37a6d4a03daeabcdedb7..b654398bee030ca8a03610a8bfabc315aeb49ba9 100755 --- a/lustre/tests/acceptance-small.sh +++ b/lustre/tests/acceptance-small.sh @@ -140,7 +140,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" @@ -175,7 +175,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 @@ -205,7 +205,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 || \ diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 29c6f2d2c3fff380384f0797b42f81219d97b73f..072d25cee66fdb6024c0a4ccf285284b298e066c 100644 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -124,7 +124,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 @@ -3094,7 +3094,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 } diff --git a/lustre/tests/sanityN.sh b/lustre/tests/sanityN.sh index 037043d4c5501a594219e45aa7fe05c419aaf5e8..7152ae128d00b6a1e558a91f492f0a99f62d151c 100644 --- a/lustre/tests/sanityN.sh +++ b/lustre/tests/sanityN.sh @@ -63,7 +63,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 diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index f104563176942097826da4c0ee000dbfc14a0c72..352bf7ed49cb912ff39adb81e4271cba46d171c9 100644 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -1734,28 +1734,30 @@ 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" 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=1 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