aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/.gitignore1
-rw-r--r--tests/Makefile.am8
-rw-r--r--tests/accept.at8
-rw-r--r--tests/atlocal.in2
-rwxr-xr-xtests/aux/in.test2
-rw-r--r--tests/builtin.at16
-rw-r--r--tests/chargen.c2
-rw-r--r--tests/control.at8
-rw-r--r--tests/cyclic.at39
-rw-r--r--tests/env.at12
-rw-r--r--tests/envglobal.at86
-rw-r--r--tests/envop.at4
-rw-r--r--tests/envtest.c2
-rw-r--r--tests/expandenv.at50
-rw-r--r--tests/inet.at6
-rw-r--r--tests/iobuf.h2
-rw-r--r--tests/lines.c3
-rw-r--r--tests/maxinst.at8
-rw-r--r--tests/nt.c2
-rw-r--r--tests/passfd.at8
-rw-r--r--tests/readtime.c2
-rw-r--r--tests/recvfd.c2
-rw-r--r--tests/redirect.at6
-rw-r--r--tests/respawn.at8
-rw-r--r--tests/ret-exec.at6
-rw-r--r--tests/ret-notify.at6
-rw-r--r--tests/shdnseq.at82
-rw-r--r--tests/shell.at8
-rw-r--r--tests/shutdown.at10
-rw-r--r--tests/sigterm.at49
-rw-r--r--tests/sigwait.c75
-rw-r--r--tests/startup.at8
-rw-r--r--tests/testsuite.at13
-rw-r--r--tests/to.c2
-rw-r--r--tests/version.at4
35 files changed, 466 insertions, 84 deletions
diff --git a/tests/.gitignore b/tests/.gitignore
index 43d3848..1993da2 100644
--- a/tests/.gitignore
+++ b/tests/.gitignore
@@ -11,3 +11,4 @@ nt
11recvfd 11recvfd
12readtime 12readtime
13chargen 13chargen
14sigwait
diff --git a/tests/Makefile.am b/tests/Makefile.am
index bfdc692..6724aea 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,5 +1,5 @@
1# This file is part of GNU Pies. 1# This file is part of GNU Pies.
2# Copyright (C) 2008-2020 Sergey Poznyakoff 2# Copyright (C) 2008-2023 Sergey Poznyakoff
3# 3#
4# GNU Pies is free software; you can redistribute it and/or modify 4# GNU Pies is free software; you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by 5# it under the terms of the GNU General Public License as published by
@@ -54,7 +54,9 @@ TESTSUITE_AT = \
54 control.at\ 54 control.at\
55 cyclic.at\ 55 cyclic.at\
56 env.at\ 56 env.at\
57 envglobal.at\
57 envop.at\ 58 envop.at\
59 expandenv.at\
58 inet.at\ 60 inet.at\
59 maxinst.at\ 61 maxinst.at\
60 passfd.at\ 62 passfd.at\
@@ -62,15 +64,17 @@ TESTSUITE_AT = \
62 redirect.at\ 64 redirect.at\
63 ret-exec.at\ 65 ret-exec.at\
64 ret-notify.at\ 66 ret-notify.at\
67 sigterm.at\
65 shell.at\ 68 shell.at\
66 startup.at\ 69 startup.at\
70 shdnseq.at\
67 shutdown.at\ 71 shutdown.at\
68 version.at 72 version.at
69 73
70TESTSUITE = $(srcdir)/testsuite 74TESTSUITE = $(srcdir)/testsuite
71M4=m4 75M4=m4
72 76
73noinst_PROGRAMS = envtest to lines nt recvfd readtime chargen 77noinst_PROGRAMS = envtest to lines nt recvfd readtime chargen sigwait
74nt_SOURCES = nt.c iobuf.h 78nt_SOURCES = nt.c iobuf.h
75AM_CPPFLAGS = \ 79AM_CPPFLAGS = \
76 -I$(top_srcdir)/lib\ 80 -I$(top_srcdir)/lib\
diff --git a/tests/accept.at b/tests/accept.at
index e12be02..0249ad6 100644
--- a/tests/accept.at
+++ b/tests/accept.at
@@ -1,5 +1,5 @@
1# This file is part of GNU pies testsuite. -*- Autotest -*- 1# This file is part of GNU pies testsuite. -*- autotest -*-
2# Copyright (C) 2019-2020 Sergey Poznyakoff 2# Copyright (C) 2019-2023 Sergey Poznyakoff
3# 3#
4# GNU pies is free software; you can redistribute it and/or modify 4# GNU pies is free software; you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by 5# it under the terms of the GNU General Public License as published by
@@ -40,7 +40,7 @@ _EOT
40 40
41set -e 41set -e
42to 10 \ 42to 10 \
43 pies --foreground --stderr \ 43 pies --no-preprocessor --foreground --stderr \
44 --config-file control.conf --config-file pies.conf --debug 1 2>errlog 44 --config-file control.conf --config-file pies.conf --debug 1 2>errlog
45 45
46cat inlog 46cat inlog
@@ -51,4 +51,4 @@ cat log.err >&2
51the time 51the time
52stop 52stop
53]) 53])
54AT_CLEANUP \ No newline at end of file 54AT_CLEANUP
diff --git a/tests/atlocal.in b/tests/atlocal.in
index c043843..0e4695e 100644
--- a/tests/atlocal.in
+++ b/tests/atlocal.in
@@ -1,6 +1,6 @@
1# @configure_input@ -*- shell-script -*- 1# @configure_input@ -*- shell-script -*-
2# Configurable variable values for GNU Pies test suite. 2# Configurable variable values for GNU Pies test suite.
3# Copyright (C) 2016-2020 Sergey Poznyakoff 3# Copyright (C) 2016-2023 Sergey Poznyakoff
4 4
5PATH=@abs_builddir@:@abs_top_builddir@/src:$srcdir:$PATH 5PATH=@abs_builddir@:@abs_top_builddir@/src:$srcdir:$PATH
6XFAILFILE=$abs_builddir/.badversion 6XFAILFILE=$abs_builddir/.badversion
diff --git a/tests/aux/in.test b/tests/aux/in.test
index 1fae034..54b546a 100755
--- a/tests/aux/in.test
+++ b/tests/aux/in.test
@@ -4,7 +4,7 @@ FILE=${1:?}
4IFS=' 4IFS='
5' 5'
6: ${PIESCTL:=piesctl} 6: ${PIESCTL:=piesctl}
7PIESCTL="$PIESCTL --no-netrc${PIES_CTLSOCK:+ --url=}$PIES_CTLSOCK" 7PIESCTL="$PIESCTL --config-file=/dev/null --no-netrc${PIES_CTLSOCK:+ --url=}$PIES_CTLSOCK"
8while read COMMAND ARG 8while read COMMAND ARG
9do 9do
10 echo $COMMAND $ARG >> $FILE 10 echo $COMMAND $ARG >> $FILE
diff --git a/tests/builtin.at b/tests/builtin.at
index 88e24d7..c13b42b 100644
--- a/tests/builtin.at
+++ b/tests/builtin.at
@@ -1,5 +1,5 @@
1# This file is part of GNU pies testsuite. -*- Autotest -*- 1# This file is part of GNU pies testsuite. -*- autotest -*-
2# Copyright (C) 2016-2020 Sergey Poznyakoff 2# Copyright (C) 2016-2023 Sergey Poznyakoff
3# 3#
4# GNU pies is free software; you can redistribute it and/or modify 4# GNU pies is free software; you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by 5# it under the terms of the GNU General Public License as published by
@@ -40,13 +40,13 @@ component controller {
40 command "nt -i input -o output $PIES_TEST_INET_SOCKET"; 40 command "nt -i input -o output $PIES_TEST_INET_SOCKET";
41 return-code * { 41 return-code * {
42 action disable; 42 action disable;
43 exec "piesctl --url '$PIES_CTLSOCK' --no-netrc shutdown"; 43 exec "piesctl --config-file=/dev/null --url '$PIES_CTLSOCK' --config-file=/dev/null --no-netrc shutdown";
44 } 44 }
45} 45}
46_EOT 46_EOT
47set -e 47set -e
48to 10 \ 48to 10 \
49 pies --foreground --stderr \ 49 pies --no-preprocessor --foreground --stderr \
50 --config-file control.conf --config-file pies.conf --debug 1 2>errlog 50 --config-file control.conf --config-file pies.conf --debug 1 2>errlog
51 51
52cat output m4_if([$1],[qotd],[| tr -d '\r']) 52cat output m4_if([$1],[qotd],[| tr -d '\r'])
@@ -78,7 +78,7 @@ component controller {
78 stderr file "$PWD/controller.err"; 78 stderr file "$PWD/controller.err";
79 return-code * { 79 return-code * {
80 action disable; 80 action disable;
81 exec "echo \$PIES_STATUS > $PWD/status ; piesctl --url '$PIES_CTLSOCK' --no-netrc shutdown"; 81 exec "echo \$PIES_STATUS > $PWD/status ; piesctl --url '$PIES_CTLSOCK' --config-file=/dev/null --no-netrc shutdown";
82 } 82 }
83} 83}
84_EOT 84_EOT
@@ -86,7 +86,7 @@ TZ=0
86export TZ 86export TZ
87set -e 87set -e
88to 10 \ 88to 10 \
89 pies --foreground --stderr \ 89 pies --no-preprocessor --foreground --stderr \
90 --config-file control.conf --config-file pies.conf --debug 1 2>errlog 90 --config-file control.conf --config-file pies.conf --debug 1 2>errlog
91 91
92if test -s in.err; then 92if test -s in.err; then
@@ -166,14 +166,14 @@ component test {
166 stderr file "$PWD/test.err"; 166 stderr file "$PWD/test.err";
167 return-code * { 167 return-code * {
168 action disable; 168 action disable;
169 exec "piesctl --no-netrc --url=$PIES_CTLSOCK shutdown"; 169 exec "piesctl --config-file=/dev/null --no-netrc --url=$PIES_CTLSOCK shutdown";
170 } 170 }
171} 171}
172_EOT 172_EOT
173 173
174set -e 174set -e
175to 10 \ 175to 10 \
176 pies --foreground --stderr \ 176 pies --no-preprocessor --foreground --stderr \
177 --config-file control.conf --config-file pies.conf --debug 1 2>errlog 177 --config-file control.conf --config-file pies.conf --debug 1 2>errlog
178 178
179for err in one.err two.err test.err 179for err in one.err two.err test.err
diff --git a/tests/chargen.c b/tests/chargen.c
index 59aa0d8..5f5a170 100644
--- a/tests/chargen.c
+++ b/tests/chargen.c
@@ -1,5 +1,5 @@
1/* This file is part of GNU Pies testsuite. 1/* This file is part of GNU Pies testsuite.
2 Copyright (C) 2019-2020 Sergey Poznyakoff 2 Copyright (C) 2019-2023 Sergey Poznyakoff
3 3
4 GNU Pies is free software; you can redistribute it and/or modify 4 GNU Pies is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
diff --git a/tests/control.at b/tests/control.at
index 5171862..6027817 100644
--- a/tests/control.at
+++ b/tests/control.at
@@ -1,5 +1,5 @@
1# This file is part of GNU pies testsuite. -*- Autotest -*- 1