aboutsummaryrefslogtreecommitdiff
path: root/tests/aux/in.test
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2019-06-11 12:54:02 +0300
committerSergey Poznyakoff <gray@gnu.org>2019-06-11 13:18:29 +0300
commitbf6506cdc46446eada5090a428c2407ebd17468a (patch)
tree2113b5c049283413fb4fe3981a837989d2969918 /tests/aux/in.test
parent186b9a1c99988844c5ea3fcce1fcc6cadb491206 (diff)
downloadpies-bf6506cdc46446eada5090a428c2407ebd17468a.tar.gz
pies-bf6506cdc46446eada5090a428c2407ebd17468a.tar.bz2
Improve the nt tool. Test inet running instance limit.
* tests/Makefile.am: Add new test. * tests/aux/in.test (PIESCTL): Provide the necessary options. Discontinue the use of STOPCMD environment variable. New commands: enable, sleep, touch. * tests/testsuite.at (PIES_CONTROL_INIT): Rename pidfile to PIES_PIDFILE and ctlsock to PIES_CTLSOCK. Export both. Include maxinst.at * tests/control.at: Use new variables. * tests/inet.at: Remove the env block. * tests/iobuf.h (iobuf_copy): Return number of bytes copied. * tests/maxinst.at: New file. * tests/nt.c (netcat_stream_disconnect): New function. (netcat_stream_read): Disconnect the peer stream if no more input is available and the peer is not available for output (i.e. its output buffer is empty). (netcat_stream_write): Stop polling if output buffer is empty. (netcat): Fix event mask
Diffstat (limited to 'tests/aux/in.test')
-rwxr-xr-xtests/aux/in.test19
1 files changed, 13 insertions, 6 deletions
diff --git a/tests/aux/in.test b/tests/aux/in.test
index 4a98763..1fae034 100755
--- a/tests/aux/in.test
+++ b/tests/aux/in.test
@@ -5,2 +5,4 @@ IFS='
'
+: ${PIESCTL:=piesctl}
+PIESCTL="$PIESCTL --no-netrc${PIES_CTLSOCK:+ --url=}$PIES_CTLSOCK"
while read COMMAND ARG
@@ -9,8 +11,13 @@ do
case $COMMAND in
- stop) if [ -n "$STOPCMD" ]; then
- echo "STOP"
- $STOPCMD
- else
- echo "OK $COMMAND $ARG"
- fi
+ stop) echo "OK shutting down"
+ $PIESCTL shutdown
+ ;;
+ enable)
+ $PIESCTL start component ${ARG:?component name not supplied}
+ ;;
+ sleep)
+ sleep ${ARG:-1}
+ ;;
+ touch)
+ touch ${ARG:?touch argument required}
;;

Return to:

Send suggestions and report system problems to the System administrator.