[ $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
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 ======================"
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"
{
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
+}