GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
- by the Free Software Foundation; either version 2, or (at your
+ by the Free Software Foundation; either version 3, or (at your
option) any later version.
GNUnet is distributed in the hope that it will be useful, but
uint32_t uid;
};
+
+/**
+ * Check whether peers successfully shut down.
+ */
+void shutdown_callback (void *cls,
+ const char *emsg)
+{
+ if (emsg != NULL)
+ {
+#if VERBOSE
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Shutdown of peers failed!\n");
+#endif
+ if (ok == 0)
+ ok = 666;
+ }
+ else
+ {
+#if VERBOSE
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "All peers successfully shut down!\n");
+#endif
+ }
+}
+
static void
finish_testing ()
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Calling daemons_stop\n");
#endif
- GNUNET_TESTING_daemons_stop (pg, TIMEOUT);
+ GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL);
#if VERBOSE
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"daemons_stop finished\n");
if (pg != NULL)
{
- GNUNET_TESTING_daemons_stop (pg, TIMEOUT);
+ GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL);
ok = 7331; /* Opposite of leet */
}
else
topology_callback (void *cls,
const struct GNUNET_PeerIdentity *first,
const struct GNUNET_PeerIdentity *second,
+ uint32_t distance,
const struct GNUNET_CONFIGURATION_Handle *first_cfg,
const struct GNUNET_CONFIGURATION_Handle *second_cfg,
struct GNUNET_TESTING_Daemon *first_daemon,
if (GNUNET_YES != GNUNET_CONFIGURATION_get_value_string(cfg, "paths", "servicehome", &test_directory))
{
ok = 404;
+ if (dotOutFile != NULL)
+ {
+ fclose(dotOutFile);
+ }
return;
}
"connect_topology_option_modifier",
"TESTING");
GNUNET_free (connect_topology_option_modifier_string);
+ ok = 707;
+ if (dotOutFile != NULL)
+ {
+ fclose(dotOutFile);
+ }
+ return;
}
+ GNUNET_free (connect_topology_option_modifier_string);
}
- GNUNET_CONFIGURATION_get_value_string (cfg, "testing", "blacklist_transports",
- &blacklist_transports);
+ if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_string (cfg, "testing", "blacklist_transports",
+ &blacklist_transports))
+ {
+ GNUNET_log(GNUNET_ERROR_TYPE_WARNING, "No transports specified for blacklisting in blacklist testcase (this shouldn't happen!)\n");
+ ok = 808;
+ if (dotOutFile != NULL)
+ {
+ fclose(dotOutFile);
+ }
+ return;
+ }
if (GNUNET_YES ==
GNUNET_CONFIGURATION_get_value_number (cfg, "testing", "blacklist_topology",