diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-11-24 23:09:36 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-11-24 23:09:36 +0000 |
commit | ffbcecfb3a225e8f592780c4a6eba56e6ae8a8f3 (patch) | |
tree | 1a5f0bf706cd5b4b39346853b19b1a89c86f28a5 /src/fs/test_gnunet_service_fs_migration.c | |
parent | eb402314191286004d4b5450508080b3ef7b4e5b (diff) | |
download | gnunet-ffbcecfb3a225e8f592780c4a6eba56e6ae8a8f3.tar.gz gnunet-ffbcecfb3a225e8f592780c4a6eba56e6ae8a8f3.zip |
-add multi-peer testcase for stream-based transfers (expected to fail right now), and option to disable anonymous transfers --- to force stream-based transfers
Diffstat (limited to 'src/fs/test_gnunet_service_fs_migration.c')
-rw-r--r-- | src/fs/test_gnunet_service_fs_migration.c | 35 |
1 files changed, 5 insertions, 30 deletions
diff --git a/src/fs/test_gnunet_service_fs_migration.c b/src/fs/test_gnunet_service_fs_migration.c index 550c79c4b..5165934f0 100644 --- a/src/fs/test_gnunet_service_fs_migration.c +++ b/src/fs/test_gnunet_service_fs_migration.c | |||
@@ -142,30 +142,6 @@ do_wait (void *cls, const struct GNUNET_FS_Uri *uri) | |||
142 | 142 | ||
143 | static void | 143 | static void |
144 | do_publish (void *cls, | 144 | do_publish (void *cls, |
145 | struct GNUNET_TESTBED_Operation *oparg, | ||
146 | const char *emsg) | ||
147 | { | ||
148 | GNUNET_assert (op == oparg); | ||
149 | GNUNET_TESTBED_operation_done (op); | ||
150 | op = NULL; | ||
151 | if (NULL != emsg) | ||
152 | { | ||
153 | GNUNET_SCHEDULER_shutdown (); | ||
154 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | ||
155 | "Error connecting peers: %s\n", | ||
156 | emsg); | ||
157 | ok = 1; | ||
158 | return; | ||
159 | } | ||
160 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Publishing %llu bytes\n", | ||
161 | (unsigned long long) FILESIZE); | ||
162 | GNUNET_FS_TEST_publish (daemons[1], TIMEOUT, 1, GNUNET_NO, FILESIZE, SEED, | ||
163 | VERBOSE, &do_wait, NULL); | ||
164 | } | ||
165 | |||
166 | |||
167 | static void | ||
168 | do_connect (void *cls, | ||
169 | unsigned int num_peers, | 145 | unsigned int num_peers, |
170 | struct GNUNET_TESTBED_Peer **peers) | 146 | struct GNUNET_TESTBED_Peer **peers) |
171 | { | 147 | { |
@@ -174,11 +150,10 @@ do_connect (void *cls, | |||
174 | GNUNET_assert (2 == num_peers); | 150 | GNUNET_assert (2 == num_peers); |
175 | for (i=0;i<num_peers;i++) | 151 | for (i=0;i<num_peers;i++) |
176 | daemons[i] = peers[i]; | 152 | daemons[i] = peers[i]; |
177 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 153 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Publishing %llu bytes\n", |
178 | "Daemons started, will now try to connect them\n"); | 154 | (unsigned long long) FILESIZE); |
179 | op = GNUNET_TESTBED_overlay_connect (NULL, | 155 | GNUNET_FS_TEST_publish (daemons[1], TIMEOUT, 1, GNUNET_NO, FILESIZE, SEED, |
180 | &do_publish, NULL, | 156 | VERBOSE, &do_wait, NULL); |
181 | daemons[0], daemons[1]); | ||
182 | } | 157 | } |
183 | 158 | ||
184 | 159 | ||
@@ -189,7 +164,7 @@ main (int argc, char *argv[]) | |||
189 | "fs_test_lib_data.conf", | 164 | "fs_test_lib_data.conf", |
190 | 2, | 165 | 2, |
191 | 0, NULL, NULL, | 166 | 0, NULL, NULL, |
192 | &do_connect, | 167 | &do_publish, |
193 | NULL); | 168 | NULL); |
194 | GNUNET_DISK_directory_remove ("/tmp/test-gnunet-service-fs-migration/"); | 169 | GNUNET_DISK_directory_remove ("/tmp/test-gnunet-service-fs-migration/"); |
195 | return ok; | 170 | return ok; |