-fixes for api change in testing library
authorSree Harsha Totakura <totakura@in.tum.de>
Wed, 20 Jun 2012 15:14:44 +0000 (15:14 +0000)
committerSree Harsha Totakura <totakura@in.tum.de>
Wed, 20 Jun 2012 15:14:44 +0000 (15:14 +0000)
21 files changed:
src/datastore/perf_datastore_api.c
src/datastore/test_datastore_api.c
src/datastore/test_datastore_api_management.c
src/fs/test_fs_download.c
src/fs/test_fs_download_indexed.c
src/fs/test_fs_download_persistence.c
src/fs/test_fs_list_indexed.c
src/fs/test_fs_namespace.c
src/fs/test_fs_namespace_list_updateable.c
src/fs/test_fs_publish.c
src/fs/test_fs_publish_persistence.c
src/fs/test_fs_search.c
src/fs/test_fs_search_persistence.c
src/fs/test_fs_search_probes.c
src/fs/test_fs_start_stop.c
src/fs/test_fs_unindex.c
src/fs/test_fs_unindex_persistence.c
src/lockmanager/test_lockmanager_api.c
src/nse/test_nse_api.c
src/stream/test_stream_big.c
src/vpn/test_gnunet_vpn.c

index 6b7a73640a3e6c6675a200dc0f1908751bd09b12..b690610f557c5657953d99d6b7ef431151f28c18 100644 (file)
@@ -295,7 +295,8 @@ run_tests (void *cls, int success, struct GNUNET_TIME_Absolute min_expiration, c
 
 static void
 run (void *cls, 
-     const struct GNUNET_CONFIGURATION_Handle *cfg)
+     const struct GNUNET_CONFIGURATION_Handle *cfg,
+     struct GNUNET_TESTING_Peer *peer)
 {
   struct CpsRunContext *crc;
   static struct GNUNET_HashCode zkey;
index 3f8f87cae38b98b1e98add9409751ec8c976e808..15e6afa4a6923317c9cc7becd224b7e3475cdba6 100644 (file)
@@ -464,7 +464,8 @@ run_tests (void *cls, int32_t success, struct GNUNET_TIME_Absolute min_expiratio
 
 static void
 run (void *cls, 
-     const struct GNUNET_CONFIGURATION_Handle *cfg)
+     const struct GNUNET_CONFIGURATION_Handle *cfg,
+     struct GNUNET_TESTING_Peer *peer)
 {
   struct CpsRunContext *crc;
   static struct GNUNET_HashCode zkey;
index 4766c03eb1181f4be0f11fbf18e47f55e91a68ce..b8f042e509b56f5328302251ee1d13c277b90c17 100644 (file)
@@ -259,7 +259,8 @@ run_tests (void *cls, int success, struct GNUNET_TIME_Absolute min_expiration, c
 
 static void
 run (void *cls, 
-     const struct GNUNET_CONFIGURATION_Handle *cfg)
+     const struct GNUNET_CONFIGURATION_Handle *cfg,
+     struct GNUNET_TESTING_Peer *peer)
 {
   struct CpsRunContext *crc;
   static struct GNUNET_HashCode zkey;
index 51c7a40005312c1479c2c72657259078241a827e..6d3ccff6e46f222b4bc433a5bed8aafc912de423 100644 (file)
@@ -232,7 +232,8 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
 
 static void
 run (void *cls,
-     const struct GNUNET_CONFIGURATION_Handle *cfg)
+     const struct GNUNET_CONFIGURATION_Handle *cfg,
+     struct GNUNET_TESTING_Peer *peer)
 {
   const char *keywords[] = {
     "down_foo",
index 2d4091d7ad8a4441a2875dbd9e459196b990f3d7..fc50fa975d947eb33d86724b3f6ad4bd3807ae2c 100644 (file)
@@ -232,7 +232,8 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
 
 static void
 run (void *cls,
-     const struct GNUNET_CONFIGURATION_Handle *cfg)
+     const struct GNUNET_CONFIGURATION_Handle *cfg,
+     struct GNUNET_TESTING_Peer *peer)
 {
   const char *keywords[] = {
     "down_foo",
index 98a32af5f778cb1e36ac7d50ae75811bcb08ef81..a5f014db5aae7c06cfc4b900a83b5cf1577cf24e 100644 (file)
@@ -277,7 +277,8 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
 
 static void
 run (void *cls, 
-     const struct GNUNET_CONFIGURATION_Handle *c)
+     const struct GNUNET_CONFIGURATION_Handle *c,
+     struct GNUNET_TESTING_Peer *peer)
 {
   const char *keywords[] = {
     "down_foo",
index 2b53bc5a47927ba5949ca9414000f8a8b48e656c..3166bf9807c538aad9735b149b61926fc42351bd 100644 (file)
@@ -170,7 +170,8 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
 
 static void
 run (void *cls,
-     const struct GNUNET_CONFIGURATION_Handle *cfg)
+     const struct GNUNET_CONFIGURATION_Handle *cfg,
+     struct GNUNET_TESTING_Peer *peer)
 {
   const char *keywords[] = {
     "down_foo",
index 7f0a533444815e8f368934499c65d0d33152ab4f..69fead2d6d93e7b236f0650a9e139213a3905397 100644 (file)
@@ -318,7 +318,8 @@ testNamespace ()
 
 static void
 run (void *cls, 
-     const struct GNUNET_CONFIGURATION_Handle *cfg)
+     const struct GNUNET_CONFIGURATION_Handle *cfg,
+     struct GNUNET_TESTING_Peer *peer)
 {
   fs = GNUNET_FS_start (cfg, "test-fs-namespace", &progress_cb, NULL,
                         GNUNET_FS_FLAGS_NONE, GNUNET_FS_OPTIONS_END);
index 50668cac3896b4a091cdb35d014513b302f46ce4..10e5c9be7e5ca929ea094b56792da476974888bc 100644 (file)
@@ -151,7 +151,8 @@ testNamespace ()
 
 static void
 run (void *cls, 
-     const struct GNUNET_CONFIGURATION_Handle *cfg)
+     const struct GNUNET_CONFIGURATION_Handle *cfg,
+     struct GNUNET_TESTING_Peer *peer)
 {
   fs = GNUNET_FS_start (cfg, "test-fs-namespace", &progress_cb, NULL,
                         GNUNET_FS_FLAGS_NONE, GNUNET_FS_OPTIONS_END);
index 47a604c1dde5c9c4bc2c20d6548b03479af18512..622dd5a422018e8e29a1198d36bc20faadb25ad6 100644 (file)
@@ -154,7 +154,8 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
 
 static void
 run (void *cls, 
-     const struct GNUNET_CONFIGURATION_Handle *cfg)
+     const struct GNUNET_CONFIGURATION_Handle *cfg,
+     struct GNUNET_TESTING_Peer *peer)
 {
   const char *keywords[] = {
     "down_foo",
index cbe85953165370f09ae2f841e23573f2cdd40a91..985732739f4ed84e3a8fe38ce74f38695e25aaab 100644 (file)
@@ -219,7 +219,8 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
 
 static void
 run (void *cls, 
-     const struct GNUNET_CONFIGURATION_Handle *c)
+     const struct GNUNET_CONFIGURATION_Handle *c,
+     struct GNUNET_TESTING_Peer *peer)
 {
   const char *keywords[] = {
     "down_foo",
index 1ae84a8d038105d4c658d3dbb9c483d9b471d5a1..9a6ba90a405858b23ef895ba99d0fadcc4a5d475 100644 (file)
@@ -153,7 +153,8 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
 
 static void
 run (void *cls,
-     const struct GNUNET_CONFIGURATION_Handle *cfg)
+     const struct GNUNET_CONFIGURATION_Handle *cfg,
+     struct GNUNET_TESTING_Peer *peer)
 {
   const char *keywords[] = {
     "down_foo",
index cedf4b8a5ebe87ccc1beab95168cc5c819af0fe9..e2f97a5e15e3f1f3c44d6088c688dd9396515b51 100644 (file)
@@ -214,7 +214,8 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
 
 static void
 run (void *cls,
-     const struct GNUNET_CONFIGURATION_Handle *c)
+     const struct GNUNET_CONFIGURATION_Handle *c,
+     struct GNUNET_TESTING_Peer *peer)
 {
   const char *keywords[] = {
     "down_foo",
index be710a79c2f5672f5ab31f638f3b471927e8cf27..814eb348d7bad0690f498b6fe27f226ada97811a 100644 (file)
@@ -156,7 +156,8 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
 
 static void
 run (void *cls,
-     const struct GNUNET_CONFIGURATION_Handle *cfg)
+     const struct GNUNET_CONFIGURATION_Handle *cfg,
+     struct GNUNET_TESTING_Peer *peer)
 {
   const char *keywords[] = {
     "down_foo",
index f3dff69f69f472399cc73a8987ec65188f5b4c81..a1f595a2d786f6937079ef7b22272080900de41f 100644 (file)
@@ -38,7 +38,8 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
 
 static void
 run (void *cls, 
-     const struct GNUNET_CONFIGURATION_Handle *cfg)
+     const struct GNUNET_CONFIGURATION_Handle *cfg,
+     struct GNUNET_TESTING_Peer *peer)
 {
   struct GNUNET_FS_Handle *fs;
 
index 52e1845a711ebfb0a5ef635b38ca2e99a2df184f..0ff22ab2961c645cdb69eeff86bbf5d04bb40f46 100644 (file)
@@ -168,7 +168,8 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
 
 static void
 run (void *cls,
-     const struct GNUNET_CONFIGURATION_Handle *cfg)
+     const struct GNUNET_CONFIGURATION_Handle *cfg,
+     struct GNUNET_TESTING_Peer *peer)
 {
   const char *keywords[] = {
     "down_foo",
index 8f4364c28f2e7ac164161334f268ad751cfcfbc1..dba9d23d6241467f8a46f669868dc1e97c746a8d 100644 (file)
@@ -231,7 +231,8 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
 
 static void
 run (void *cls, 
-     const struct GNUNET_CONFIGURATION_Handle *c)
+     const struct GNUNET_CONFIGURATION_Handle *c,
+     struct GNUNET_TESTING_Peer *peer)
 {
   const char *keywords[] = {
     "down_foo",
index 4cc7454015372fdeb37ca2cdc5deea912a2a4b3b..91772e39cbc613f8206ad7e8f1b921328c0e4f6a 100644 (file)
@@ -177,7 +177,7 @@ status_cb (void *cls,
 static void
 run (void *cls,
      const struct GNUNET_CONFIGURATION_Handle *cfg,
-     const struct GNUNET_TESTING_Peer *peer)
+     struct GNUNET_TESTING_Peer *peer)
 {
   LOG (GNUNET_ERROR_TYPE_DEBUG, "Starting test...\n");
   config = cfg;
@@ -201,10 +201,9 @@ run (void *cls,
 int main (int argc, char **argv)
 {
 
-  if (0 != GNUNET_TESTING_service_run_restartable ("test_lockmanager_api",
-                                                  "arm",
-                                                  "test_lockmanager_api.conf",                                            
-                                                  &run, NULL))
+  if (0 != GNUNET_TESTING_peer_run ("test_lockmanager_api",
+                                   "test_lockmanager_api.conf",                                                   
+                                   &run, NULL))
     return 1;
   return (TEST_FAIL == result) ? 1 : 0;
 }
index c71d9161c27fc784b692ecae55889bf8e3eb73be..01fdb406ef96ed40c2430992d15fb4c0bac5e36c 100644 (file)
@@ -77,7 +77,8 @@ check_nse_message (void *cls, struct GNUNET_TIME_Absolute timestamp,
 
 static void
 run (void *cls, 
-     const struct GNUNET_CONFIGURATION_Handle *cfg)
+     const struct GNUNET_CONFIGURATION_Handle *cfg,
+     struct GNUNET_TESTING_Peer *peer)
 {
   die_task =
       GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply
index 03dec7c3d9a2747c34b4f1030f1d886231c3402d..6815ae6658a1adb273239ff807934333081104a1 100644 (file)
@@ -102,6 +102,7 @@ do_shutdown (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
     GNUNET_SCHEDULER_cancel (abort_task);
   }
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "test: Wait\n");
+  GNUNET_SCHEDULER_shutdown ();
 }
 
 
@@ -306,8 +307,8 @@ stream_read_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
  */
 static int
 stream_listen_cb (void *cls,
-           struct GNUNET_STREAM_Socket *socket,
-           const struct GNUNET_PeerIdentity *initiator)
+                 struct GNUNET_STREAM_Socket *socket,
+                 const struct GNUNET_PeerIdentity *initiator)
 {
   GNUNET_assert (NULL != socket);
   GNUNET_assert (socket != peer1.socket);
@@ -354,7 +355,7 @@ stream_connect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 static void
 run (void *cls, 
      const struct GNUNET_CONFIGURATION_Handle *cfg,
-     const struct GNUNET_TESTING_Peer *peer)
+     struct GNUNET_TESTING_Peer *peer)
 {
   struct GNUNET_PeerIdentity self;
   
@@ -380,10 +381,9 @@ run (void *cls,
  */
 int main (int argc, char **argv)
 {
-  if (0 != GNUNET_TESTING_service_run_restartable ("test-stream-big",
-                                                  "arm",
-                                                  "test_stream_local.conf",                                               
-                                                  &run, NULL))
+  if (0 != GNUNET_TESTING_peer_run ("test-stream-big",
+                                   "test_stream_local.conf",                                              
+                                   &run, NULL))
     return 1;
   return (GNUNET_SYSERR == result) ? 1 : 0;
 }
index 78bea39a72c7412e2a70cc9914e4c1268d1841a4..d2cfc757b0b4da8fa90ca61c8cb99b45aa6057e8 100644 (file)
@@ -374,7 +374,8 @@ mhd_main ()
 
 static void
 run (void *cls,
-     const struct GNUNET_CONFIGURATION_Handle *cfg)
+     const struct GNUNET_CONFIGURATION_Handle *cfg,
+     struct GNUNET_TESTING_Peer *peer)
 {
   struct in_addr v4;
   struct in6_addr v6;