gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [libmicrohttpd] 03/03: Fix race condition in test_get_sendf


From: gnunet
Subject: [GNUnet-SVN] [libmicrohttpd] 03/03: Fix race condition in test_get_sendfile/test_get_sendfile11
Date: Thu, 15 Mar 2018 21:21:08 +0100

This is an automated email from the git hooks/post-receive script.

tim-ruehsen pushed a commit to branch master
in repository libmicrohttpd.

commit 090ee9e6041904bb864b3ec18e80a861b326931b
Author: Tim Rühsen <address@hidden>
AuthorDate: Thu Mar 15 20:59:41 2018 +0100

    Fix race condition in test_get_sendfile/test_get_sendfile11
---
 src/testcurl/test_get_sendfile.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/testcurl/test_get_sendfile.c b/src/testcurl/test_get_sendfile.c
index 6718106d..fb040afe 100644
--- a/src/testcurl/test_get_sendfile.c
+++ b/src/testcurl/test_get_sendfile.c
@@ -576,15 +576,19 @@ main (int argc, char *const *argv)
   FILE *f;
   (void)argc;   /* Unused. Silent compiler warning. */
 
+  oneone = (NULL != strrchr (argv[0], (int) '/')) ?
+    (NULL != strstr (strrchr (argv[0], (int) '/'), "11")) : 0;
+
   if ( (NULL == (tmp = getenv ("TMPDIR"))) &&
        (NULL == (tmp = getenv ("TMP"))) &&
        (NULL == (tmp = getenv ("TEMP"))) )
     tmp = "/tmp";
   sourcefile = malloc (strlen (tmp) + 32);
   sprintf (sourcefile,
-          "%s/%s",
+          "%s/%s%s",
           tmp,
-          "test-mhd-sendfile");
+          "test-mhd-sendfile",
+          oneone ? "11" : "");
   f = fopen (sourcefile, "w");
   if (NULL == f)
     {
@@ -594,8 +598,6 @@ main (int argc, char *const *argv)
     }
   fwrite (TESTSTR, strlen (TESTSTR), 1, f);
   fclose (f);
-  oneone = (NULL != strrchr (argv[0], (int) '/')) ?
-    (NULL != strstr (strrchr (argv[0], (int) '/'), "11")) : 0;
   if (0 != curl_global_init (CURL_GLOBAL_WIN32))
     return 2;
   errorCount += testInternalGet ();

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]