aboutsummaryrefslogtreecommitdiff
path: root/src/statistics/test_statistics_api_loop.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/statistics/test_statistics_api_loop.c')
-rw-r--r--src/statistics/test_statistics_api_loop.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/src/statistics/test_statistics_api_loop.c b/src/statistics/test_statistics_api_loop.c
index 87190a99a..eb739b752 100644
--- a/src/statistics/test_statistics_api_loop.c
+++ b/src/statistics/test_statistics_api_loop.c
@@ -36,9 +36,8 @@
36#define ROUNDS (1024 * 1024) 36#define ROUNDS (1024 * 1024)
37 37
38static int 38static int
39check_1 (void *cls, 39check_1 (void *cls, const char *subsystem, const char *name, uint64_t value,
40 const char *subsystem, 40 int is_persistent)
41 const char *name, uint64_t value, int is_persistent)
42{ 41{
43 GNUNET_assert (0 == strcmp (name, "test-0")); 42 GNUNET_assert (0 == strcmp (name, "test-0"));
44 GNUNET_assert (0 == strcmp (subsystem, "test-statistics-api-loop")); 43 GNUNET_assert (0 == strcmp (subsystem, "test-statistics-api-loop"));
@@ -59,9 +58,8 @@ next (void *cls, int success)
59} 58}
60 59
61static void 60static void
62run (void *cls, 61run (void *cls, char *const *args, const char *cfgfile,
63 char *const *args, 62 const struct GNUNET_CONFIGURATION_Handle *cfg)
64 const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *cfg)
65{ 63{
66 int i; 64 int i;
67 char name[128]; 65 char name[128];
@@ -98,16 +96,17 @@ check ()
98#if START_SERVICE 96#if START_SERVICE
99 struct GNUNET_OS_Process *proc; 97 struct GNUNET_OS_Process *proc;
100 98
101 proc = GNUNET_OS_start_process (NULL, NULL, "gnunet-service-statistics", 99 proc =
102 "gnunet-service-statistics", 100 GNUNET_OS_start_process (NULL, NULL, "gnunet-service-statistics",
101 "gnunet-service-statistics",
103#if DEBUG_STATISTICS 102#if DEBUG_STATISTICS
104 "-L", "DEBUG", 103 "-L", "DEBUG",
105#endif 104#endif
106 "-c", "test_statistics_api_data.conf", NULL); 105 "-c", "test_statistics_api_data.conf", NULL);
107#endif 106#endif
108 GNUNET_assert (NULL != proc); 107 GNUNET_assert (NULL != proc);
109 GNUNET_PROGRAM_run (3, argv, "test-statistics-api", "nohelp", 108 GNUNET_PROGRAM_run (3, argv, "test-statistics-api", "nohelp", options, &run,
110 options, &run, &ok); 109 &ok);
111#if START_SERVICE 110#if START_SERVICE
112 if (0 != GNUNET_OS_process_kill (proc, SIGTERM)) 111 if (0 != GNUNET_OS_process_kill (proc, SIGTERM))
113 { 112 {