mirror of
https://repo.or.cz/socat.git
synced 2025-07-28 13:22:58 +00:00
issue error when PTY called with parameters
This commit is contained in:
parent
aae035c5b9
commit
b8d16ecd51
3 changed files with 39 additions and 2 deletions
32
test.sh
32
test.sh
|
@ -1,6 +1,6 @@
|
|||
#! /bin/bash
|
||||
# source: test.sh
|
||||
# Copyright Gerhard Rieger 2001-2010
|
||||
# Copyright Gerhard Rieger 2001-2011
|
||||
# Published under the GNU General Public License V.2, see file COPYING
|
||||
|
||||
# perform lots of tests on socat
|
||||
|
@ -10409,6 +10409,36 @@ esac
|
|||
N=$((N+1))
|
||||
|
||||
|
||||
# PTY address allowed to sepcify address parameters but ignored them
|
||||
NAME=PTY_VOIDARG
|
||||
case "$TESTS" in
|
||||
*%functions%*|*%bugs%*|*%pty%*|*%$NAME%*)
|
||||
TEST="$NAME: check if address params of PTY produce error"
|
||||
# invoke socat with address PTY and some param; expect an error
|
||||
if ! eval $NUMCOND; then :; else
|
||||
tf="$td/test$N.stdout"
|
||||
te="$td/test$N.stderr"
|
||||
tdiff="$td/test$N.diff"
|
||||
da="test$N $(date) $RANDOM"
|
||||
CMD0="$SOCAT $opts /dev/null PTY:/tmp/xyz"
|
||||
printf "test $F_n $TEST... " $N
|
||||
$CMD0 >/dev/null 2>"${te}0"
|
||||
rc0=$?
|
||||
if [ $rc0 -ne 0 ]; then
|
||||
$PRINTF "$OK\n"
|
||||
numOK=$((numOK+1))
|
||||
else
|
||||
$PRINTF "$FAILED\n"
|
||||
echo "$CMD0"
|
||||
cat "${te}0"
|
||||
numFAIL=$((numFAIL+1))
|
||||
fi
|
||||
fi # NUMCOND
|
||||
;;
|
||||
esac
|
||||
N=$((N+1))
|
||||
|
||||
|
||||
###############################################################################
|
||||
# here come tests that might affect your systems integrity. Put normal tests
|
||||
# before this paragraph.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue