diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index d7fecf86a90f9b3f7887ada76c65aa5da0f3d79c..df0ffa1c6264bdffadbf1fa842c7feee1ff9df12 100644 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -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 ======================" diff --git a/lustre/tests/sanityN.sh b/lustre/tests/sanityN.sh index 975a88b09089fa373a78c75c613eb01d81c75dc5..8773ebebaef31aab2f5d4e9d39f65abe4d1d8ca4 100644 --- a/lustre/tests/sanityN.sh +++ b/lustre/tests/sanityN.sh @@ -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() { diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index 88ec6f1cddbea0e1263f4e5e9512c7f665f158f3..2cd30491366d6dd9afdde2e8560d27593710f6a0 100644 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -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 +}