path: root/tests/
authorSergey Poznyakoff <>2019-06-11 09:54:02 (GMT)
committer Sergey Poznyakoff <>2019-06-11 10:18:29 (GMT)
commitbf6506cdc46446eada5090a428c2407ebd17468a (patch) (side-by-side diff)
tree2113b5c049283413fb4fe3981a837989d2969918 /tests/
parent186b9a1c99988844c5ea3fcce1fcc6cadb491206 (diff)
Improve the nt tool. Test inet running instance limit.
* tests/ 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/ (PIES_CONTROL_INIT): Rename pidfile to PIES_PIDFILE and ctlsock to PIES_CTLSOCK. Export both. Include * tests/ Use new variables. * tests/ Remove the env block. * tests/iobuf.h (iobuf_copy): Return number of bytes copied. * tests/ 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/') (more/less context) (ignore whitespace changes)
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/ b/tests/
index 8814b30..3d0c218 100644
--- a/tests/
+++ b/tests/
@@ -23,13 +23,14 @@ PIES_CONTROL_INIT
pies --config-file control.conf
sleep 1
-if test -f $pidfile; then
- pid0=`head -1 $pidfile`
- pid1=`piesctl --url "$ctlsock" id PID|sed 's/^PID: //'`
+PIESCTL="piesctl --no-netrc --url '$PIES_CTLSOCK'"
+if test -f $PIES_PIDFILE; then
+ pid0=`head -1 $PIES_PIDFILE`
+ pid1=`$PIESCTL id PID|sed 's/^PID: //'`
if test "$pid1" = "$pid0"; then
- if piesctl --url "$ctlsock" shutdown; then
+ if $PIESCTL shutdown; then
sleep 1
- if test -f $pidfile; then
+ if test -f $PIES_PIDFILE; then
PIES_XFAIL_MSG([pies does not respond to control commands])
kill -9 $pid0
exit 1

Return to:

Send suggestions and report system problems to the System administrator.