/*
This file is part of GNUnet.
- Copyright (C) 2011 Christian Grothoff (and other contributing authors)
+ Copyright (C) 2011 GNUnet e.V.
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
static void
-test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
+test (void *cls);
+/**
+ * Put continuation.
+ *
+ * @param cls closure
+ * @param key key for the item stored
+ * @param size size of the item stored
+ * @param status #GNUNET_OK or #GNUNET_SYSERROR
+ * @param msg error message on error
+ */
static void
-put_continuation (void *cls, const struct GNUNET_HashCode *key,
- uint32_t size, int status, char *msg)
+put_continuation (void *cls,
+ const struct GNUNET_HashCode *key,
+ uint32_t size,
+ int status,
+ const char *msg)
{
struct CpsRunContext *crc = cls;
static unsigned long long os;
* the transport and core.
*/
static void
-cleaning_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
+cleaning_task (void *cls)
{
struct CpsRunContext *crc = cls;
static void
-update_continuation (void *cls, int status, char *msg)
+update_continuation (void *cls,
+ int status,
+ const char *msg)
{
struct CpsRunContext *crc = cls;
static void
-test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
+test (void *cls)
{
struct CpsRunContext *crc = cls;
struct GNUNET_HashCode key;
- if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
- {
- GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Test aborted.\n");
- crc->phase = RP_ERROR;
- }
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"In phase %d, iteration %u\n", crc->phase, crc->cnt);
switch (crc->phase)
GNUNET_BLOCK_TYPE_ANY, &iterate_one_shot, crc);
break;
case RP_UPDATE:
- crc->api->update (crc->api->cls, guid, 1, GNUNET_TIME_UNIT_ZERO_ABS,
- update_continuation, crc);
+ crc->api->update (crc->api->cls,
+ guid,
+ 1,
+ GNUNET_TIME_UNIT_ZERO_ABS,
+ &update_continuation,
+ crc);
break;
case RP_ITER_ZERO:
char *libname;
if (GNUNET_OK !=
- GNUNET_CONFIGURATION_get_value_string (cfg, "DATASTORE", "DATABASE",
+ GNUNET_CONFIGURATION_get_value_string (cfg,
+ "DATASTORE",
+ "DATABASE",
&name))
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- _("No `%s' specified for `%s' in configuration!\n"), "DATABASE",
+ _("No `%s' specified for `%s' in configuration!\n"),
+ "DATABASE",
"DATASTORE");
return NULL;
}
FPRINTF (stderr, "Failed to load plugin `%s'!\n", name);
GNUNET_free (libname);
GNUNET_free (name);
+ ok = 77; /* mark test as skipped */
return NULL;
}
GNUNET_free (libname);
"test_plugin_datastore_data_%s.conf", plugin_name);
GNUNET_PROGRAM_run ((sizeof (xargv) / sizeof (char *)) - 1, xargv,
"test-plugin-datastore", "nohelp", options, &run, NULL);
- if (0 != ok)
+ if ( (0 != ok) && (77 != ok) )
FPRINTF (stderr, "Missed some testcases: %u\n", ok);
GNUNET_DISK_directory_remove (dir_name);
return ok;