aboutsummaryrefslogtreecommitdiff
path: root/tests/passfd.at
diff options
context:
space:
mode:
Diffstat (limited to 'tests/passfd.at')
-rw-r--r--tests/passfd.at57
1 files changed, 57 insertions, 0 deletions
diff --git a/tests/passfd.at b/tests/passfd.at
new file mode 100644
index 0000000..4a685a3
--- /dev/null
+++ b/tests/passfd.at
@@ -0,0 +1,57 @@
1# This file is part of GNU pies testsuite. -*- Autotest -*-
2# Copyright (C) 2016-2019 Sergey Poznyakoff
3#
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
6# the Free Software Foundation; either version 3, or (at your option)
7# any later version.
8#
9# GNU pies is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12# GNU General Public License for more details.
13#
14# You should have received a copy of the GNU General Public License
15# along with GNU pies. If not, see <http://www.gnu.org/licenses/>.
16AT_SETUP([pass-fd component])
17AT_CHECK([
18PIES_XFAIL_CHECK
19PIES_CONTROL_INIT
20
21AT_DATA([input],
22[now is
23the time
24stop
25])
26
27: ${PIES_TEST_INET_SOCKET:=unix://$PWD/in.sock}
28PIES_FD_SOCKET=$PWD/pfd.sock
29
30cat > pies.conf <<_EOT
31component pfd {
32 command "recvfd '$PIES_FD_SOCKET' $auxdir/in.test $PWD/inlog";
33 mode pass-fd;
34 pass-fd-timeout 3;
35 pass-fd-socket "$PIES_FD_SOCKET";
36 socket "$PIES_TEST_INET_SOCKET";
37 stderr file "$PWD/log.err";
38}
39component controller {
40 command "nt $PIES_TEST_INET_SOCKET -i input";
41}
42_EOT
43
44set -e
45to 10 \
46 pies --foreground --stderr \
47 --config-file control.conf --config-file pies.conf --debug 1 2>errlog
48
49cat inlog
50cat log.err >&2
51],
52[0],
53[now is
54the time
55stop
56])
57AT_CLEANUP \ No newline at end of file

Return to:

Send suggestions and report system problems to the System administrator.