View Issue Details

IDProjectCategoryView StatusLast Update
0001718GNUnettransport servicepublic2011-07-02 09:26
ReporterLRN Assigned ToMatthias Wachs  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product VersionGit master 
Summary0001718: Transport tests are too optimistic
DescriptionTransport tests routinely include this code snippet:
#ifdef MINGW
  return GNUNET_SYSERR;
#endif
Thus all tests fail automatically when compiled for MinGW. This is too optimistic, in my opinion.
The attached patch significantly reduces the amount of optimism in these tests, mostly restricting optimistic test outcome predictions to NAT-related and HTTPS-related tests (although this reasoning is a few months old, maybe the state of these tests on MinGW has changed since the last time i've tried).
TagsNo tags attached.
Attached Files
0001-Fix-optimistic-transport-tests.patch (2,938 bytes)   
From c5f1eac219336e20c965836cf90af38e25a1dcbb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=D0=A0=D1=83=D1=81=D0=BB=D0=B0=D0=BD=20=D0=98=D0=B6=D0=B1=D1?=
 =?UTF-8?q?=83=D0=BB=D0=B0=D1=82=D0=BE=D0=B2?= <lrn1986@gmail.com>
Date: Tue, 28 Dec 2010 03:43:08 +0300
Subject: [PATCH 1/5] Fix optimistic transport tests

---
 src/transport/test_quota_compliance.c          |    9 ++++++---
 src/transport/test_transport_api.c             |   12 +++++++++---
 src/transport/test_transport_api_reliability.c |    3 ---
 3 files changed, 17 insertions(+), 10 deletions(-)

diff --git a/src/transport/test_quota_compliance.c b/src/transport/test_quota_compliance.c
index ef4f999..0865610 100644
--- a/src/transport/test_quota_compliance.c
+++ b/src/transport/test_quota_compliance.c
@@ -800,12 +800,12 @@ int
 main (int argc, char *argv[])
 {
   int ret = 0;
-#ifdef MINGW
-  return GNUNET_SYSERR;
-#endif
   if (strstr(argv[0], "tcp_nat") != NULL)
     {
       is_tcp_nat = GNUNET_YES;
+#ifdef MINGW
+      return 0;
+#endif
     }
   else if (strstr(argv[0], "tcp") != NULL)
     {
@@ -814,6 +814,9 @@ main (int argc, char *argv[])
   else if (strstr(argv[0], "https") != NULL)
     {
       is_https = GNUNET_YES;
+#ifdef MINGW
+      return 0;
+#endif
     }
   else if (strstr(argv[0], "http") != NULL)
     {
diff --git a/src/transport/test_transport_api.c b/src/transport/test_transport_api.c
index 3da87d2..f51e96f 100644
--- a/src/transport/test_transport_api.c
+++ b/src/transport/test_transport_api.c
@@ -656,9 +656,6 @@ int
 main (int argc, char *argv[])
 {
   int ret;
-#ifdef MINGW
-  return GNUNET_SYSERR;
-#endif
 
   GNUNET_log_setup ("test-transport-api",
 #if VERBOSE
@@ -671,6 +668,9 @@ main (int argc, char *argv[])
   if (strstr(argv[0], "tcp_nat") != NULL)
     {
       is_tcp_nat = GNUNET_YES;
+#ifdef MINGW
+      return 0;
+#endif
       if (GNUNET_YES != check_gnunet_nat_binary("gnunet-nat-server"))
         {
           GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
@@ -686,6 +686,9 @@ main (int argc, char *argv[])
   else if (strstr(argv[0], "udp_nat") != NULL)
     {
       is_udp_nat = GNUNET_YES;
+#ifdef MINGW
+      return 0;
+#endif
       if (GNUNET_YES != check_gnunet_nat_binary("gnunet-nat-server"))
         {
           GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
@@ -705,6 +708,9 @@ main (int argc, char *argv[])
   else if (strstr(argv[0], "https") != NULL)
     {
       is_https = GNUNET_YES;
+#ifdef MINGW
+      return 0;
+#endif
     }
   else if (strstr(argv[0], "http") != NULL)
     {
diff --git a/src/transport/test_transport_api_reliability.c b/src/transport/test_transport_api_reliability.c
index 7fc9d43..de5079c 100644
--- a/src/transport/test_transport_api_reliability.c
+++ b/src/transport/test_transport_api_reliability.c
@@ -840,9 +840,6 @@ int
 main (int argc, char *argv[])
 {
   int ret;
-#ifdef MINGW
-  return GNUNET_SYSERR;
-#endif
 
   if (strstr(argv[0], "tcp_nat") != NULL)
     {
-- 
1.7.4

Activities

Christian Grothoff

2011-06-21 20:58

manager   ~0004448

Patch in SVN 15732.

Issue History

Date Modified Username Field Change
2011-06-21 17:23 LRN New Issue
2011-06-21 17:23 LRN Status new => assigned
2011-06-21 17:23 LRN Assigned To => Matthias Wachs
2011-06-21 17:23 LRN File Added: 0001-Fix-optimistic-transport-tests.patch
2011-06-21 20:58 Christian Grothoff Note Added: 0004448
2011-06-21 20:58 Christian Grothoff Status assigned => resolved
2011-06-21 20:58 Christian Grothoff Resolution open => fixed
2011-07-02 09:26 Christian Grothoff Status resolved => closed