aboutsummaryrefslogtreecommitdiff
path: root/src/util/test_os_load.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2009-11-01 20:47:52 +0000
committerChristian Grothoff <christian@grothoff.org>2009-11-01 20:47:52 +0000
commit652e89b59ed2207c2c12172fdabcd6e659995c81 (patch)
treef054c819d483c1056e18c1099afd4c7fcd2582a0 /src/util/test_os_load.c
parent5e4113e83368849500792e57946c3d8dd9e548d8 (diff)
downloadgnunet-652e89b59ed2207c2c12172fdabcd6e659995c81.tar.gz
gnunet-652e89b59ed2207c2c12172fdabcd6e659995c81.zip
fixing bio testcase and a bug in bio.c, also indenting
Diffstat (limited to 'src/util/test_os_load.c')
-rw-r--r--src/util/test_os_load.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/util/test_os_load.c b/src/util/test_os_load.c
index 7cc35e56d..e45c4ac36 100644
--- a/src/util/test_os_load.c
+++ b/src/util/test_os_load.c
@@ -131,14 +131,18 @@ testdisk ()
131 } 131 }
132 memset (buf, 42, sizeof (buf)); 132 memset (buf, 42, sizeof (buf));
133 fh = GNUNET_DISK_file_open (".loadfile", GNUNET_DISK_OPEN_WRITE 133 fh = GNUNET_DISK_file_open (".loadfile", GNUNET_DISK_OPEN_WRITE
134 | GNUNET_DISK_OPEN_CREATE, GNUNET_DISK_PERM_USER_READ 134 | GNUNET_DISK_OPEN_CREATE,
135 | GNUNET_DISK_PERM_USER_WRITE); 135 GNUNET_DISK_PERM_USER_READ |
136 GNUNET_assert (GNUNET_NO == GNUNET_DISK_handle_invalid(fh)); 136 GNUNET_DISK_PERM_USER_WRITE);
137 GNUNET_assert (GNUNET_NO == GNUNET_DISK_handle_invalid (fh));
137 while (GNUNET_TIME_absolute_get_duration (start).value < 60 * 1000) 138 while (GNUNET_TIME_absolute_get_duration (start).value < 60 * 1000)
138 { 139 {
139 GNUNET_DISK_file_seek (fh, GNUNET_CRYPTO_random_u64 (GNUNET_CRYPTO_QUALITY_WEAK, 140 GNUNET_DISK_file_seek (fh,
140 1024 * 1024 * 1024), GNUNET_DISK_SEEK_SET); 141 GNUNET_CRYPTO_random_u64
141 GNUNET_assert (sizeof (buf) == GNUNET_DISK_file_write (fh, buf, sizeof (buf))); 142 (GNUNET_CRYPTO_QUALITY_WEAK, 1024 * 1024 * 1024),
143 GNUNET_DISK_SEEK_SET);
144 GNUNET_assert (sizeof (buf) ==
145 GNUNET_DISK_file_write (fh, buf, sizeof (buf)));
142 GNUNET_DISK_file_sync (fh); 146 GNUNET_DISK_file_sync (fh);
143 if (ret < GNUNET_OS_load_disk_get (cfg)) 147 if (ret < GNUNET_OS_load_disk_get (cfg))
144 break; 148 break;