diff options
Diffstat (limited to 'src/datacache/test_datacache_quota.c')
-rw-r--r-- | src/datacache/test_datacache_quota.c | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/src/datacache/test_datacache_quota.c b/src/datacache/test_datacache_quota.c index 3d02a7244..21e373608 100644 --- a/src/datacache/test_datacache_quota.c +++ b/src/datacache/test_datacache_quota.c | |||
@@ -41,7 +41,9 @@ static const char *plugin_name; | |||
41 | * some of the data from the last iteration is still there. | 41 | * some of the data from the last iteration is still there. |
42 | */ | 42 | */ |
43 | static void | 43 | static void |
44 | run (void *cls, char *const *args, const char *cfgfile, | 44 | run (void *cls, |
45 | char *const *args, | ||
46 | const char *cfgfile, | ||
45 | const struct GNUNET_CONFIGURATION_Handle *cfg) | 47 | const struct GNUNET_CONFIGURATION_Handle *cfg) |
46 | { | 48 | { |
47 | struct GNUNET_DATACACHE_Handle *h; | 49 | struct GNUNET_DATACACHE_Handle *h; |
@@ -50,8 +52,12 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
50 | char buf[3200]; | 52 | char buf[3200]; |
51 | struct GNUNET_TIME_Absolute exp; | 53 | struct GNUNET_TIME_Absolute exp; |
52 | 54 | ||
55 | (void) cls; | ||
56 | (void) args; | ||
57 | (void) cfgfile; | ||
53 | ok = 0; | 58 | ok = 0; |
54 | h = GNUNET_DATACACHE_create (cfg, "testcache"); | 59 | h = GNUNET_DATACACHE_create (cfg, |
60 | "testcache"); | ||
55 | 61 | ||
56 | if (h == NULL) | 62 | if (h == NULL) |
57 | { | 63 | { |
@@ -112,7 +118,8 @@ FAILURE: | |||
112 | 118 | ||
113 | 119 | ||
114 | int | 120 | int |
115 | main (int argc, char *argv[]) | 121 | main (int argc, |
122 | char *argv[]) | ||
116 | { | 123 | { |
117 | char cfg_name[128]; | 124 | char cfg_name[128]; |
118 | char *const xargv[] = { | 125 | char *const xargv[] = { |
@@ -125,17 +132,27 @@ main (int argc, char *argv[]) | |||
125 | GNUNET_GETOPT_OPTION_END | 132 | GNUNET_GETOPT_OPTION_END |
126 | }; | 133 | }; |
127 | 134 | ||
135 | (void) argc; | ||
128 | GNUNET_log_setup ("test-datacache-quota", | 136 | GNUNET_log_setup ("test-datacache-quota", |
129 | "WARNING", | 137 | "WARNING", |
130 | NULL); | 138 | NULL); |
131 | 139 | ||
132 | plugin_name = GNUNET_TESTING_get_testname_from_underscore (argv[0]); | 140 | plugin_name = GNUNET_TESTING_get_testname_from_underscore (argv[0]); |
133 | GNUNET_snprintf (cfg_name, sizeof (cfg_name), "test_datacache_data_%s.conf", | 141 | GNUNET_snprintf (cfg_name, |
142 | sizeof (cfg_name), | ||
143 | "test_datacache_data_%s.conf", | ||
134 | plugin_name); | 144 | plugin_name); |
135 | GNUNET_PROGRAM_run ((sizeof (xargv) / sizeof (char *)) - 1, xargv, | 145 | GNUNET_PROGRAM_run ((sizeof (xargv) / sizeof (char *)) - 1, |
136 | "test-datacache-quota", "nohelp", options, &run, NULL); | 146 | xargv, |
147 | "test-datacache-quota", | ||
148 | "nohelp", | ||
149 | options, | ||
150 | &run, | ||
151 | NULL); | ||
137 | if (0 != ok) | 152 | if (0 != ok) |
138 | FPRINTF (stderr, "Missed some testcases: %d\n", ok); | 153 | FPRINTF (stderr, |
154 | "Missed some testcases: %d\n", | ||
155 | ok); | ||
139 | return ok; | 156 | return ok; |
140 | } | 157 | } |
141 | 158 | ||