gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r20922 - gnunet/src/gns


From: gnunet
Subject: [GNUnet-SVN] r20922 - gnunet/src/gns
Date: Tue, 10 Apr 2012 16:14:41 +0200

Author: schanzen
Date: 2012-04-10 16:14:41 +0200 (Tue, 10 Apr 2012)
New Revision: 20922

Modified:
   gnunet/src/gns/test_gns_dht_delegated_lookup.c
   gnunet/src/gns/test_gns_max_queries.c
   gnunet/src/gns/test_gns_pseu_shorten.c
   gnunet/src/gns/test_gns_simple_delegated_lookup.c
   gnunet/src/gns/test_gns_simple_get_authority.c
   gnunet/src/gns/test_gns_simple_lookup.c
   gnunet/src/gns/test_gns_simple_mx_lookup.c
   gnunet/src/gns/test_gns_simple_shorten.c
   gnunet/src/gns/test_gns_simple_zkey_lookup.c
Log:
-performance tests


Modified: gnunet/src/gns/test_gns_dht_delegated_lookup.c
===================================================================
--- gnunet/src/gns/test_gns_dht_delegated_lookup.c      2012-04-10 13:29:17 UTC 
(rev 20921)
+++ gnunet/src/gns/test_gns_dht_delegated_lookup.c      2012-04-10 14:14:41 UTC 
(rev 20922)
@@ -60,9 +60,8 @@
  */
 static char *test_directory;
 
-struct GNUNET_TESTING_Daemon *d1;
+static struct GNUNET_TESTING_PeerGroup *pg;
 
-
 /* Task handle to use to schedule test failure */
 GNUNET_SCHEDULER_TaskIdentifier die_task;
 
@@ -140,8 +139,9 @@
   }
   GNUNET_GNS_disconnect(gns_handle);
   GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Shutting down peer1!\n");
-  GNUNET_TESTING_daemon_stop (d1, TIMEOUT, &shutdown_callback, NULL,
-                              GNUNET_YES, GNUNET_NO);
+  //GNUNET_TESTING_daemon_stop (d1, TIMEOUT, &shutdown_callback, NULL,
+  //                            GNUNET_YES, GNUNET_NO);
+  GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL);
 }
 
 
@@ -174,9 +174,9 @@
 end_badly_cont (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
 
-  if (d1 != NULL)
-    GNUNET_TESTING_daemon_stop (d1, TIMEOUT, &shutdown_callback, NULL,
-                                GNUNET_YES, GNUNET_NO);
+  if (pg != NULL) {
+    GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL);
+  }
   GNUNET_SCHEDULER_cancel (die_task);
 }
 
@@ -266,7 +266,7 @@
 
 static void
 do_lookup(void *cls, const struct GNUNET_PeerIdentity *id,
-          const struct GNUNET_CONFIGURATION_Handle *cfg,
+          const struct GNUNET_CONFIGURATION_Handle *_cfg,
           struct GNUNET_TESTING_Daemon *d, const char *emsg)
 {
   
@@ -274,6 +274,7 @@
   char* alice_keyfile;
   struct GNUNET_CRYPTO_ShortHashCode bob_hash;
   
+  cfg = _cfg;
 
   GNUNET_SCHEDULER_cancel (die_task);
 
@@ -351,8 +352,10 @@
                                     "didn't start all daemons in reasonable 
amount of time!!!");
   
   /* Start alice */
-  d1 = GNUNET_TESTING_daemon_start(cfg, TIMEOUT, GNUNET_NO, NULL, NULL, 0,
-                                   NULL, NULL, NULL, &do_lookup, NULL);
+  //d1 = GNUNET_TESTING_daemon_start(cfg, TIMEOUT, GNUNET_NO, NULL, NULL, 0,
+  //                                 NULL, NULL, NULL, &do_lookup, NULL);
+  pg = GNUNET_TESTING_daemons_start(cfg, 1, 1, 1, TIMEOUT,
+                               NULL, NULL, &do_lookup, NULL, NULL, NULL, NULL);
 }
 
 static int

Modified: gnunet/src/gns/test_gns_max_queries.c
===================================================================
--- gnunet/src/gns/test_gns_max_queries.c       2012-04-10 13:29:17 UTC (rev 
20921)
+++ gnunet/src/gns/test_gns_max_queries.c       2012-04-10 14:14:41 UTC (rev 
20922)
@@ -58,9 +58,8 @@
  */
 static char *test_directory;
 
-struct GNUNET_TESTING_Daemon *d1;
+static struct GNUNET_TESTING_PeerGroup *pg;
 
-
 /* Task handle to use to schedule test failure */
 GNUNET_SCHEDULER_TaskIdentifier die_task;
 
@@ -145,8 +144,9 @@
   }
   GNUNET_GNS_disconnect(gns_handle);
   GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Shutting down peer1!\n");
-  GNUNET_TESTING_daemon_stop (d1, TIMEOUT, &shutdown_callback, NULL,
-                              GNUNET_YES, GNUNET_NO);
+  //GNUNET_TESTING_daemon_stop (d1, TIMEOUT, &shutdown_callback, NULL,
+  //                            GNUNET_YES, GNUNET_NO);
+  GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL);
 }
 
 
@@ -195,9 +195,8 @@
 end_badly_cont (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
 
-  if (d1 != NULL)
-    GNUNET_TESTING_daemon_stop (d1, TIMEOUT, &shutdown_callback, NULL,
-                                GNUNET_YES, GNUNET_NO);
+  if (pg != NULL)
+    GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL);
   GNUNET_SCHEDULER_cancel (die_task);
 }
 
@@ -217,7 +216,7 @@
 
 static void
 do_lookup(void *cls, const struct GNUNET_PeerIdentity *id,
-          const struct GNUNET_CONFIGURATION_Handle *cfg,
+          const struct GNUNET_CONFIGURATION_Handle *_cfg,
           struct GNUNET_TESTING_Daemon *d, const char *emsg)
 {
   struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded alice_pkey;
@@ -227,6 +226,8 @@
   char* alice_keyfile;
   struct GNUNET_CRYPTO_ShortHashCode bob_hash;
 
+  cfg = _cfg;
+
   GNUNET_SCHEDULER_cancel (die_task);
 
   /* put records into namestore */
@@ -320,8 +321,11 @@
                                     "didn't start all daemons in reasonable 
amount of time!!!");
   
   /* Start alice */
-  d1 = GNUNET_TESTING_daemon_start(cfg, TIMEOUT, GNUNET_NO, NULL, NULL, 0,
-                                   NULL, NULL, NULL, &do_lookup, NULL);
+  //d1 = GNUNET_TESTING_daemon_start(cfg, TIMEOUT, GNUNET_NO, NULL, NULL, 0,
+  //                                 NULL, NULL, NULL, &do_lookup, NULL);
+  pg = GNUNET_TESTING_daemons_start(cfg, 1, 1, 1, TIMEOUT,
+                                    NULL, NULL, &do_lookup, NULL,
+                                    NULL, NULL, NULL);
 }
 
 static int

Modified: gnunet/src/gns/test_gns_pseu_shorten.c
===================================================================
--- gnunet/src/gns/test_gns_pseu_shorten.c      2012-04-10 13:29:17 UTC (rev 
20921)
+++ gnunet/src/gns/test_gns_pseu_shorten.c      2012-04-10 14:14:41 UTC (rev 
20922)
@@ -64,9 +64,8 @@
  */
 static char *test_directory;
 
-struct GNUNET_TESTING_Daemon *d1;
+static struct GNUNET_TESTING_PeerGroup *pg;
 
-
 /* Task handle to use to schedule test failure */
 GNUNET_SCHEDULER_TaskIdentifier die_task;
 
@@ -145,8 +144,7 @@
   }
 
   GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Shutting down peer1!\n");
-  GNUNET_TESTING_daemon_stop (d1, TIMEOUT, &shutdown_callback, NULL,
-                              GNUNET_YES, GNUNET_NO);
+  GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL);
 }
 
 static void
@@ -234,9 +232,8 @@
 end_badly_cont (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
 
-  if (d1 != NULL)
-    GNUNET_TESTING_daemon_stop (d1, TIMEOUT, &shutdown_callback, NULL,
-                                GNUNET_YES, GNUNET_NO);
+  if (pg != NULL)
+    GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL);
   GNUNET_SCHEDULER_cancel (die_task);
 }
 
@@ -492,13 +489,14 @@
 
 static void
 do_lookup(void *cls, const struct GNUNET_PeerIdentity *id,
-          const struct GNUNET_CONFIGURATION_Handle *cfg,
+          const struct GNUNET_CONFIGURATION_Handle *_cfg,
           struct GNUNET_TESTING_Daemon *d, const char *emsg)
 {
   
   
   char* our_keyfile;
   
+  cfg = _cfg;
 
   GNUNET_SCHEDULER_cancel (die_task);
 
@@ -578,8 +576,11 @@
                                     "didn't start all daemons in reasonable 
amount of time!!!");
   
   /* Start alice */
-  d1 = GNUNET_TESTING_daemon_start(cfg, TIMEOUT, GNUNET_NO, NULL, NULL, 0,
-                                   NULL, NULL, NULL, &do_lookup, NULL);
+  //d1 = GNUNET_TESTING_daemon_start(cfg, TIMEOUT, GNUNET_NO, NULL, NULL, 0,
+  //                                 NULL, NULL, NULL, &do_lookup, NULL);
+  pg = GNUNET_TESTING_daemons_start(cfg, 1, 1, 1, TIMEOUT,
+                                    NULL, NULL, &do_lookup, NULL,
+                                    NULL, NULL, NULL);
 }
 
 static int

Modified: gnunet/src/gns/test_gns_simple_delegated_lookup.c
===================================================================
--- gnunet/src/gns/test_gns_simple_delegated_lookup.c   2012-04-10 13:29:17 UTC 
(rev 20921)
+++ gnunet/src/gns/test_gns_simple_delegated_lookup.c   2012-04-10 14:14:41 UTC 
(rev 20922)
@@ -71,9 +71,8 @@
  */
 static char *test_directory;
 
-struct GNUNET_TESTING_Daemon *d1;
+static struct GNUNET_TESTING_PeerGroup *pg;
 
-
 /* Task handle to use to schedule test failure */
 GNUNET_SCHEDULER_TaskIdentifier die_task;
 
@@ -143,8 +142,7 @@
   }
   GNUNET_GNS_disconnect(gns_handle);
   GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Shutting down peer1!\n");
-  GNUNET_TESTING_daemon_stop (d1, TIMEOUT, &shutdown_callback, NULL,
-                              GNUNET_YES, GNUNET_NO);
+  GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL);
 }
 
 
@@ -177,9 +175,8 @@
 end_badly_cont (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
 
-  if (d1 != NULL)
-    GNUNET_TESTING_daemon_stop (d1, TIMEOUT, &shutdown_callback, NULL,
-                                GNUNET_YES, GNUNET_NO);
+  if (pg != NULL)
+    GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL);
   GNUNET_SCHEDULER_cancel (die_task);
 }
 
@@ -199,7 +196,7 @@
 
 static void
 do_lookup(void *cls, const struct GNUNET_PeerIdentity *id,
-          const struct GNUNET_CONFIGURATION_Handle *cfg,
+          const struct GNUNET_CONFIGURATION_Handle *_cfg,
           struct GNUNET_TESTING_Daemon *d, const char *emsg)
 {
   struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded alice_pkey;
@@ -210,6 +207,8 @@
   struct GNUNET_CRYPTO_RsaSignature *sig;
   char* alice_keyfile;
 
+  cfg = _cfg;
+
   GNUNET_SCHEDULER_cancel (die_task);
 
   /* put records into namestore */
@@ -298,8 +297,9 @@
                                     "didn't start all daemons in reasonable 
amount of time!!!");
   
   /* Start alice */
-  d1 = GNUNET_TESTING_daemon_start(cfg, TIMEOUT, GNUNET_NO, NULL, NULL, 0,
-                                   NULL, NULL, NULL, &do_lookup, NULL);
+  pg = GNUNET_TESTING_daemons_start(cfg, 1, 1, 1, TIMEOUT,
+                                    NULL, NULL, &do_lookup, NULL,
+                                    NULL, NULL, NULL);
 }
 
 static int

Modified: gnunet/src/gns/test_gns_simple_get_authority.c
===================================================================
--- gnunet/src/gns/test_gns_simple_get_authority.c      2012-04-10 13:29:17 UTC 
(rev 20921)
+++ gnunet/src/gns/test_gns_simple_get_authority.c      2012-04-10 14:14:41 UTC 
(rev 20922)
@@ -61,9 +61,8 @@
  */
 static char *test_directory;
 
-struct GNUNET_TESTING_Daemon *d1;
+static struct GNUNET_TESTING_PeerGroup *pg;
 
-
 /* Task handle to use to schedule test failure */
 GNUNET_SCHEDULER_TaskIdentifier die_task;
 
@@ -125,8 +124,7 @@
   }
 
   GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Shutting down peer1!\n");
-  GNUNET_TESTING_daemon_stop (d1, TIMEOUT, &shutdown_callback, NULL,
-                              GNUNET_YES, GNUNET_NO);
+  GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL);
 }
 
 /**
@@ -168,9 +166,8 @@
 end_badly_cont (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
 
-  if (d1 != NULL)
-    GNUNET_TESTING_daemon_stop (d1, TIMEOUT, &shutdown_callback, NULL,
-                                GNUNET_YES, GNUNET_NO);
+  if (pg != NULL)
+    GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL);
   GNUNET_SCHEDULER_cancel (die_task);
 }
 
@@ -190,7 +187,7 @@
 
 static void
 do_shorten(void *cls, const struct GNUNET_PeerIdentity *id,
-          const struct GNUNET_CONFIGURATION_Handle *cfg,
+          const struct GNUNET_CONFIGURATION_Handle *_cfg,
           struct GNUNET_TESTING_Daemon *d, const char *emsg)
 {
   struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded our_pkey;
@@ -204,6 +201,8 @@
   struct GNUNET_CRYPTO_RsaSignature *sig;
   char* our_keyfile;
 
+  cfg = _cfg;
+
   GNUNET_SCHEDULER_cancel (die_task);
 
   /* put records into namestore */
@@ -331,8 +330,9 @@
                                     "didn't start all daemons in reasonable 
amount of time!!!");
   
   /* Start alice */
-  d1 = GNUNET_TESTING_daemon_start(cfg, TIMEOUT, GNUNET_NO, NULL, NULL, 0,
-                                   NULL, NULL, NULL, &do_shorten, NULL);
+  pg = GNUNET_TESTING_daemons_start(cfg, 1, 1, 1, TIMEOUT,
+                                    NULL, NULL, &do_shorten, NULL,
+                                    NULL, NULL, NULL);
 }
 
 static int

Modified: gnunet/src/gns/test_gns_simple_lookup.c
===================================================================
--- gnunet/src/gns/test_gns_simple_lookup.c     2012-04-10 13:29:17 UTC (rev 
20921)
+++ gnunet/src/gns/test_gns_simple_lookup.c     2012-04-10 14:14:41 UTC (rev 
20922)
@@ -52,9 +52,8 @@
  */
 static char *test_directory;
 
-struct GNUNET_TESTING_Daemon *d1;
+static struct GNUNET_TESTING_PeerGroup *pg;
 
-
 /* Task handle to use to schedule test failure */
 GNUNET_SCHEDULER_TaskIdentifier die_task;
 
@@ -125,8 +124,7 @@
   }
   GNUNET_GNS_disconnect(gns_handle);
   GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Shutting down peer1!\n");
-  GNUNET_TESTING_daemon_stop (d1, TIMEOUT, &shutdown_callback, NULL,
-                              GNUNET_YES, GNUNET_NO);
+  GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL);
 }
 
 
@@ -163,9 +161,8 @@
 end_badly_cont (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
 
-  if (d1 != NULL)
-    GNUNET_TESTING_daemon_stop (d1, TIMEOUT, &shutdown_callback, NULL,
-                                GNUNET_YES, GNUNET_NO);
+  if (pg != NULL)
+    GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL);
   GNUNET_SCHEDULER_cancel (die_task);
 }
 
@@ -185,12 +182,14 @@
 
 static void
 do_lookup(void *cls, const struct GNUNET_PeerIdentity *id,
-          const struct GNUNET_CONFIGURATION_Handle *cfg,
+          const struct GNUNET_CONFIGURATION_Handle *_cfg,
           struct GNUNET_TESTING_Daemon *d, const char *emsg)
 {
   struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded alice_pkey;
   struct GNUNET_CRYPTO_RsaPrivateKey *alice_key;
   char* alice_keyfile;
+  
+  cfg = _cfg;
 
   GNUNET_SCHEDULER_cancel (die_task);
 
@@ -260,8 +259,9 @@
                                     "didn't start all daemons in reasonable 
amount of time!!!");
   
   /* Start alice */
-  d1 = GNUNET_TESTING_daemon_start(cfg, TIMEOUT, GNUNET_NO, NULL, NULL, 0,
-                                   NULL, NULL, NULL, &do_lookup, NULL);
+  pg = GNUNET_TESTING_daemons_start(cfg, 1, 1, 1, TIMEOUT,
+                                    NULL, NULL, &do_lookup, NULL,
+                                    NULL, NULL, NULL);
 }
 
 static int

Modified: gnunet/src/gns/test_gns_simple_mx_lookup.c
===================================================================
--- gnunet/src/gns/test_gns_simple_mx_lookup.c  2012-04-10 13:29:17 UTC (rev 
20921)
+++ gnunet/src/gns/test_gns_simple_mx_lookup.c  2012-04-10 14:14:41 UTC (rev 
20922)
@@ -59,9 +59,8 @@
  */
 static char *test_directory;
 
-struct GNUNET_TESTING_Daemon *d1;
+static struct GNUNET_TESTING_PeerGroup *pg;
 
-
 /* Task handle to use to schedule test failure */
 GNUNET_SCHEDULER_TaskIdentifier die_task;
 
@@ -160,8 +159,7 @@
 
   GNUNET_GNS_disconnect(gns_handle);
   GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Shutting down peer1!\n");
-  GNUNET_TESTING_daemon_stop (d1, TIMEOUT, &shutdown_callback, NULL,
-                              GNUNET_YES, GNUNET_NO);
+  GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL);
 }
 
 
@@ -194,9 +192,8 @@
 end_badly_cont (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
 
-  if (d1 != NULL)
-    GNUNET_TESTING_daemon_stop (d1, TIMEOUT, &shutdown_callback, NULL,
-                                GNUNET_YES, GNUNET_NO);
+  if (pg != NULL)
+    GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL);
   GNUNET_SCHEDULER_cancel (die_task);
 }
 
@@ -216,7 +213,7 @@
 
 static void
 do_lookup(void *cls, const struct GNUNET_PeerIdentity *id,
-          const struct GNUNET_CONFIGURATION_Handle *cfg,
+          const struct GNUNET_CONFIGURATION_Handle *_cfg,
           struct GNUNET_TESTING_Daemon *d, const char *emsg)
 {
   struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded alice_pkey;
@@ -227,6 +224,8 @@
   struct GNUNET_CRYPTO_RsaSignature *sig;
   char* alice_keyfile;
 
+  cfg = _cfg;
+
   GNUNET_SCHEDULER_cancel (die_task);
 
   /* put records into namestore */
@@ -339,8 +338,9 @@
                                     "didn't start all daemons in reasonable 
amount of time!!!");
   
   /* Start alice */
-  d1 = GNUNET_TESTING_daemon_start(cfg, TIMEOUT, GNUNET_NO, NULL, NULL, 0,
-                                   NULL, NULL, NULL, &do_lookup, NULL);
+  pg = GNUNET_TESTING_daemons_start(cfg, 1, 1, 1, TIMEOUT,
+                                    NULL, NULL, &do_lookup, NULL,
+                                    NULL, NULL, NULL);
 }
 
 static int

Modified: gnunet/src/gns/test_gns_simple_shorten.c
===================================================================
--- gnunet/src/gns/test_gns_simple_shorten.c    2012-04-10 13:29:17 UTC (rev 
20921)
+++ gnunet/src/gns/test_gns_simple_shorten.c    2012-04-10 14:14:41 UTC (rev 
20922)
@@ -61,9 +61,8 @@
  */
 static char *test_directory;
 
-struct GNUNET_TESTING_Daemon *d1;
+static struct GNUNET_TESTING_PeerGroup *pg;
 
-
 /* Task handle to use to schedule test failure */
 GNUNET_SCHEDULER_TaskIdentifier die_task;
 
@@ -125,8 +124,7 @@
   }
 
   GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Shutting down peer1!\n");
-  GNUNET_TESTING_daemon_stop (d1, TIMEOUT, &shutdown_callback, NULL,
-                              GNUNET_YES, GNUNET_NO);
+  GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL);
 }
 
 /**
@@ -168,9 +166,8 @@
 end_badly_cont (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
 
-  if (d1 != NULL)
-    GNUNET_TESTING_daemon_stop (d1, TIMEOUT, &shutdown_callback, NULL,
-                                GNUNET_YES, GNUNET_NO);
+  if (pg != NULL)
+    GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL);
   GNUNET_SCHEDULER_cancel (die_task);
 }
 
@@ -190,7 +187,7 @@
 
 static void
 do_shorten(void *cls, const struct GNUNET_PeerIdentity *id,
-          const struct GNUNET_CONFIGURATION_Handle *cfg,
+          const struct GNUNET_CONFIGURATION_Handle *_cfg,
           struct GNUNET_TESTING_Daemon *d, const char *emsg)
 {
   struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded our_pkey;
@@ -204,6 +201,8 @@
   struct GNUNET_CRYPTO_RsaSignature *sig;
   char* our_keyfile;
 
+  cfg = _cfg;
+
   GNUNET_SCHEDULER_cancel (die_task);
 
   /* put records into namestore */
@@ -331,8 +330,9 @@
                                     "didn't start all daemons in reasonable 
amount of time!!!");
   
   /* Start alice */
-  d1 = GNUNET_TESTING_daemon_start(cfg, TIMEOUT, GNUNET_NO, NULL, NULL, 0,
-                                   NULL, NULL, NULL, &do_shorten, NULL);
+  pg = GNUNET_TESTING_daemons_start(cfg, 1, 1, 1, TIMEOUT,
+                                    NULL, NULL, &do_shorten, NULL,
+                                    NULL, NULL, NULL);
 }
 
 static int

Modified: gnunet/src/gns/test_gns_simple_zkey_lookup.c
===================================================================
--- gnunet/src/gns/test_gns_simple_zkey_lookup.c        2012-04-10 13:29:17 UTC 
(rev 20921)
+++ gnunet/src/gns/test_gns_simple_zkey_lookup.c        2012-04-10 14:14:41 UTC 
(rev 20922)
@@ -57,9 +57,8 @@
  */
 static char *test_directory;
 
-struct GNUNET_TESTING_Daemon *d1;
+static struct GNUNET_TESTING_PeerGroup *pg;
 
-
 /* Task handle to use to schedule test failure */
 GNUNET_SCHEDULER_TaskIdentifier die_task;
 
@@ -131,8 +130,7 @@
   }
   GNUNET_GNS_disconnect(gns_handle);
   GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Shutting down peer1!\n");
-  GNUNET_TESTING_daemon_stop (d1, TIMEOUT, &shutdown_callback, NULL,
-                              GNUNET_YES, GNUNET_NO);
+  GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL);
 }
 
 
@@ -181,9 +179,8 @@
 end_badly_cont (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
 
-  if (d1 != NULL)
-    GNUNET_TESTING_daemon_stop (d1, TIMEOUT, &shutdown_callback, NULL,
-                                GNUNET_YES, GNUNET_NO);
+  if (pg != NULL)
+    GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL);
   GNUNET_SCHEDULER_cancel (die_task);
 }
 
@@ -203,7 +200,7 @@
 
 static void
 do_lookup(void *cls, const struct GNUNET_PeerIdentity *id,
-          const struct GNUNET_CONFIGURATION_Handle *cfg,
+          const struct GNUNET_CONFIGURATION_Handle *_cfg,
           struct GNUNET_TESTING_Daemon *d, const char *emsg)
 {
   struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded alice_pkey;
@@ -213,6 +210,8 @@
   struct GNUNET_CRYPTO_RsaSignature *sig;
   char* alice_keyfile;
 
+  cfg = _cfg;
+
   GNUNET_SCHEDULER_cancel (die_task);
 
   /* put records into namestore */
@@ -301,8 +300,9 @@
                                     "didn't start all daemons in reasonable 
amount of time!!!");
   
   /* Start alice */
-  d1 = GNUNET_TESTING_daemon_start(cfg, TIMEOUT, GNUNET_NO, NULL, NULL, 0,
-                                   NULL, NULL, NULL, &do_lookup, NULL);
+  pg = GNUNET_TESTING_daemons_start(cfg, 1, 1, 1, TIMEOUT,
+                                    NULL, NULL, &do_lookup, NULL,
+                                    NULL, NULL, NULL);
 }
 
 static int




reply via email to

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