1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00

tests/pty.sh: skip 4 tests when running as root

This commit is contained in:
Martijn Dekker 2021-01-20 05:01:57 +00:00
parent e245856fd2
commit 21c42fcef8

View file

@ -208,6 +208,9 @@ w allo
u ^hello\r?\n$ u ^hello\r?\n$
! !
if [[ $(id -u) == 0 ]]
then print -u2 -r "${Command}[$LINENO]: warning: running as root: skipping test POSIX sh 096(C)"
else
# err_exit # # err_exit #
tst $LINENO <<"!" tst $LINENO <<"!"
L POSIX sh 096(C) L POSIX sh 096(C)
@ -236,6 +239,7 @@ r stty intr \^C
r echo r echo
r history r history
! !
fi
# err_exit # # err_exit #
tst $LINENO <<"!" tst $LINENO <<"!"
@ -249,6 +253,9 @@ c echo ok\n
u ^ok\r?\n$ u ^ok\r?\n$
! !
if [[ $(id -u) == 0 ]]
then print -u2 -r "${Command}[$LINENO]: warning: running as root: skipping test POSIX sh 099(C)"
else
# err_exit # # err_exit #
tst $LINENO <<"!" tst $LINENO <<"!"
L POSIX sh 099(C) L POSIX sh 099(C)
@ -277,6 +284,7 @@ r stty intr \^C
r echo last r echo last
r history r history
! !
fi
# err_exit # # err_exit #
tst $LINENO <<"!" tst $LINENO <<"!"
@ -356,6 +364,9 @@ c \cD
u ^done\r?\n$ u ^done\r?\n$
! !
if [[ $(id -u) == 0 ]]
then print -u2 -r "${Command}[$LINENO]: warning: running as root: skipping test POSIX sh 111(C)"
else
# err_exit # # err_exit #
tst $LINENO <<"!" tst $LINENO <<"!"
L POSIX sh 111(C) L POSIX sh 111(C)
@ -375,6 +386,7 @@ w history
u #echo save u #echo save
r history r history
! !
fi
# Following test is disabled because it fails on too many systems, either intermittently # Following test is disabled because it fails on too many systems, either intermittently
# or consistently, through no fault of ksh, because vi(1) somehow fails to write "/tmp/" # or consistently, through no fault of ksh, because vi(1) somehow fails to write "/tmp/"
@ -404,6 +416,9 @@ u ^hello world\r?\n$
! !
end_disabled end_disabled
if [[ $(id -u) == 0 ]]
then print -u2 -r "${Command}[$LINENO]: warning: running as root: skipping test POSIX sh 251(C)"
else
# err_exit # # err_exit #
tst $LINENO <<"!" tst $LINENO <<"!"
L POSIX sh 251(C) L POSIX sh 251(C)
@ -446,6 +461,7 @@ r echo repeat-2
c n c n
r echo repeat-3 r echo repeat-3
! !
fi
# Following test is disabled because a bug in pty causes it to fail on too # Following test is disabled because a bug in pty causes it to fail on too
# many operating systems. Apparently pty doesn't handle SIGTSTP correctly: # many operating systems. Apparently pty doesn't handle SIGTSTP correctly: