diff options
author | Martin Schanzenbach <schanzen@gnunet.org> | 2022-12-05 17:46:59 +0900 |
---|---|---|
committer | Martin Schanzenbach <schanzen@gnunet.org> | 2022-12-05 17:46:59 +0900 |
commit | 5abbc294229cca582d0b104b86be534de2be66ea (patch) | |
tree | 87f960b8a17efc1c20e0c238f2be183a5356f95f /src/util | |
parent | 1d670b15e2367b1e8668f4f4d81d73f540580e2f (diff) | |
download | gnunet-5abbc294229cca582d0b104b86be534de2be66ea.tar.gz gnunet-5abbc294229cca582d0b104b86be534de2be66ea.zip |
-fix test ftbfs
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/test_bio.c | 31 | ||||
-rw-r--r-- | src/util/test_crypto_hkdf.c | 2 | ||||
-rw-r--r-- | src/util/test_crypto_kdf.c | 2 | ||||
-rw-r--r-- | src/util/test_hexcoder.c | 1 |
4 files changed, 2 insertions, 34 deletions
diff --git a/src/util/test_bio.c b/src/util/test_bio.c index f655f8924..0b76bbb43 100644 --- a/src/util/test_bio.c +++ b/src/util/test_bio.c | |||
@@ -46,19 +46,14 @@ test_normal_rw (void) | |||
46 | int64_t wNum = TESTNUMBER64; | 46 | int64_t wNum = TESTNUMBER64; |
47 | int64_t rNum = 0; | 47 | int64_t rNum = 0; |
48 | 48 | ||
49 | mdW = GNUNET_CONTAINER_meta_data_create (); | ||
50 | GNUNET_CONTAINER_meta_data_add_publication_date (mdW); | ||
51 | |||
52 | struct GNUNET_BIO_WriteSpec ws[] = { | 49 | struct GNUNET_BIO_WriteSpec ws[] = { |
53 | GNUNET_BIO_write_spec_string ("test-normal-rw-string", TESTSTRING), | 50 | GNUNET_BIO_write_spec_string ("test-normal-rw-string", TESTSTRING), |
54 | GNUNET_BIO_write_spec_meta_data ("test-normal-rw-metadata", mdW), | ||
55 | GNUNET_BIO_write_spec_int64 ("test-normal-rw-int64", &wNum), | 51 | GNUNET_BIO_write_spec_int64 ("test-normal-rw-int64", &wNum), |
56 | GNUNET_BIO_write_spec_end (), | 52 | GNUNET_BIO_write_spec_end (), |
57 | }; | 53 | }; |
58 | 54 | ||
59 | struct GNUNET_BIO_ReadSpec rs[] = { | 55 | struct GNUNET_BIO_ReadSpec rs[] = { |
60 | GNUNET_BIO_read_spec_string ("test-normal-rw-string", &rString, 200), | 56 | GNUNET_BIO_read_spec_string ("test-normal-rw-string", &rString, 200), |
61 | GNUNET_BIO_read_spec_meta_data ("test-normal-rw-metadata", &mdR), | ||
62 | GNUNET_BIO_read_spec_int64 ("test-normal-rw-int64", &rNum), | 57 | GNUNET_BIO_read_spec_int64 ("test-normal-rw-int64", &rNum), |
63 | GNUNET_BIO_read_spec_end (), | 58 | GNUNET_BIO_read_spec_end (), |
64 | }; | 59 | }; |
@@ -74,11 +69,8 @@ test_normal_rw (void) | |||
74 | GNUNET_assert (GNUNET_OK == GNUNET_BIO_read_spec_commit (rh, rs)); | 69 | GNUNET_assert (GNUNET_OK == GNUNET_BIO_read_spec_commit (rh, rs)); |
75 | GNUNET_assert (GNUNET_OK == GNUNET_BIO_read_close (rh, NULL)); | 70 | GNUNET_assert (GNUNET_OK == GNUNET_BIO_read_close (rh, NULL)); |
76 | GNUNET_assert (0 == strcmp (TESTSTRING, rString)); | 71 | GNUNET_assert (0 == strcmp (TESTSTRING, rString)); |
77 | GNUNET_assert (GNUNET_YES == GNUNET_CONTAINER_meta_data_test_equal (mdR, | ||
78 | mdW)); | ||
79 | GNUNET_assert (wNum == rNum); | 72 | GNUNET_assert (wNum == rNum); |
80 | 73 | ||
81 | GNUNET_CONTAINER_meta_data_destroy (mdR); | ||
82 | GNUNET_assert (GNUNET_OK == GNUNET_DISK_directory_remove (filename)); | 74 | GNUNET_assert (GNUNET_OK == GNUNET_DISK_directory_remove (filename)); |
83 | GNUNET_free (filename); | 75 | GNUNET_free (filename); |
84 | 76 | ||
@@ -98,14 +90,10 @@ test_normal_rw (void) | |||
98 | GNUNET_assert (GNUNET_OK == GNUNET_BIO_read_spec_commit (rh, rs)); | 90 | GNUNET_assert (GNUNET_OK == GNUNET_BIO_read_spec_commit (rh, rs)); |
99 | GNUNET_assert (GNUNET_OK == GNUNET_BIO_read_close (rh, NULL)); | 91 | GNUNET_assert (GNUNET_OK == GNUNET_BIO_read_close (rh, NULL)); |
100 | GNUNET_assert (0 == strcmp (TESTSTRING, rString)); | 92 | GNUNET_assert (0 == strcmp (TESTSTRING, rString)); |
101 | GNUNET_assert (GNUNET_YES == GNUNET_CONTAINER_meta_data_test_equal (mdR, | ||
102 | mdW)); | ||
103 | GNUNET_assert (wNum == rNum); | 93 | GNUNET_assert (wNum == rNum); |
104 | 94 | ||
105 | GNUNET_free (buffer); | 95 | GNUNET_free (buffer); |
106 | 96 | ||
107 | GNUNET_CONTAINER_meta_data_destroy (mdW); | ||
108 | GNUNET_CONTAINER_meta_data_destroy (mdR); | ||
109 | return 0; | 97 | return 0; |
110 | } | 98 | } |
111 | 99 | ||
@@ -225,10 +213,6 @@ test_bigmeta_rw (void) | |||
225 | 213 | ||
226 | rh = GNUNET_BIO_read_open_file (filename); | 214 | rh = GNUNET_BIO_read_open_file (filename); |
227 | GNUNET_assert (NULL != rh); | 215 | GNUNET_assert (NULL != rh); |
228 | GNUNET_assert (GNUNET_SYSERR == | ||
229 | GNUNET_BIO_read_meta_data (rh, | ||
230 | "test-bigmeta-rw-metadata", | ||
231 | &mdR)); | ||
232 | GNUNET_assert (GNUNET_SYSERR == GNUNET_BIO_read_close (rh, NULL)); | 216 | GNUNET_assert (GNUNET_SYSERR == GNUNET_BIO_read_close (rh, NULL)); |
233 | 217 | ||
234 | GNUNET_assert (NULL == mdR); | 218 | GNUNET_assert (NULL == mdR); |
@@ -294,17 +278,12 @@ test_fullfile_rw (void) | |||
294 | struct GNUNET_CONTAINER_MetaData *mdW; | 278 | struct GNUNET_CONTAINER_MetaData *mdW; |
295 | struct GNUNET_CONTAINER_MetaData *mdR = NULL; | 279 | struct GNUNET_CONTAINER_MetaData *mdR = NULL; |
296 | 280 | ||
297 | mdW = GNUNET_CONTAINER_meta_data_create (); | ||
298 | GNUNET_CONTAINER_meta_data_add_publication_date (mdW); | ||
299 | |||
300 | struct GNUNET_BIO_WriteSpec ws[] = { | 281 | struct GNUNET_BIO_WriteSpec ws[] = { |
301 | GNUNET_BIO_write_spec_object ("test-fullfile-rw-bytes", | 282 | GNUNET_BIO_write_spec_object ("test-fullfile-rw-bytes", |
302 | TESTSTRING, | 283 | TESTSTRING, |
303 | strlen (TESTSTRING)), | 284 | strlen (TESTSTRING)), |
304 | GNUNET_BIO_write_spec_string ("test-fullfile-rw-string", | 285 | GNUNET_BIO_write_spec_string ("test-fullfile-rw-string", |
305 | TESTSTRING), | 286 | TESTSTRING), |
306 | GNUNET_BIO_write_spec_meta_data ("test-fullfile-rw-metadata", | ||
307 | mdW), | ||
308 | GNUNET_BIO_write_spec_end (), | 287 | GNUNET_BIO_write_spec_end (), |
309 | }; | 288 | }; |
310 | 289 | ||
@@ -315,8 +294,6 @@ test_fullfile_rw (void) | |||
315 | GNUNET_BIO_read_spec_string ("test-fullfile-rw-string", | 294 | GNUNET_BIO_read_spec_string ("test-fullfile-rw-string", |
316 | &rString, | 295 | &rString, |
317 | 200), | 296 | 200), |
318 | GNUNET_BIO_read_spec_meta_data ("test-fullfile-rw-metadata", | ||
319 | &mdR), | ||
320 | GNUNET_BIO_read_spec_end (), | 297 | GNUNET_BIO_read_spec_end (), |
321 | }; | 298 | }; |
322 | 299 | ||
@@ -385,10 +362,6 @@ test_fakemeta_rw (void) | |||
385 | 362 | ||
386 | rh = GNUNET_BIO_read_open_file (filename); | 363 | rh = GNUNET_BIO_read_open_file (filename); |
387 | GNUNET_assert (NULL != rh); | 364 | GNUNET_assert (NULL != rh); |
388 | GNUNET_assert (GNUNET_SYSERR == | ||
389 | GNUNET_BIO_read_meta_data (rh, | ||
390 | "test-fakestring-rw-metadata", | ||
391 | &mdR)); | ||
392 | GNUNET_assert (GNUNET_SYSERR == GNUNET_BIO_read_close (rh, NULL)); | 365 | GNUNET_assert (GNUNET_SYSERR == GNUNET_BIO_read_close (rh, NULL)); |
393 | 366 | ||
394 | GNUNET_assert (NULL == mdR); | 367 | GNUNET_assert (NULL == mdR); |
@@ -417,10 +390,6 @@ test_fakebigmeta_rw (void) | |||
417 | 390 | ||
418 | rh = GNUNET_BIO_read_open_file (filename); | 391 | rh = GNUNET_BIO_read_open_file (filename); |
419 | GNUNET_assert (NULL != rh); | 392 | GNUNET_assert (NULL != rh); |
420 | GNUNET_assert (GNUNET_SYSERR == | ||
421 | GNUNET_BIO_read_meta_data (rh, | ||
422 | "test-fakebigmeta-rw-metadata", | ||
423 | &mdR)); | ||
424 | GNUNET_assert (GNUNET_SYSERR == GNUNET_BIO_read_close (rh, NULL)); | 393 | GNUNET_assert (GNUNET_SYSERR == GNUNET_BIO_read_close (rh, NULL)); |
425 | 394 | ||
426 | GNUNET_assert (NULL == mdR); | 395 | GNUNET_assert (NULL == mdR); |
diff --git a/src/util/test_crypto_hkdf.c b/src/util/test_crypto_hkdf.c index b9742468d..a9a4db7a0 100644 --- a/src/util/test_crypto_hkdf.c +++ b/src/util/test_crypto_hkdf.c | |||
@@ -31,7 +31,7 @@ | |||
31 | #include <gcrypt.h> | 31 | #include <gcrypt.h> |
32 | 32 | ||
33 | 33 | ||
34 | #include "gnunet_crypto_lib.h" | 34 | #include "gnunet_util_lib.h" |
35 | 35 | ||
36 | void | 36 | void |
37 | tc1 () | 37 | tc1 () |
diff --git a/src/util/test_crypto_kdf.c b/src/util/test_crypto_kdf.c index 583b1bf30..81e4b4451 100644 --- a/src/util/test_crypto_kdf.c +++ b/src/util/test_crypto_kdf.c | |||
@@ -30,7 +30,7 @@ | |||
30 | #include <gcrypt.h> | 30 | #include <gcrypt.h> |
31 | 31 | ||
32 | 32 | ||
33 | #include "gnunet_crypto_lib.h" | 33 | #include "gnunet_util_lib.h" |
34 | 34 | ||
35 | 35 | ||
36 | int | 36 | int |
diff --git a/src/util/test_hexcoder.c b/src/util/test_hexcoder.c index 7861d3aa0..e04631188 100644 --- a/src/util/test_hexcoder.c +++ b/src/util/test_hexcoder.c | |||
@@ -27,7 +27,6 @@ | |||
27 | 27 | ||
28 | #include "platform.h" | 28 | #include "platform.h" |
29 | #include "gnunet_util_lib.h" | 29 | #include "gnunet_util_lib.h" |
30 | #include "gnunet_dnsparser_lib.h" | ||
31 | 30 | ||
32 | #define TESTSTRING "Hello World!" | 31 | #define TESTSTRING "Hello World!" |
33 | 32 | ||