diff options
Diffstat (limited to 'src/util/test_disk.c')
-rw-r--r-- | src/util/test_disk.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/util/test_disk.c b/src/util/test_disk.c index 267d4d4f9..5746aa96e 100644 --- a/src/util/test_disk.c +++ b/src/util/test_disk.c | |||
@@ -45,13 +45,13 @@ testReadWrite () | |||
45 | ret = GNUNET_DISK_fn_read (".testfile", tmp, sizeof (tmp) - 1); | 45 | ret = GNUNET_DISK_fn_read (".testfile", tmp, sizeof (tmp) - 1); |
46 | if (ret < 0) | 46 | if (ret < 0) |
47 | { | 47 | { |
48 | FPRINTF (stderr, "Error reading file `%s' in testReadWrite\n", ".testfile"); | 48 | fprintf (stderr, "Error reading file `%s' in testReadWrite\n", ".testfile"); |
49 | return 1; | 49 | return 1; |
50 | } | 50 | } |
51 | tmp[ret] = '\0'; | 51 | tmp[ret] = '\0'; |
52 | if (0 != memcmp (tmp, TESTSTRING, strlen (TESTSTRING) + 1)) | 52 | if (0 != memcmp (tmp, TESTSTRING, strlen (TESTSTRING) + 1)) |
53 | { | 53 | { |
54 | FPRINTF (stderr, "Error in testReadWrite: *%s* != *%s* for file %s\n", tmp, | 54 | fprintf (stderr, "Error in testReadWrite: *%s* != *%s* for file %s\n", tmp, |
55 | TESTSTRING, ".testfile"); | 55 | TESTSTRING, ".testfile"); |
56 | return 1; | 56 | return 1; |
57 | } | 57 | } |
@@ -60,20 +60,20 @@ testReadWrite () | |||
60 | ret = GNUNET_DISK_fn_read (".testfile2", tmp, sizeof (tmp) - 1); | 60 | ret = GNUNET_DISK_fn_read (".testfile2", tmp, sizeof (tmp) - 1); |
61 | if (ret < 0) | 61 | if (ret < 0) |
62 | { | 62 | { |
63 | FPRINTF (stderr, "Error reading file `%s' in testReadWrite\n", | 63 | fprintf (stderr, "Error reading file `%s' in testReadWrite\n", |
64 | ".testfile2"); | 64 | ".testfile2"); |
65 | return 1; | 65 | return 1; |
66 | } | 66 | } |
67 | tmp[ret] = '\0'; | 67 | tmp[ret] = '\0'; |
68 | if (0 != memcmp (tmp, TESTSTRING, strlen (TESTSTRING) + 1)) | 68 | if (0 != memcmp (tmp, TESTSTRING, strlen (TESTSTRING) + 1)) |
69 | { | 69 | { |
70 | FPRINTF (stderr, "Error in testReadWrite: *%s* != *%s* for file %s\n", tmp, | 70 | fprintf (stderr, "Error in testReadWrite: *%s* != *%s* for file %s\n", tmp, |
71 | TESTSTRING, ".testfile2"); | 71 | TESTSTRING, ".testfile2"); |
72 | return 1; | 72 | return 1; |
73 | } | 73 | } |
74 | 74 | ||
75 | GNUNET_break (0 == UNLINK (".testfile")); | 75 | GNUNET_break (0 == unlink (".testfile")); |
76 | GNUNET_break (0 == UNLINK (".testfile2")); | 76 | GNUNET_break (0 == unlink (".testfile2")); |
77 | if (GNUNET_NO != GNUNET_DISK_file_test (".testfile")) | 77 | if (GNUNET_NO != GNUNET_DISK_file_test (".testfile")) |
78 | return 1; | 78 | return 1; |
79 | 79 | ||
@@ -99,7 +99,7 @@ testOpenClose () | |||
99 | GNUNET_DISK_file_size (".testfile", &size, GNUNET_NO, GNUNET_YES)); | 99 | GNUNET_DISK_file_size (".testfile", &size, GNUNET_NO, GNUNET_YES)); |
100 | if (size != 5) | 100 | if (size != 5) |
101 | return 1; | 101 | return 1; |
102 | GNUNET_break (0 == UNLINK (".testfile")); | 102 | GNUNET_break (0 == unlink (".testfile")); |
103 | 103 | ||
104 | return 0; | 104 | return 0; |
105 | } | 105 | } |
@@ -281,7 +281,7 @@ main (int argc, char *argv[]) | |||
281 | failureCount += testDirMani (); | 281 | failureCount += testDirMani (); |
282 | if (0 != failureCount) | 282 | if (0 != failureCount) |
283 | { | 283 | { |
284 | FPRINTF (stderr, | 284 | fprintf (stderr, |
285 | "\n%u TESTS FAILED!\n", | 285 | "\n%u TESTS FAILED!\n", |
286 | failureCount); | 286 | failureCount); |
287 | return -1; | 287 | return -1; |