aboutsummaryrefslogtreecommitdiff
path: root/src/testing
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-10-12 11:55:38 +0000
committerChristian Grothoff <christian@grothoff.org>2011-10-12 11:55:38 +0000
commite5202df0a057e94740c64abe60ff81809a9ce4fd (patch)
tree3df00ce60beb922842c7ae85426da8f8412295f2 /src/testing
parentb575fc243cf04543be543451739b563ca13259c4 (diff)
downloadgnunet-e5202df0a057e94740c64abe60ff81809a9ce4fd.tar.gz
gnunet-e5202df0a057e94740c64abe60ff81809a9ce4fd.zip
better logging
Diffstat (limited to 'src/testing')
-rw-r--r--src/testing/test_testing_reconnect.c26
-rw-r--r--src/testing/testing.c2
2 files changed, 22 insertions, 6 deletions
diff --git a/src/testing/test_testing_reconnect.c b/src/testing/test_testing_reconnect.c
index 433b02794..e9519ab3b 100644
--- a/src/testing/test_testing_reconnect.c
+++ b/src/testing/test_testing_reconnect.c
@@ -98,11 +98,13 @@ end1_cb (void *cls, const char *emsg)
98 { 98 {
99 ok = 0; 99 ok = 0;
100 } 100 }
101 101 if (d2 != NULL)
102 GNUNET_TESTING_daemon_stop (d2, TIMEOUT, &end2_cb, NULL, 102 {
103 (phase == NUM_PHASES) ? GNUNET_YES : GNUNET_NO, 103 GNUNET_TESTING_daemon_stop (d2, TIMEOUT, &end2_cb, NULL,
104 GNUNET_NO); 104 (phase == NUM_PHASES) ? GNUNET_YES : GNUNET_NO,
105 d2 = NULL; 105 GNUNET_NO);
106 d2 = NULL;
107 }
106} 108}
107 109
108static void 110static void
@@ -141,6 +143,13 @@ my_cb2 (void *cls, const struct GNUNET_PeerIdentity *id,
141 const struct GNUNET_CONFIGURATION_Handle *cfg, 143 const struct GNUNET_CONFIGURATION_Handle *cfg,
142 struct GNUNET_TESTING_Daemon *d, const char *emsg) 144 struct GNUNET_TESTING_Daemon *d, const char *emsg)
143{ 145{
146 if (emsg != NULL)
147 {
148 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Starting daemon 2 gave: %s\n",
149 emsg);
150 GNUNET_assert (0);
151 return;
152 }
144 GNUNET_assert (id != NULL); 153 GNUNET_assert (id != NULL);
145#if VERBOSE 154#if VERBOSE
146 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Daemon `%s' started.\n", 155 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Daemon `%s' started.\n",
@@ -156,6 +165,13 @@ my_cb1 (void *cls, const struct GNUNET_PeerIdentity *id,
156 const struct GNUNET_CONFIGURATION_Handle *cfg, 165 const struct GNUNET_CONFIGURATION_Handle *cfg,
157 struct GNUNET_TESTING_Daemon *d, const char *emsg) 166 struct GNUNET_TESTING_Daemon *d, const char *emsg)
158{ 167{
168 if (emsg != NULL)
169 {
170 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Starting daemon 1 gave: %s\n",
171 emsg);
172 GNUNET_assert (0);
173 return;
174 }
159 GNUNET_assert (id != NULL); 175 GNUNET_assert (id != NULL);
160#if VERBOSE 176#if VERBOSE
161 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Daemon `%s' started.\n", 177 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Daemon `%s' started.\n",
diff --git a/src/testing/testing.c b/src/testing/testing.c
index 3b065c357..466692ce7 100644
--- a/src/testing/testing.c
+++ b/src/testing/testing.c
@@ -384,7 +384,7 @@ start_fsm (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
384 GNUNET_OS_process_close (d->proc); 384 GNUNET_OS_process_close (d->proc);
385 d->proc = NULL; 385 d->proc = NULL;
386 if (NULL != cb) 386 if (NULL != cb)
387 cb (d->cb_cls, NULL, d->cfg, d, _("`Failed to get hostkey!\n")); 387 cb (d->cb_cls, NULL, d->cfg, d, _("Failed to get hostkey!\n"));
388 return; 388 return;
389 } 389 }
390 d->shortname = GNUNET_strdup (GNUNET_i2s (&d->id)); 390 d->shortname = GNUNET_strdup (GNUNET_i2s (&d->id));