Commit 006274be authored by Niels Möller's avatar Niels Möller

* src/testsuite/daemon-1-test: Renamed file to...

* src/testsuite/daemon-fd-test: ... new file. Improved test, using
/proc/self/fd.

Rev: src/testsuite/daemon-1-test:1.2(DEAD)
Rev: src/testsuite/daemon-fd-test:1.1
parent a4626e5d
#! /bin/sh
if [ -z "$srcdir" ] ; then
srcdir=`pwd`
fi
. $srcdir/functions.sh
exec 17>&2
spawn_lshd && exec_lsh "if echo foo >&17 ; then exit 1 ; else exit 0; fi" && test_success
test_done
#! /bin/sh
if [ -z "$srcdir" ] ; then
srcdir=`pwd`
fi
. $srcdir/functions.sh
[ -d /proc/self/fd ] || test_skip
# Open a spurios fd
exec 17>&2
# Ignore fd 3, since it's used by the ls program to get to read the
# directory. On linux, fd 3 should be a link to the appropriate
# "/proc/<pid>/fd" directory, while on Solaris, it for some reason is
# a link to "/".
spawn_lshd && exec_lsh ls /proc/self/fd | grep -v '^3$'> test.out1
cat >test.out2 <<EOF
0
1
2
EOF
compare_output "daemon-fd-test"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment