mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-06-09 08:42:22 -04:00
ITS#10515 tests: don't use mkfifo in test079
Just use ordinary pipes.
This commit is contained in:
parent
a5c60eb6a5
commit
4c4ed49386
1 changed files with 4 additions and 22 deletions
|
|
@ -203,33 +203,21 @@ CONN_BEGINS=`date +%s`
|
|||
CONN_EXPIRES=`expr $CONN_BEGINS + $TIMEOUT`
|
||||
echo "Create private connection towards remote LDAP (time_t now=$CONN_BEGINS timeout=$CONN_EXPIRES)"
|
||||
|
||||
# Create fifos that are used to pass searches from the test case to ldapsearch
|
||||
rm -f $TESTDIR/ldapsearch1.fifo $TESTDIR/ldapsearch2.fifo
|
||||
mkfifo $TESTDIR/ldapsearch1.fifo $TESTDIR/ldapsearch2.fifo
|
||||
|
||||
# Execute ldapsearch on background and have it read searches from the fifo
|
||||
$LDAPSEARCH -b "dc=idle-timeout,$BASEDN" \
|
||||
(echo 'objectclass=*'; sleep 4) | $LDAPSEARCH -b "dc=idle-timeout,$BASEDN" \
|
||||
-D "cn=Barbara Jensen,ou=Information Technology Division,dc=idle-timeout,$BASEDN" \
|
||||
-H $URI2 \
|
||||
-w "bjensen" \
|
||||
-f $TESTDIR/ldapsearch1.fifo >> $TESTOUT 2>&1 &
|
||||
-f - >> $TESTOUT 2>&1 &
|
||||
LDAPSEARCHPIDS=$!
|
||||
|
||||
$LDAPSEARCH -b "dc=conn-ttl,$BASEDN" \
|
||||
(echo 'objectclass=*'; sleep 4) | $LDAPSEARCH -b "dc=conn-ttl,$BASEDN" \
|
||||
-D "cn=Barbara Jensen,ou=Information Technology Division,dc=conn-ttl,$BASEDN" \
|
||||
-H $URI2 \
|
||||
-w "bjensen" \
|
||||
-f $TESTDIR/ldapsearch2.fifo >> $TESTOUT 2>&1 &
|
||||
-f - >> $TESTOUT 2>&1 &
|
||||
LDAPSEARCHPIDS="$LDAPSEARCHPIDS $!"
|
||||
|
||||
# Open fifos as file descriptor
|
||||
exec 3>$TESTDIR/ldapsearch1.fifo
|
||||
exec 4>$TESTDIR/ldapsearch2.fifo
|
||||
|
||||
# Trigger LDAP connections towards the proxy by executing a search
|
||||
echo 'objectclass=*' >&3
|
||||
echo 'objectclass=*' >&4
|
||||
|
||||
# wait for ldapsearches (running as background processes) to execute search operations
|
||||
sleep 2
|
||||
|
||||
|
|
@ -289,12 +277,6 @@ if test $RC != 1 ; then
|
|||
exit $RC
|
||||
fi
|
||||
|
||||
# Close the file descriptors associated with the fifos.
|
||||
# This will trigger EOF to ldapsearch which will cause it to exit.
|
||||
exec 3>&-
|
||||
exec 4>&-
|
||||
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
# Test 3: Check that idle-timeout is reset on activity
|
||||
|
|
|
|||
Loading…
Reference in a new issue