Skip to content
Snippets Groups Projects
Commit 95fd093c authored by Yang Tse's avatar Yang Tse
Browse files

Remove fflush() + fsync() previously introduced accelerated writing of

server input and response request files of the test harness sws server.

Reintroduce, for test # 1001, the <postcheck> small delay. The delay is
needed even with the accelerated writing of server input and response
request files in test harness sws server.

http://curl.haxx.se/mail/lib-2008-04/0385.html
parent ed1ad28e
No related branches found
No related tags found
No related merge requests found
......@@ -2000,8 +2000,6 @@ AC_CHECK_FUNCS( strtoll \
strcasecmp \
stricmp \
strcmpi \
fflush \
fsync \
gethostbyaddr \
gettimeofday \
inet_addr \
......
......@@ -136,12 +136,6 @@
/* Define if you don't have vprintf but do have _doprnt. */
/* #define HAVE_DOPRNT 1 */
/* Define if you have the fflush function. */
#define HAVE_FFLUSH 1
/* Define if you have the fsync function. */
/* #define HAVE_FSYNC 1 */
/* Define if you have the gethostbyaddr function. */
#define HAVE_GETHOSTBYADDR 1
......
......@@ -127,14 +127,6 @@
/* Define if you don't have vprintf but do have _doprnt. */
/* #define HAVE_DOPRNT 1 */
/* Define if you have the fflush function. */
#if defined(_WIN32_WCE) && (_WIN32_WCE >= 200)
# define HAVE_FFLUSH 1
#endif
/* Define if you have the fsync function. */
/* #define HAVE_FSYNC 1 */
/* Define if you have the gethostbyaddr function. */
#define HAVE_GETHOSTBYADDR 1
......
......@@ -75,12 +75,6 @@
/* Define if you have the setmode function. */
#define HAVE_SETMODE 1
/* Define if you have the fflush function. */
#define HAVE_FFLUSH 1
/* Define if you have the fsync function. */
/* #define HAVE_FSYNC 1 */
/* Define if you have the ftruncate function. */
#define HAVE_FTRUNCATE 1
......
......@@ -71,6 +71,9 @@ http://%HOSTIP:%HTTPPORT/1001 -u auser:apasswd --digest -T log/1001 -x http://%
<file name="log/1001">
test
</file>
<postcheck>
%SRCDIR/libtest/delay.pl 1
</postcheck>
</client>
# Verify data after the test has been "shot"
......
......@@ -512,24 +512,6 @@ void storerequest(char *reqbuf, ssize_t totalsize)
totalsize-writeleft, totalsize, REQUEST_DUMP);
}
#ifdef HAVE_FFLUSH
do {
res = fflush(dump);
} while(res && ((error = ERRNO) == EINTR));
if(res)
logmsg("Error flushing file %s error: %d %s",
REQUEST_DUMP, error, strerror(error));
#endif
#ifdef HAVE_FSYNC
do {
res = fsync(fileno(dump));
} while(res && ((error = ERRNO) == EINTR));
if(res)
logmsg("Error syncing file %s error: %d %s",
REQUEST_DUMP, error, strerror(error));
#endif
do {
res = fclose(dump);
} while(res && ((error = ERRNO) == EINTR));
......@@ -800,24 +782,6 @@ static int send_doc(curl_socket_t sock, struct httprequest *req)
buffer += written;
} while(count>0);
#ifdef HAVE_FFLUSH
do {
res = fflush(dump);
} while(res && ((error = ERRNO) == EINTR));
if(res)
logmsg("Error flushing file %s error: %d %s",
RESPONSE_DUMP, error, strerror(error));
#endif
#ifdef HAVE_FSYNC
do {
res = fsync(fileno(dump));
} while(res && ((error = ERRNO) == EINTR));
if(res)
logmsg("Error syncing file %s error: %d %s",
RESPONSE_DUMP, error, strerror(error));
#endif
do {
res = fclose(dump);
} while(res && ((error = ERRNO) == EINTR));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment