[exim-cvs] Fix testcase 0373

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Exim Git Commits Mailing List
Fecha:  
A: exim-cvs
Asunto: [exim-cvs] Fix testcase 0373
Gitweb: http://git.exim.org/exim.git/commitdiff/567e584cae0f3999605d4d8c18afdbef75ab62be
Commit:     567e584cae0f3999605d4d8c18afdbef75ab62be
Parent:     75febd1bb37ede1b350b9e45e02f18b7d0067824
Author:     Jeremy Harris <jgh146exb@???>
AuthorDate: Sun Jun 15 15:48:55 2014 +0100
Committer:  Jeremy Harris <jgh146exb@???>
CommitDate: Sun Jun 15 15:48:55 2014 +0100


    Fix testcase 0373


    A readsocket expansion against a unix-domain socket which is
    immediately closed.  This gave variable results does to the race of
    the write into the client-end versus the close at the server end.
    Insert under-testsuite delays to assure sequencing; the testcase
    now specifically looks for a write into a closed peer.
---
 src/src/expand.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)


diff --git a/src/src/expand.c b/src/src/expand.c
index ff30996..b02ea30 100644
--- a/src/src/expand.c
+++ b/src/src/expand.c
@@ -4667,6 +4667,9 @@ while (*s != 0)

         DEBUG(D_expand) debug_printf("connected to socket %s\n", sub_arg[0]);


+    /* Allow sequencing of test actions */
+    if (running_in_test_harness) millisleep(100);
+
         /* Write the request string, if not empty */


         if (sub_arg[1][0] != 0)
@@ -4690,6 +4693,8 @@ while (*s != 0)
         shutdown(fd, SHUT_WR);
         #endif


+    if (running_in_test_harness) millisleep(100);
+
         /* Now we need to read from the socket, under a timeout. The function
         that reads a file can be used. */