ITS#10515 tests: don't use mkfifo in test079

Just use ordinary pipes.
This commit is contained in:
Howard Chu 2026-06-02 19:12:21 +01:00
parent 0d8600fdb3
commit 6dcddd3510

View file

@ -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