doxygen fix
[oweals/gnunet.git] / src / datastore / test_datastore_api.c
index b1dd0e5defc0047d229d4e0727809d7641ebd525..25836ca663065cb6169fc0eb7b1feab0e37ffbe9 100644 (file)
@@ -31,7 +31,7 @@
 #include "gnunet_protocols.h"
 #include "gnunet_datastore_service.h"
 
-#define VERBOSE GNUNET_EXTRA_LOGGING
+#define VERBOSE GNUNET_NO
 
 #define START_DATASTORE GNUNET_YES
 
@@ -139,7 +139,7 @@ run_continuation (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 
 static void
-check_success (void *cls, int success, const char *msg)
+check_success (void *cls, int success, struct GNUNET_TIME_Absolute min_expiration, const char *msg)
 {
   struct CpsRunContext *crc = cls;
 
@@ -158,7 +158,7 @@ check_success (void *cls, int success, const char *msg)
 
 
 static void
-get_reserved (void *cls, int success, const char *msg)
+get_reserved (void *cls, int success, struct GNUNET_TIME_Absolute min_expiration, const char *msg)
 {
   struct CpsRunContext *crc = cls;
 
@@ -185,18 +185,18 @@ check_value (void *cls, const GNUNET_HashCode * key, size_t size,
   if (NULL == key)
   {
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                "Value check failed (got NULL key) in %d/%d\n",
-               crc->phase, crc->i);
+                "Value check failed (got NULL key) in %d/%d\n", crc->phase,
+                crc->i);
     crc->phase = RP_ERROR;
     GNUNET_SCHEDULER_add_continuation (&run_continuation, crc,
-                                      GNUNET_SCHEDULER_REASON_PREREQ_DONE);
+                                       GNUNET_SCHEDULER_REASON_PREREQ_DONE);
     return;
   }
 #if 0
-  fprintf (stderr, "Check value got `%s' of size %u, type %d, expire %llu\n",
+  FPRINTF (stderr, "Check value got `%s' of size %u, type %d, expire %llu\n",
            GNUNET_h2s (key), (unsigned int) size, type,
            (unsigned long long) expiration.abs_value);
-  fprintf (stderr,
+  FPRINTF (stderr,
            "Check value iteration %d wants size %u, type %d, expire %llu\n", i,
            (unsigned int) get_size (i), get_type (i),
            (unsigned long long) get_expiration (i).abs_value);
@@ -450,7 +450,7 @@ run_continuation (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 
 
 static void
-run_tests (void *cls, int32_t success, const char *msg)
+run_tests (void *cls, int32_t success, struct GNUNET_TIME_Absolute min_expiration, const char *msg)
 {
   struct CpsRunContext *crc = cls;
 
@@ -461,11 +461,11 @@ run_tests (void *cls, int32_t success, const char *msg)
                                        GNUNET_SCHEDULER_REASON_PREREQ_DONE);
     return;
   case GNUNET_NO:
-    fprintf (stderr, "Test 'put' operation failed, key already exists (!?)\n");
+    FPRINTF (stderr, "%s", "Test 'put' operation failed, key already exists (!?)\n");
     GNUNET_free (crc);
     return;
   case GNUNET_SYSERR:
-    fprintf (stderr,
+    FPRINTF (stderr,
              "Test 'put' operation failed with error `%s' database likely not setup, skipping test.\n",
              msg);
     GNUNET_free (crc);
@@ -495,7 +495,7 @@ run (void *cls, char *const *args, const char *cfgfile,
                             (GNUNET_TIME_UNIT_SECONDS), 0, 1,
                             GNUNET_TIME_UNIT_MINUTES, &run_tests, crc))
   {
-    fprintf (stderr, "Test 'put' operation failed.\n");
+    FPRINTF (stderr, "%s",  "Test 'put' operation failed.\n");
     ok = 1;
     GNUNET_free (crc);
   }
@@ -526,7 +526,7 @@ check ()
                    "test_datastore_api_data_%s.conf", plugin_name);
 #if START_DATASTORE
   proc =
-      GNUNET_OS_start_process (NULL, NULL, "gnunet-service-arm",
+    GNUNET_OS_start_process (GNUNET_YES, NULL, NULL, "gnunet-service-arm",
                                "gnunet-service-arm",
 #if VERBOSE
                                "-L", "DEBUG",
@@ -548,7 +548,7 @@ check ()
   proc = NULL;
 #endif
   if (ok != 0)
-    fprintf (stderr, "Missed some testcases: %u\n", ok);
+    FPRINTF (stderr, "Missed some testcases: %u\n", ok);
   return ok;
 }