summaryrefslogtreecommitdiff
path: root/tests/fdpassing-socket.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/fdpassing-socket.sh')
-rwxr-xr-xtests/fdpassing-socket.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/fdpassing-socket.sh b/tests/fdpassing-socket.sh
new file mode 100755
index 0000000..a006276
--- /dev/null
+++ b/tests/fdpassing-socket.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+if test -e a.sock; then
+ rm -f a.sock
+fi
+
+./fdpassing$EXEEXT --server --socketname a.sock 2>/dev/null &
+SERVER_PID=$!
+
+# Wait for server stats up
+sleep 1
+
+./fdpassing$EXEEXT --socketname file://a.sock
+STATUS=$?
+
+if test $STATUS -eq 0; then
+ exit 0
+else
+ kill $SERVER_PID
+ exit $STATUS
+fi
+rm -f a.sock