diff options
Diffstat (limited to 'src/datacache/test_datacache_quota.c')
-rw-r--r-- | src/datacache/test_datacache_quota.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/datacache/test_datacache_quota.c b/src/datacache/test_datacache_quota.c index d3681da8e..468972c9e 100644 --- a/src/datacache/test_datacache_quota.c +++ b/src/datacache/test_datacache_quota.c | |||
@@ -60,8 +60,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
60 | 60 | ||
61 | if (h == NULL) | 61 | if (h == NULL) |
62 | { | 62 | { |
63 | fprintf (stderr, | 63 | FPRINTF (stderr, "%s", "Failed to initialize datacache. Database likely not setup, skipping test.\n"); |
64 | "Failed to initialize datacache. Database likely not setup, skipping test.\n"); | ||
65 | return; | 64 | return; |
66 | } | 65 | } |
67 | exp = GNUNET_TIME_relative_to_absolute (GNUNET_TIME_UNIT_HOURS); | 66 | exp = GNUNET_TIME_relative_to_absolute (GNUNET_TIME_UNIT_HOURS); |
@@ -69,7 +68,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
69 | memset (&k, 0, sizeof (GNUNET_HashCode)); | 68 | memset (&k, 0, sizeof (GNUNET_HashCode)); |
70 | for (i = 0; i < 10; i++) | 69 | for (i = 0; i < 10; i++) |
71 | { | 70 | { |
72 | fprintf (stderr, "."); | 71 | FPRINTF (stderr, "%s", "."); |
73 | GNUNET_CRYPTO_hash (&k, sizeof (GNUNET_HashCode), &n); | 72 | GNUNET_CRYPTO_hash (&k, sizeof (GNUNET_HashCode), &n); |
74 | for (j = i; j < sizeof (buf); j += 10) | 73 | for (j = i; j < sizeof (buf); j += 10) |
75 | { | 74 | { |
@@ -80,11 +79,11 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
80 | } | 79 | } |
81 | k = n; | 80 | k = n; |
82 | } | 81 | } |
83 | fprintf (stderr, "\n"); | 82 | FPRINTF (stderr, "%s", "\n"); |
84 | memset (&k, 0, sizeof (GNUNET_HashCode)); | 83 | memset (&k, 0, sizeof (GNUNET_HashCode)); |
85 | for (i = 0; i < 10; i++) | 84 | for (i = 0; i < 10; i++) |
86 | { | 85 | { |
87 | fprintf (stderr, "."); | 86 | FPRINTF (stderr, "%s", "."); |
88 | GNUNET_CRYPTO_hash (&k, sizeof (GNUNET_HashCode), &n); | 87 | GNUNET_CRYPTO_hash (&k, sizeof (GNUNET_HashCode), &n); |
89 | if (i < 2) | 88 | if (i < 2) |
90 | ASSERT (0 == GNUNET_DATACACHE_get (h, &k, 1 + i, NULL, NULL)); | 89 | ASSERT (0 == GNUNET_DATACACHE_get (h, &k, 1 + i, NULL, NULL)); |
@@ -92,7 +91,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
92 | ASSERT (0 < GNUNET_DATACACHE_get (h, &k, 1 + i, NULL, NULL)); | 91 | ASSERT (0 < GNUNET_DATACACHE_get (h, &k, 1 + i, NULL, NULL)); |
93 | k = n; | 92 | k = n; |
94 | } | 93 | } |
95 | fprintf (stderr, "\n"); | 94 | FPRINTF (stderr, "%s", "\n"); |
96 | GNUNET_DATACACHE_destroy (h); | 95 | GNUNET_DATACACHE_destroy (h); |
97 | return; | 96 | return; |
98 | FAILURE: | 97 | FAILURE: |
@@ -145,7 +144,7 @@ main (int argc, char *argv[]) | |||
145 | GNUNET_PROGRAM_run ((sizeof (xargv) / sizeof (char *)) - 1, xargv, | 144 | GNUNET_PROGRAM_run ((sizeof (xargv) / sizeof (char *)) - 1, xargv, |
146 | "test-datacache-quota", "nohelp", options, &run, NULL); | 145 | "test-datacache-quota", "nohelp", options, &run, NULL); |
147 | if (ok != 0) | 146 | if (ok != 0) |
148 | fprintf (stderr, "Missed some testcases: %d\n", ok); | 147 | FPRINTF (stderr, "Missed some testcases: %d\n", ok); |
149 | return ok; | 148 | return ok; |
150 | } | 149 | } |
151 | 150 | ||