aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/testing/test_testing.c3
-rw-r--r--src/testing/test_testing_connect.c4
-rw-r--r--src/testing/test_testing_group.c8
-rw-r--r--src/testing/test_testing_topology.c6
-rw-r--r--src/testing/testing.c17
-rw-r--r--src/testing/testing_group.c18
6 files changed, 37 insertions, 19 deletions
diff --git a/src/testing/test_testing.c b/src/testing/test_testing.c
index 15b7e10ec..4a014de66 100644
--- a/src/testing/test_testing.c
+++ b/src/testing/test_testing.c
@@ -101,8 +101,7 @@ main (int argc, char *argv[])
101#endif 101#endif
102 NULL); 102 NULL);
103 ret = check (); 103 ret = check ();
104 sleep (1); /* FIXME: make this unnecessary */ 104
105 GNUNET_DISK_directory_remove ("/tmp/test-gnunet-testing");
106 return ret; 105 return ret;
107} 106}
108 107
diff --git a/src/testing/test_testing_connect.c b/src/testing/test_testing_connect.c
index 5cd6274ea..15cc695bc 100644
--- a/src/testing/test_testing_connect.c
+++ b/src/testing/test_testing_connect.c
@@ -170,10 +170,10 @@ main (int argc, char *argv[])
170#endif 170#endif
171 NULL); 171 NULL);
172 ret = check (); 172 ret = check ();
173 sleep (1); 173 /*sleep (1);
174 GNUNET_DISK_directory_remove ("/tmp/test-gnunet-testing"); 174 GNUNET_DISK_directory_remove ("/tmp/test-gnunet-testing");
175 GNUNET_DISK_directory_remove ("/tmp/test-gnunet-testing-connect-peer1"); 175 GNUNET_DISK_directory_remove ("/tmp/test-gnunet-testing-connect-peer1");
176 GNUNET_DISK_directory_remove ("/tmp/test-gnunet-testing-connect-peer2"); 176 GNUNET_DISK_directory_remove ("/tmp/test-gnunet-testing-connect-peer2");*/
177 return ret; 177 return ret;
178} 178}
179 179
diff --git a/src/testing/test_testing_group.c b/src/testing/test_testing_group.c
index 2b6df732e..1f21b64f4 100644
--- a/src/testing/test_testing_group.c
+++ b/src/testing/test_testing_group.c
@@ -109,7 +109,13 @@ main (int argc, char *argv[])
109#endif 109#endif
110 NULL); 110 NULL);
111 ret = check (); 111 ret = check ();
112 sleep (1); 112 /**
113 * Still need to remove the base testing directory here,
114 * because group starts will create subdirectories under this
115 * main dir. However, we no longer need to sleep, as the
116 * shutdown sequence won't return until everything is cleaned
117 * up.
118 */
113 GNUNET_DISK_directory_remove ("/tmp/test-gnunet-testing"); 119 GNUNET_DISK_directory_remove ("/tmp/test-gnunet-testing");
114 return ret; 120 return ret;
115} 121}
diff --git a/src/testing/test_testing_topology.c b/src/testing/test_testing_topology.c
index c3d9cfda8..7f5411fc4 100644
--- a/src/testing/test_testing_topology.c
+++ b/src/testing/test_testing_topology.c
@@ -619,7 +619,11 @@ main (int argc, char *argv[])
619#endif 619#endif
620 NULL); 620 NULL);
621 ret = check (); 621 ret = check ();
622 sleep (1); 622
623 /**
624 * Need to remove base directory, subdirectories taken care
625 * of by the testing framework.
626 */
623 GNUNET_DISK_directory_remove ("/tmp/test-gnunet-testing"); 627 GNUNET_DISK_directory_remove ("/tmp/test-gnunet-testing");
624 GNUNET_free(our_binary_name); 628 GNUNET_free(our_binary_name);
625 return ret; 629 return ret;
diff --git a/src/testing/testing.c b/src/testing/testing.c
index a18e7b88b..a1bbb4f70 100644
--- a/src/testing/testing.c
+++ b/src/testing/testing.c
@@ -168,13 +168,13 @@ start_fsm (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
168 /* start GNUnet on remote host */ 168 /* start GNUnet on remote host */
169 if (NULL == d->hostname) 169 if (NULL == d->hostname)
170 { 170 {
171 d->pid = GNUNET_OS_start_process (NULL, NULL, "gnunet-service-arm", 171 d->pid = GNUNET_OS_start_process (NULL, NULL, "gnunet-arm",
172 "gnunet-service-arm", 172 "gnunet-arm",
173 "-c", d->cfgfile, 173 "-c", d->cfgfile,
174#if DEBUG_TESTING 174#if DEBUG_TESTING
175 "-L", "DEBUG", 175 "-L", "DEBUG",
176#endif 176#endif
177 "-d", NULL); 177 "-s", NULL);
178 } 178 }
179 else 179 else
180 { 180 {
@@ -186,6 +186,9 @@ start_fsm (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
186 "ssh", 186 "ssh",
187 dst, 187 dst,
188 "gnunet-arm", 188 "gnunet-arm",
189#if DEBUG_TESTING
190 "-L", "DEBUG",
191#endif
189 "-c", d->cfgfile, "-s", NULL); 192 "-c", d->cfgfile, "-s", NULL);
190 GNUNET_free (dst); 193 GNUNET_free (dst);
191 } 194 }
@@ -528,6 +531,9 @@ GNUNET_TESTING_daemon_stop (struct GNUNET_TESTING_Daemon *d,
528 531
529 d->pid = GNUNET_OS_start_process (NULL, NULL, "ssh", "ssh", 532 d->pid = GNUNET_OS_start_process (NULL, NULL, "ssh", "ssh",
530 arg, "gnunet-arm", 533 arg, "gnunet-arm",
534#if DEBUG_TESTING
535 "-L", "DEBUG",
536#endif
531 "-c", d->cfgfile, "-e", "-d", NULL); 537 "-c", d->cfgfile, "-e", "-d", NULL);
532 /* Use -e to end arm, and -d to remove temp files */ 538 /* Use -e to end arm, and -d to remove temp files */
533 539
@@ -541,7 +547,10 @@ GNUNET_TESTING_daemon_stop (struct GNUNET_TESTING_Daemon *d,
541#endif 547#endif
542 d->pid = GNUNET_OS_start_process (NULL, NULL, "gnunet-arm", 548 d->pid = GNUNET_OS_start_process (NULL, NULL, "gnunet-arm",
543 "gnunet-arm", 549 "gnunet-arm",
544 "-c", d->cfgfile, "-e", NULL); 550#if DEBUG_TESTING
551 "-L", "DEBUG",
552#endif
553 "-c", d->cfgfile, "-e", "-d", NULL);
545 } 554 }
546 555
547 d->wait_runs = 0; 556 d->wait_runs = 0;
diff --git a/src/testing/testing_group.c b/src/testing/testing_group.c
index 30c4fc886..96d2831d7 100644
--- a/src/testing/testing_group.c
+++ b/src/testing/testing_group.c
@@ -27,7 +27,7 @@
27#include "gnunet_arm_service.h" 27#include "gnunet_arm_service.h"
28#include "gnunet_testing_lib.h" 28#include "gnunet_testing_lib.h"
29 29
30#define VERBOSE_TESTING GNUNET_YES 30#define VERBOSE_TESTING GNUNET_NO
31 31
32/** 32/**
33 * Lowest port used for GNUnet testing. Should be high enough to not 33 * Lowest port used for GNUnet testing. Should be high enough to not
@@ -213,8 +213,8 @@ update_config (void *cls,
213 * Create a new configuration using the given configuration 213 * Create a new configuration using the given configuration
214 * as a template; however, each PORT in the existing cfg 214 * as a template; however, each PORT in the existing cfg
215 * must be renumbered by incrementing "*port". If we run 215 * must be renumbered by incrementing "*port". If we run
216 * out of "*port" numbers, return NULL. 216 * out of "*port" numbers, return NULL.
217 * 217 *
218 * @param cfg template configuration 218 * @param cfg template configuration
219 * @param port port numbers to use, update to reflect 219 * @param port port numbers to use, update to reflect
220 * port numbers that were used 220 * port numbers that were used
@@ -330,9 +330,9 @@ create_small_world_ring(struct GNUNET_TESTING_PeerGroup *pg)
330 int connect_attempts; 330 int connect_attempts;
331 331
332 logNModifier = 0.5; /* FIXME: default value? */ 332 logNModifier = 0.5; /* FIXME: default value? */
333 if (GNUNET_OK == GNUNET_CONFIGURATION_get_value_string(pg->cfg, 333 if (GNUNET_OK == GNUNET_CONFIGURATION_get_value_string(pg->cfg,
334 "TESTING", 334 "TESTING",
335 "LOGNMODIFIER", 335 "LOGNMODIFIER",
336 &p_string)) 336 &p_string))
337 { 337 {
338 if (sscanf(p_string, "%lf", &logNModifier) != 1) 338 if (sscanf(p_string, "%lf", &logNModifier) != 1)
@@ -500,7 +500,7 @@ create_small_world (struct GNUNET_TESTING_PeerGroup *pg)
500 square = floor (sqrt (pg->total)); 500 square = floor (sqrt (pg->total));
501 rows = square; 501 rows = square;
502 cols = square; 502 cols = square;
503 503
504 percentage = 0.5; /* FIXME: default percentage? */ 504 percentage = 0.5; /* FIXME: default percentage? */
505 if (GNUNET_OK == GNUNET_CONFIGURATION_get_value_string(pg->cfg, 505 if (GNUNET_OK == GNUNET_CONFIGURATION_get_value_string(pg->cfg,
506 "TESTING", 506 "TESTING",
@@ -842,7 +842,7 @@ create_and_copy_friend_files (struct GNUNET_TESTING_PeerGroup *pg)
842 842
843 if (GNUNET_OK != 843 if (GNUNET_OK !=
844 GNUNET_CONFIGURATION_get_value_string(pg->peers[pg_iter].daemon->cfg, "PATHS", "SERVICEHOME", &temp_service_path)) 844 GNUNET_CONFIGURATION_get_value_string(pg->peers[pg_iter].daemon->cfg, "PATHS", "SERVICEHOME", &temp_service_path))
845 { 845 {
846 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 846 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
847 _("No `%s' specified in peer configuration in section `%s', cannot copy friends file!\n"), 847 _("No `%s' specified in peer configuration in section `%s', cannot copy friends file!\n"),
848 "SERVICEHOME", 848 "SERVICEHOME",
@@ -1134,7 +1134,7 @@ GNUNET_TESTING_create_topology (struct GNUNET_TESTING_PeerGroup *pg)
1134 * adjusted to ensure that no two peers running on the same system 1134 * adjusted to ensure that no two peers running on the same system
1135 * have the same port(s) in their respective configurations. 1135 * have the same port(s) in their respective configurations.
1136 * 1136 *
1137 * @param sched scheduler to use 1137 * @param sched scheduler to use
1138 * @param cfg configuration template to use 1138 * @param cfg configuration template to use
1139 * @param total number of daemons to start 1139 * @param total number of daemons to start
1140 * @param cb function to call on each daemon that was started 1140 * @param cb function to call on each daemon that was started
@@ -1301,7 +1301,7 @@ GNUNET_TESTING_daemon_get (struct GNUNET_TESTING_PeerGroup *pg, unsigned int pos
1301 1301
1302/** 1302/**
1303 * Shutdown all peers started in the given group. 1303 * Shutdown all peers started in the given group.
1304 * 1304 *
1305 * @param pg handle to the peer group 1305 * @param pg handle to the peer group
1306 */ 1306 */
1307void 1307void