gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r3326 - in GNUnet: . src/applications/fragmentation


From: grothoff
Subject: [GNUnet-SVN] r3326 - in GNUnet: . src/applications/fragmentation
Date: Sat, 26 Aug 2006 21:23:28 -0700 (PDT)

Author: grothoff
Date: 2006-08-26 21:23:24 -0700 (Sat, 26 Aug 2006)
New Revision: 3326

Modified:
   GNUnet/src/applications/fragmentation/Makefile.am
   GNUnet/src/applications/fragmentation/fragmentationtest.c
   GNUnet/todo
Log:
fixing fragmentation

Modified: GNUnet/src/applications/fragmentation/Makefile.am
===================================================================
--- GNUnet/src/applications/fragmentation/Makefile.am   2006-08-27 03:27:46 UTC 
(rev 3325)
+++ GNUnet/src/applications/fragmentation/Makefile.am   2006-08-27 04:23:24 UTC 
(rev 3326)
@@ -29,5 +29,7 @@
 fragmentationtest_SOURCES = \
  fragmentationtest.c 
 fragmentationtest_LDADD = \
+ $(top_builddir)/src/util/cron/libgnunetutil_cron.la \
+ $(top_builddir)/src/util/crypto/libgnunetutil_crypto.la \
  $(top_builddir)/src/util/libgnunetutil.la  
 

Modified: GNUnet/src/applications/fragmentation/fragmentationtest.c
===================================================================
--- GNUnet/src/applications/fragmentation/fragmentationtest.c   2006-08-27 
03:27:46 UTC (rev 3325)
+++ GNUnet/src/applications/fragmentation/fragmentationtest.c   2006-08-27 
04:23:24 UTC (rev 3326)
@@ -42,6 +42,8 @@
 
 #include "platform.h"
 #include "gnunet_util.h"
+#include "gnunet_util_cron.h"
+
 #include "fragmentation.c"
 
 static PeerIdentity mySender;
@@ -57,7 +59,10 @@
                         const unsigned int len,
                         int wasEncrypted,
                         TSession  * ts) {
-  GE_ASSERT(ectx, hostIdentityEquals(sender, &mySender));
+  GE_ASSERT(NULL, 
+           0 == memcmp(sender, 
+                       &mySender,
+                       sizeof(PeerIdentity)));
   myMsg = resultBuffer;
   memcpy(resultBuffer, msg, len);
   myMsgLen = len;
@@ -68,7 +73,7 @@
  */
 static void makeTimeout() {
   PTHREAD_SLEEP(DEFRAGMENTATION_TIMEOUT*2);
-  defragmentationPurgeCron();
+  defragmentationPurgeCron(NULL);
 }
 
 /**
@@ -111,10 +116,10 @@
                        unsigned int len) {
   int i;
 
-  GE_ASSERT(ectx, myMsg != NULL);
-  GE_ASSERT(ectx, myMsgLen == len);
+  GE_ASSERT(NULL, myMsg != NULL);
+  GE_ASSERT(NULL, myMsgLen == len);
   for (i=0;i<len;i++)
-    GE_ASSERT(ectx, myMsg[i] == (char) (i+id));
+    GE_ASSERT(NULL, myMsg[i] == (char) (i+id));
   myMsgLen = 0;
   myMsg = NULL;
 }
@@ -127,7 +132,7 @@
 
   pep = makeFragment(0, 16, 32, 42);
   processFragment(&mySender, pep);
-  GE_ASSERT(ectx, myMsg == NULL);
+  GE_ASSERT(NULL, myMsg == NULL);
   pep = makeFragment(16, 16, 32, 42);
   processFragment(&mySender, pep);
   checkPacket(42, 32);
@@ -138,11 +143,11 @@
 
   pep = makeFragment(0, 16, 32, 42);
   processFragment(&mySender, pep);
-  GE_ASSERT(ectx, myMsg == NULL);
+  GE_ASSERT(NULL, myMsg == NULL);
   makeTimeout();
   pep = makeFragment(16, 16, 32, 42);
   processFragment(&mySender, pep);
-  GE_ASSERT(ectx, myMsg == NULL);
+  GE_ASSERT(NULL, myMsg == NULL);
   pep = makeFragment(0, 16, 32, 42);
   processFragment(&mySender, pep);
   checkPacket(42, 32);
@@ -153,7 +158,7 @@
 
   pep = makeFragment(16, 16, 32, 42);
   processFragment(&mySender, pep);
-  GE_ASSERT(ectx, myMsg == NULL);
+  GE_ASSERT(NULL, myMsg == NULL);
   pep = makeFragment(0, 16, 32, 42);
   processFragment(&mySender, pep);
   checkPacket(42, 32);
@@ -166,7 +171,7 @@
   for (i=0;i<50;i++) {
     pep = makeFragment(i*16, 16, 51*16, 42);
     processFragment(&mySender, pep);
-    GE_ASSERT(ectx, myMsg == NULL);
+    GE_ASSERT(NULL, myMsg == NULL);
   }
   pep = makeFragment(50*16,16, 51*16, 42);
   processFragment(&mySender, pep);
@@ -180,7 +185,7 @@
   for (i=0;i<4000;i++) {
     pep = makeFragment(i*16, 16, 4001*16, 42);
     processFragment(&mySender, pep);
-    GE_ASSERT(ectx, myMsg == NULL);
+    GE_ASSERT(NULL, myMsg == NULL);
   }
   pep = makeFragment(4000*16, 16, 4001*16, 42);
   processFragment(&mySender, pep);
@@ -194,7 +199,7 @@
   for (i=0;i<5;i++) {
     pep = makeFragment(i*16, 8, 6*16+8, 42);
     processFragment(&mySender, pep);
-    GE_ASSERT(ectx, myMsg == NULL);
+    GE_ASSERT(NULL, myMsg == NULL);
   }
   pep = makeFragment(5*16, 24, 6*16+8, 42);
   processFragment(&mySender, pep);
@@ -212,12 +217,12 @@
   for (i=0;i<50;i++) {
     pep = makeFragment(i*16, 8, 51*16+8, 42);
     processFragment(&mySender, pep);
-    GE_ASSERT(ectx, myMsg == NULL);
+    GE_ASSERT(NULL, myMsg == NULL);
   }
   for (i=0;i<50;i++) {
     pep = makeFragment(i*16+8, 8, 51*16+8, 42);
     processFragment(&mySender, pep);
-    GE_ASSERT(ectx, myMsg == NULL);
+    GE_ASSERT(NULL, myMsg == NULL);
   }
   pep = makeFragment(50*16, 24, 51*16+8, 42);
   processFragment(&mySender, pep);
@@ -231,12 +236,12 @@
   for (i=0;i<50;i++) {
     pep = makeFragment(i*32, 16, 51*32, 42);
     processFragment(&mySender, pep);
-    GE_ASSERT(ectx, myMsg == NULL);
+    GE_ASSERT(NULL, myMsg == NULL);
   }
   for (i=0;i<50;i++) {
     pep = makeFragment(i*32+8, 24, 51*32, 42);
     processFragment(&mySender, pep);
-    GE_ASSERT(ectx, myMsg == NULL);
+    GE_ASSERT(NULL, myMsg == NULL);
   }
   pep = makeFragment(50*32, 32, 51*32, 42);
   processFragment(&mySender, pep);
@@ -250,7 +255,7 @@
   for (i=0;i<50;i++) {
     pep = makeFragment(0, i*16+16, 51*16, 42);
     processFragment(&mySender, pep);
-    GE_ASSERT(ectx, myMsg == NULL);
+    GE_ASSERT(NULL, myMsg == NULL);
   }
   pep = makeFragment(50*16,16, 51*16, 42);
   processFragment(&mySender, pep);
@@ -264,12 +269,12 @@
   for (i=0;i<50;i++) {
     pep = makeFragment(0, i*16+16, 51*16+8, 42);
     processFragment(&mySender, pep);
-    GE_ASSERT(ectx, myMsg == NULL);
+    GE_ASSERT(NULL, myMsg == NULL);
   }
   makeTimeout();
   pep = makeFragment(50*16, 24, 51*16+8, 42);
   processFragment(&mySender, pep);
-  GE_ASSERT(ectx, myMsg == NULL);
+  GE_ASSERT(NULL, myMsg == NULL);
   for (i=0;i<50;i++) {
     pep = makeFragment(0, i*16+16, 51*16+8, 42);
     processFragment(&mySender, pep);
@@ -287,7 +292,7 @@
       pep = makeFragment(i*16, 16, 51*16, id+5);
       mySender.hashPubKey.bits[0] = id;
       processFragment(&mySender, pep);
-      GE_ASSERT(ectx, myMsg == NULL);
+      GE_ASSERT(NULL, myMsg == NULL);
     }
   }
   for (id=0;id<DEFRAG_BUCKET_COUNT;id++) {
@@ -308,7 +313,7 @@
       pep = makeFragment(i*16, 16, 6*16, id+5);
       mySender.hashPubKey.bits[0] = id;
       processFragment(&mySender, pep);
-      GE_ASSERT(ectx, myMsg == NULL);
+      GE_ASSERT(NULL, myMsg == NULL);
     }
   }
   for (id=0;id<DEFRAG_BUCKET_COUNT*4;id++) {
@@ -332,23 +337,6 @@
 }
 
 
-/**
- * Perform option parsing from the command line.
- */
-static int parser(int argc,
-                 char * argv[]) {
-  FREENONNULL(setConfigurationString("FILES",
-                                    "gnunet.conf",
-                                    "check.conf"));
-  FREENONNULL(setConfigurationString("GNUNETD",
-                                    "_MAGIC_",
-                                    "YES"));
-  FREENONNULL(setConfigurationString("GNUNETD",
-                                    "LOGFILE",
-                                    NULL));
-  return OK;
-}
-
 static void * requestService(const char * name) {
   return NULL;
 }
@@ -356,10 +344,8 @@
 int main(int argc, char * argv[]){
   CoreAPIForApplication capi;
 
-  if (OK != initUtil(argc, argv, &parser))
-    return SYSERR;
-
   memset(&capi, 0, sizeof(CoreAPIForApplication));
+  capi.cron = cron_create(NULL);
   capi.injectMessage = &handleHelper;
   capi.requestService = &requestService;
   capi.registerHandler = &registerp2pHandler;
@@ -394,6 +380,6 @@
   fprintf(stderr, ".");
   release_module_fragmentation();
   fprintf(stderr, "\n");
-  doneUtil();
+  cron_destroy(capi.cron);
   return 0; /* testcase passed */
 }

Modified: GNUnet/todo
===================================================================
--- GNUnet/todo 2006-08-27 03:27:46 UTC (rev 3325)
+++ GNUnet/todo 2006-08-27 04:23:24 UTC (rev 3326)
@@ -17,36 +17,62 @@
   * util: 
     + network/io: load monitor support
     + loggers: SMTP logger
-    + config: call GC change listeners on entire config on registration!!!
-    + make testcases compile & pass again!
+    + use new loggers in for CS error reporting
+  * make testcases compile & pass again:
+    + util/network_client/ 
+    + session
+    + sqstore_sqlite
+    + sqstore_mysql
+    + gap
+    + fs/ecrs
+    + fs/lib
+    + fs/namespace
+    + fs/fsui
+    + kvstore_sqlite      
+    + tbench
+    + rpc     
+    + dht/tools, dht/module
   * transports:
     + SMTP/HTTP: do not yet compile (commented out from build)
-       o libcurl / libwebserver-gnunet & libesmtp?
+      - libcurl / libmicrohttpd / libesmtp?
   * server:
-    + needs testing, also likely to be missing features
+    + needs more testing
   * applications:
-    + fragmentation, identity,  pingpong, session, transport,
-      stats, topology_default, state, getoption, advertising,
-      traffic, ecrs_core, template, tbench, tracekit, fs/fslib,
-      fs/module, gap, fs/ecrs, fs/uritrack, fs/namespace,
-      fs/fsui, fs/collection, fs/tools, bootstrap_http,
-      sqstore_mysql, topology_f2f, rpc, kvstore_sqlite compile
-    + fs/fsui, fs/collection, fs/uritrack, fs/namespace
-      must still be revised to match new API!
-    + rest: vpn
-    + low priority: chat, dht, testbed
-  * setup missing:
+    + testing needed:
+      - transport,
+      - state
+      - advertising,
+      - ecrs_core
+      - tbench
+      - tracekit
+      - gap
+      - rpc
+    + incomplete (API change-related fixes):
+      - fs/fslib
+      - fs/module 
+      - fs/ecrs
+      - fs/uritrack 
+      - fs/tools
+      - fs/namespace,
+      - fs/collection
+      - fs/fsui
+    + proper use of libcurl to allow abort:
+      - bootstrap_http 
+    + not compiling:
+      - vpn
+      - chat
+      - dht
+      - testbed
+  * setup:
     + gtk config
+      - adopt for new API
+      - gnunet-setup memory leaks (#878)
+      - gnunet-setup category switch update bug (#892)  [ RC ]
     + gtk wizard
     + ncurses config
     + ncurses wizard
     + scm specification of configuration
-- adapt util testcases and main GNUnet codebase
-- use new util to improve error handling capabilities
-- use new util to clean up gnunet-setup
 - fix known bugs (see Mantis for updates):
-  * gnunet-setup memory leaks (#878)
-  * gnunet-setup category switch update bug (#892)  [ RC ]
   * file/socket leak (#955)
   * Windows installer, uninstall: Remove account [Nils, RC]
 - testing:





reply via email to

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