GNUnet  0.19.4
fs_test_lib.c
Go to the documentation of this file.
1 /*
2  This file is part of GNUnet.
3  Copyright (C) 2010, 2011, 2012 GNUnet e.V.
4 
5  GNUnet is free software: you can redistribute it and/or modify it
6  under the terms of the GNU Affero General Public License as published
7  by the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
10  GNUnet is distributed in the hope that it will be useful, but
11  WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Affero General Public License for more details.
14 
15  You should have received a copy of the GNU Affero General Public License
16  along with this program. If not, see <http://www.gnu.org/licenses/>.
17 
18  SPDX-License-Identifier: AGPL3.0-or-later
19  */
20 
29 #include "platform.h"
30 #include "fs_api.h"
31 #include "fs_test_lib.h"
32 
33 
34 #define CONTENT_LIFETIME GNUNET_TIME_UNIT_HOURS
35 
36 
41 {
46 
51 
56 
61 
66 
70  uint32_t publish_seed;
71 
76 
81 
86 
90  uint64_t size;
91 
95  uint32_t anonymity;
96 
100  unsigned int verbose;
101 
105  int do_index;
106 };
107 
108 
113 {
118 
123 
127  struct GNUNET_TESTING_Daemon *daemon;
128 
133 
138 
143 
148 
153 
157  uint64_t size;
158 
162  uint32_t anonymity;
163 
167  uint32_t download_seed;
168 
172  unsigned int verbose;
173 };
174 
175 
181 static void
182 report_uri (void *cls)
183 {
184  struct TestPublishOperation *po = cls;
185 
189  po->publish_uri,
190  (GNUNET_YES == po->do_index)
191  ? po->publish_tmp_file
192  : NULL);
194  if ((GNUNET_YES != po->do_index) &&
195  (NULL != po->publish_tmp_file))
198  GNUNET_free (po);
199 }
200 
201 
207 static void
208 publish_timeout (void *cls)
209 {
210  struct TestPublishOperation *po = cls;
211 
212  po->publish_timeout_task = NULL;
214  "Timeout while trying to publish data\n");
217  po->publish_cont (po->publish_cont_cls, NULL, NULL);
220  GNUNET_free (po);
221 }
222 
223 
230 static void *
232 {
233  struct TestPublishOperation *po = cls;
234 
235  switch (info->status)
236  {
239  po->publish_timeout_task = NULL;
240  po->publish_uri =
241  GNUNET_FS_uri_dup (info->value.publish.specifics.completed.chk_uri);
243  po);
244  break;
245 
247  if (po->verbose)
248  GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Publishing at %llu/%llu bytes\n",
249  (unsigned long long) info->value.publish.completed,
250  (unsigned long long) info->value.publish.size);
251  break;
252 
254  break;
255 
257  if (po->verbose)
258  GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Download at %llu/%llu bytes\n",
259  (unsigned long long) info->value.download.completed,
260  (unsigned long long) info->value.download.size);
261  break;
262 
263  default:
264  break;
265  }
266  return NULL;
267 }
268 
269 
280 static size_t
281 file_generator (void *cls,
282  uint64_t offset,
283  size_t max,
284  void *buf,
285  char **emsg)
286 {
287  uint32_t *publish_seed = cls;
288  uint64_t pos;
289  uint8_t *cbuf = buf;
290  int mod;
291 
292  if (emsg != NULL)
293  *emsg = NULL;
294  if (buf == NULL)
295  return 0;
296  for (pos = 0; pos < 8; pos++)
297  cbuf[pos] = (uint8_t) (offset >> pos * 8);
298  for (pos = 8; pos < max; pos++)
299  {
300  mod = (255 - (offset / 1024 / 32));
301  if (mod == 0)
302  mod = 1;
303  cbuf[pos] = (uint8_t) ((offset * (*publish_seed)) % mod);
304  }
305  return max;
306 }
307 
308 
318 static void *
320  const struct GNUNET_CONFIGURATION_Handle *cfg)
321 {
322  struct TestPublishOperation *po = cls;
323 
324  return GNUNET_FS_start (cfg,
325  "fs-test-publish",
326  &publish_progress_cb, po,
329 }
330 
331 
338 static void
340  void *op_result)
341 {
342  struct GNUNET_FS_Handle *fs = op_result;
343 
344  GNUNET_FS_stop (fs);
345 }
346 
347 
357 static void
360  void *ca_result,
361  const char *emsg)
362 {
363  struct TestPublishOperation *po = cls;
364  struct GNUNET_FS_FileInformation *fi;
365  struct GNUNET_DISK_FileHandle *fh;
366  char *em;
367  uint64_t off;
368  char buf[DBLOCK_SIZE];
369  size_t bsize;
370  struct GNUNET_FS_BlockOptions bo;
371 
372  if (NULL == ca_result)
373  {
375  "Failed to connect to FS for publishing: %s\n", emsg);
377  NULL, NULL);
379  GNUNET_free (po);
380  return;
381  }
382  po->fs = ca_result;
383 
386  bo.content_priority = 42;
387  bo.replication_level = 1;
388  if (GNUNET_YES == po->do_index)
389  {
390  po->publish_tmp_file = GNUNET_DISK_mktemp ("fs-test-publish-index");
391  GNUNET_assert (po->publish_tmp_file != NULL);
397  GNUNET_assert (NULL != fh);
398  off = 0;
399  while (off < po->size)
400  {
401  bsize = GNUNET_MIN (sizeof(buf), po->size - off);
402  emsg = NULL;
404  buf, &em));
405  GNUNET_assert (em == NULL);
407  off += bsize;
408  }
411  po->publish_tmp_file,
412  NULL, NULL, po->do_index,
413  &bo);
414  GNUNET_assert (NULL != fi);
415  }
416  else
417  {
419  po->size,
421  &po->publish_seed,
422  NULL, NULL,
423  po->do_index, &bo);
424  GNUNET_assert (NULL != fi);
425  }
426  po->publish_context =
427  GNUNET_FS_publish_start (po->fs, fi, NULL, NULL, NULL,
429 }
430 
431 
432 void
434  struct GNUNET_TIME_Relative timeout, uint32_t anonymity,
435  int do_index, uint64_t size, uint32_t seed,
436  unsigned int verbose,
437  GNUNET_FS_TEST_UriContinuation cont, void *cont_cls)
438 {
439  struct TestPublishOperation *po;
440 
441  po = GNUNET_new (struct TestPublishOperation);
442  po->publish_cont = cont;
443  po->publish_cont_cls = cont_cls;
444  po->publish_seed = seed;
445  po->anonymity = anonymity;
446  po->size = size;
447  po->verbose = verbose;
448  po->do_index = do_index;
450  peer,
451  "fs",
453  po,
456  po);
459 }
460 
461 
462 /* ************************** download ************************ */
463 
464 
470 static void
471 download_timeout (void *cls)
472 {
473  struct TestDownloadOperation *dop = cls;
474 
476  "Timeout while trying to download file\n");
477  dop->download_timeout_task = NULL;
479  GNUNET_YES);
481  dop->download_cont_cls);
483  GNUNET_FS_uri_destroy (dop->uri);
484  GNUNET_free (dop);
485 }
486 
487 
493 static void
494 report_success (void *cls)
495 {
496  struct TestDownloadOperation *dop = cls;
497 
499  GNUNET_YES);
501  dop->download_cont_cls);
503  GNUNET_FS_uri_destroy (dop->uri);
504  GNUNET_free (dop);
505 }
506 
507 
514 static void *
516  const struct GNUNET_FS_ProgressInfo *info)
517 {
518  struct TestDownloadOperation *dop = cls;
519 
520  switch (info->status)
521  {
523  if (dop->verbose)
525  "Download at %llu/%llu bytes\n",
526  (unsigned long long) info->value.download.completed,
527  (unsigned long long) info->value.download.size);
528  break;
529 
532  dop->download_timeout_task = NULL;
534  break;
535 
538  break;
539 
540  /* FIXME: monitor data correctness during download progress */
541  /* FIXME: do performance reports given sufficient verbosity */
542  /* FIXME: advance timeout task to "immediate" on error */
543  default:
544  break;
545  }
546  return NULL;
547 }
548 
549 
559 static void *
561  const struct GNUNET_CONFIGURATION_Handle *cfg)
562 {
563  struct TestPublishOperation *po = cls;
564 
565  return GNUNET_FS_start (cfg,
566  "fs-test-download",
570 }
571 
572 
582 static void
585  void *ca_result,
586  const char *emsg)
587 {
588  struct TestDownloadOperation *dop = cls;
589 
590  dop->fs = ca_result;
591  GNUNET_assert (NULL != dop->fs);
592  dop->download_context =
593  GNUNET_FS_download_start (dop->fs, dop->uri, NULL, NULL, NULL, 0, dop->size,
595  NULL, NULL);
596 }
597 
598 
599 void
602  uint32_t anonymity, uint32_t seed,
603  const struct GNUNET_FS_Uri *uri, unsigned int verbose,
604  GNUNET_SCHEDULER_TaskCallback cont, void *cont_cls)
605 {
606  struct TestDownloadOperation *dop;
607 
608  dop = GNUNET_new (struct TestDownloadOperation);
609  dop->uri = GNUNET_FS_uri_dup (uri);
611  dop->verbose = verbose;
612  dop->anonymity = anonymity;
613  dop->download_cont = cont;
614  dop->download_cont_cls = cont_cls;
615  dop->download_seed = seed;
616 
618  peer,
619  "fs",
621  dop,
624  dop);
625  dop->download_timeout_task =
627 }
628 
629 
630 /* end of fs_test_lib.c */
#define DBLOCK_SIZE
Size of the individual blocks used for file-sharing.
Definition: fs.h:41
shared definitions for the FS library
static size_t file_generator(void *cls, uint64_t offset, size_t max, void *buf, char **emsg)
Generate test data for publishing test.
Definition: fs_test_lib.c:281
static void download_timeout(void *cls)
Task scheduled to run when download operation times out.
Definition: fs_test_lib.c:471
static void fs_disconnect_adapter(void *cls, void *op_result)
Adapter function called to destroy connection to file-sharing service.
Definition: fs_test_lib.c:339
void GNUNET_FS_TEST_download(struct GNUNET_TESTBED_Peer *peer, struct GNUNET_TIME_Relative timeout, uint32_t anonymity, uint32_t seed, const struct GNUNET_FS_Uri *uri, unsigned int verbose, GNUNET_SCHEDULER_TaskCallback cont, void *cont_cls)
Perform test download.
Definition: fs_test_lib.c:600
static void report_uri(void *cls)
Task scheduled to report on the completion of our publish operation.
Definition: fs_test_lib.c:182
static void * publish_progress_cb(void *cls, const struct GNUNET_FS_ProgressInfo *info)
Progress callback for file-sharing events while publishing.
Definition: fs_test_lib.c:231
static void * publish_connect_adapter(void *cls, const struct GNUNET_CONFIGURATION_Handle *cfg)
Connect adapter for publishing operation.
Definition: fs_test_lib.c:319
static void publish_timeout(void *cls)
Task scheduled to run when publish operation times out.
Definition: fs_test_lib.c:208
static void download_fs_connect_complete_cb(void *cls, struct GNUNET_TESTBED_Operation *op, void *ca_result, const char *emsg)
Callback to be called when testbed has connected to the fs service.
Definition: fs_test_lib.c:583
static void * download_connect_adapter(void *cls, const struct GNUNET_CONFIGURATION_Handle *cfg)
Connect adapter for download operation.
Definition: fs_test_lib.c:560
static void report_success(void *cls)
Task scheduled to report on the completion of our download operation.
Definition: fs_test_lib.c:494
static void publish_fs_connect_complete_cb(void *cls, struct GNUNET_TESTBED_Operation *op, void *ca_result, const char *emsg)
Callback to be called when testbed has connected to the fs service.
Definition: fs_test_lib.c:358
static void * download_progress_cb(void *cls, const struct GNUNET_FS_ProgressInfo *info)
Progress callback for file-sharing events while downloading.
Definition: fs_test_lib.c:515
#define CONTENT_LIFETIME
Definition: fs_test_lib.c:34
void GNUNET_FS_TEST_publish(struct GNUNET_TESTBED_Peer *peer, struct GNUNET_TIME_Relative timeout, uint32_t anonymity, int do_index, uint64_t size, uint32_t seed, unsigned int verbose, GNUNET_FS_TEST_UriContinuation cont, void *cont_cls)
Publish a file at the given daemon.
Definition: fs_test_lib.c:433
library routines for testing FS publishing and downloading; this code is limited to flat files and no...
void(* GNUNET_FS_TEST_UriContinuation)(void *cls, const struct GNUNET_FS_Uri *uri, const char *fn)
Function signature.
Definition: fs_test_lib.h:46
static const struct GNUNET_CONFIGURATION_Handle * cfg
Configuration we are using.
Definition: gnunet-abd.c:36
static struct GNUNET_TIME_Relative timeout
Desired timeout for the lookup (default is no timeout).
Definition: gnunet-abd.c:61
static struct GNUNET_ARM_Operation * op
Current operation.
Definition: gnunet-arm.c:144
static int verbose
static unsigned int anonymity
static struct GNUNET_FS_Handle * fs
Handle to FS service.
Definition: gnunet-fs.c:37
static struct GNUNET_FS_Uri * uri
Value of URI provided on command-line (when not publishing a file but just creating UBlocks to refer ...
static struct GNUNET_FS_BlockOptions bo
Options we set for published blocks.
#define info
static char buf[2048]
static unsigned int bsize
static struct GNUNET_DISK_FileHandle * fh
File handle to STDIN, for reading restart/quit commands.
struct GNUNET_DISK_FileHandle * GNUNET_DISK_file_open(const char *fn, enum GNUNET_DISK_OpenFlags flags, enum GNUNET_DISK_AccessPermissions perm)
Open a file.
Definition: disk.c:1237
char * GNUNET_DISK_mktemp(const char *t)
Create an (empty) temporary file on disk.
Definition: disk.c:380
ssize_t GNUNET_DISK_file_write(const struct GNUNET_DISK_FileHandle *h, const void *buffer, size_t n)
Write a buffer to a file.
Definition: disk.c:686
enum GNUNET_GenericReturnValue GNUNET_DISK_directory_remove(const char *filename)
Remove all files in a directory (rm -rf).
Definition: disk.c:1087
enum GNUNET_GenericReturnValue GNUNET_DISK_file_close(struct GNUNET_DISK_FileHandle *h)
Close an open file.
Definition: disk.c:1308
@ GNUNET_DISK_OPEN_WRITE
Open the file for writing.
@ GNUNET_DISK_OPEN_CREATE
Create file if it doesn't exist.
@ GNUNET_DISK_PERM_USER_READ
Owner can read.
@ GNUNET_DISK_PERM_USER_WRITE
Owner can write.
uint64_t GNUNET_FS_uri_chk_get_file_size(const struct GNUNET_FS_Uri *uri)
What is the size of the file that this URI refers to?
Definition: fs_uri.c:1360
struct GNUNET_FS_FileInformation * GNUNET_FS_file_information_create_from_file(struct GNUNET_FS_Handle *h, void *client_info, const char *filename, const struct GNUNET_FS_Uri *keywords, const struct GNUNET_FS_MetaData *meta, int do_index, const struct GNUNET_FS_BlockOptions *bo)
Create an entry for a file in a publish-structure.
struct GNUNET_FS_PublishContext * GNUNET_FS_publish_start(struct GNUNET_FS_Handle *h, struct GNUNET_FS_FileInformation *fi, const struct GNUNET_CRYPTO_EcdsaPrivateKey *ns, const char *nid, const char *nuid, enum GNUNET_FS_PublishOptions options)
Publish a file or directory.
Definition: fs_publish.c:1443
void GNUNET_FS_uri_destroy(struct GNUNET_FS_Uri *uri)
Free URI.
Definition: fs_uri.c:677
struct GNUNET_FS_DownloadContext * GNUNET_FS_download_start(struct GNUNET_FS_Handle *h, const struct GNUNET_FS_Uri *uri, const struct GNUNET_FS_MetaData *meta, const char *filename, const char *tempname, uint64_t offset, uint64_t length, uint32_t anonymity, enum GNUNET_FS_DownloadOptions options, void *cctx, struct GNUNET_FS_DownloadContext *parent)
Download parts of a file.
Definition: fs_download.c:2100
struct GNUNET_FS_Uri * GNUNET_FS_uri_dup(const struct GNUNET_FS_Uri *uri)
Duplicate URI.
Definition: fs_uri.c:987
struct GNUNET_FS_FileInformation * GNUNET_FS_file_information_create_from_reader(struct GNUNET_FS_Handle *h, void *client_info, uint64_t length, GNUNET_FS_DataReader reader, void *reader_cls, const struct GNUNET_FS_Uri *keywords, const struct GNUNET_FS_MetaData *meta, int do_index, const struct GNUNET_FS_BlockOptions *bo)
Create an entry for a file in a publish-structure.
void GNUNET_FS_download_stop(struct GNUNET_FS_DownloadContext *dc, int do_delete)
Stop a download (aborts if download is incomplete).
Definition: fs_download.c:2254
struct GNUNET_FS_Handle * GNUNET_FS_start(const struct GNUNET_CONFIGURATION_Handle *cfg, const char *client_name, GNUNET_FS_ProgressCallback upcb, void *upcb_cls, enum GNUNET_FS_Flags flags,...)
Setup a connection to the file-sharing service.
Definition: fs_api.c:3244
void GNUNET_FS_stop(struct GNUNET_FS_Handle *h)
Close our connection with the file-sharing service.
Definition: fs_api.c:3310
void GNUNET_FS_publish_stop(struct GNUNET_FS_PublishContext *pc)
Stop an upload.
Definition: fs_publish.c:1571
@ GNUNET_FS_FLAGS_NONE
No special flags set.
@ GNUNET_FS_DOWNLOAD_OPTION_NONE
No options (use defaults for everything).
@ GNUNET_FS_OPTIONS_END
Last option in the VARARG list.
@ GNUNET_FS_STATUS_DOWNLOAD_INACTIVE
Notification that this download is no longer actively being pursued (back in the queue).
@ GNUNET_FS_STATUS_DOWNLOAD_COMPLETED
Notification that this download completed.
@ GNUNET_FS_STATUS_PUBLISH_PROGRESS
Notification that we are making progress sharing a file structure.
@ GNUNET_FS_STATUS_DOWNLOAD_PROGRESS
Notification about progress with this download.
@ GNUNET_FS_STATUS_PUBLISH_PROGRESS_DIRECTORY
Notification that we are making progress sharing a directory.
@ GNUNET_FS_STATUS_PUBLISH_COMPLETED
Notification that we completed sharing a file structure.
@ GNUNET_FS_STATUS_DOWNLOAD_ACTIVE
Notification that this download is now actively being pursued (as opposed to waiting in the queue).
@ GNUNET_FS_PUBLISH_OPTION_NONE
No options (use defaults for everything).
#define GNUNET_log(kind,...)
#define GNUNET_MIN(a, b)
@ GNUNET_OK
@ GNUNET_YES
#define GNUNET_assert(cond)
Use this for fatal errors that cannot be handled.
@ GNUNET_ERROR_TYPE_ERROR
@ GNUNET_ERROR_TYPE_INFO
#define GNUNET_new(type)
Allocate a struct or union of the given type.
#define GNUNET_free(ptr)
Wrapper around free.
struct GNUNET_SCHEDULER_Task * GNUNET_SCHEDULER_add_now(GNUNET_SCHEDULER_TaskCallback task, void *task_cls)
Schedule a new task to be run as soon as possible.
Definition: scheduler.c:1299
void(* GNUNET_SCHEDULER_TaskCallback)(void *cls)
Signature of the main function of a task.
void * GNUNET_SCHEDULER_cancel(struct GNUNET_SCHEDULER_Task *task)
Cancel the task with the specified identifier.
Definition: scheduler.c:975
struct GNUNET_SCHEDULER_Task * GNUNET_SCHEDULER_add_delayed(struct GNUNET_TIME_Relative delay, GNUNET_SCHEDULER_TaskCallback task, void *task_cls)
Schedule a new task to be run with a specified delay.
Definition: scheduler.c:1272
void GNUNET_TESTBED_operation_done(struct GNUNET_TESTBED_Operation *operation)
This function is used to signal that the event information (struct GNUNET_TESTBED_EventInformation) f...
Definition: testbed_api.c:2021
struct GNUNET_TESTBED_Operation * GNUNET_TESTBED_service_connect(void *op_cls, struct GNUNET_TESTBED_Peer *peer, const char *service_name, GNUNET_TESTBED_ServiceConnectCompletionCallback cb, void *cb_cls, GNUNET_TESTBED_ConnectAdapter ca, GNUNET_TESTBED_DisconnectAdapter da, void *cada_cls)
Connect to a service offered by the given peer.
struct GNUNET_TIME_Absolute GNUNET_TIME_relative_to_absolute(struct GNUNET_TIME_Relative rel)
Convert relative time to an absolute time in the future.
Definition: time.c:316
#define max(x, y)
static int op_result(struct GNUNET_OP_Handle *h, uint64_t op_id, int64_t result_code, const void *data, uint16_t data_size, void **ctx, uint8_t cancel)
Remove an operation, and call its result callback (unless it was cancelled).
Definition: op.c:246
static unsigned int size
Size of the "table".
Definition: peer.c:68
Handle used to access files (and pipes).
Settings for publishing a block (which may of course also apply to an entire directory or file).
uint32_t anonymity_level
At which anonymity level should the block be shared? (0: no anonymity, 1: normal GAP,...
uint32_t content_priority
How important is it for us to store the block? If we run out of space, the highest-priority,...
uint32_t replication_level
How often should we try to migrate the block to other peers? Only used if "CONTENT_PUSHING" is set to...
struct GNUNET_TIME_Absolute expiration_time
At what time should the block expire? Data blocks (DBLOCKS and IBLOCKS) may still be used even if the...
Context for controlling a download.
Definition: fs_api.h:1744
Information for a file or directory that is about to be published.
Definition: fs_api.h:228
Master context for most FS operations.
Definition: fs_api.h:1070
Argument given to the progress callback with information about what is going on.
Handle for controlling a publication process.
Definition: fs_api.h:1180
A Universal Resource Identifier (URI), opaque.
Definition: fs_api.h:167
Entry in list of pending tasks.
Definition: scheduler.c:136
Opaque handle to an abstract operation to be executed by the testing framework.
A peer controlled by the testing framework.
Time for relative time used by GNUnet, in microseconds.
Handle for a download operation started for testing FS.
Definition: fs_test_lib.c:113
uint32_t download_seed
Seed for download verification.
Definition: fs_test_lib.c:167
struct GNUNET_FS_DownloadContext * download_context
Context for current download operation.
Definition: fs_test_lib.c:152
uint32_t anonymity
Anonymity level used.
Definition: fs_test_lib.c:162
unsigned int verbose
Verbosity level of the current operation.
Definition: fs_test_lib.c:172
struct GNUNET_FS_Uri * uri
URI to download.
Definition: fs_test_lib.c:142
struct GNUNET_TESTING_Daemon * daemon
Handle to the daemon via testing.
Definition: fs_test_lib.c:127
struct GNUNET_SCHEDULER_Task * download_timeout_task
Task to abort downloading (timeout).
Definition: fs_test_lib.c:147
void * download_cont_cls
Closure for download_cont.
Definition: fs_test_lib.c:137
struct GNUNET_TESTBED_Operation * fs_op
Handle for the operation to connect to the peer's 'fs' service.
Definition: fs_test_lib.c:117
uint64_t size
Size of the file.
Definition: fs_test_lib.c:157
GNUNET_SCHEDULER_TaskCallback download_cont
Function to call when download is done.
Definition: fs_test_lib.c:132
struct GNUNET_FS_Handle * fs
Handle to the file sharing context using this daemon.
Definition: fs_test_lib.c:122
Handle for a publishing operation started for testing FS.
Definition: fs_test_lib.c:41
void * publish_cont_cls
Closure for publish_cont.
Definition: fs_test_lib.c:60
uint32_t anonymity
Anonymity level used.
Definition: fs_test_lib.c:95
GNUNET_FS_TEST_UriContinuation publish_cont
Function to call when upload is done.
Definition: fs_test_lib.c:55
struct GNUNET_TESTBED_Operation * fs_op
Handle for the operation to connect to the peer's 'fs' service.
Definition: fs_test_lib.c:45
struct GNUNET_FS_Handle * fs
Handle to the file sharing context using this daemon.
Definition: fs_test_lib.c:50
uint32_t publish_seed
Seed for file generation.
Definition: fs_test_lib.c:70
uint64_t size
Size of the file.
Definition: fs_test_lib.c:90
int do_index
Are we testing indexing? (YES: index, NO: insert, SYSERR: simulate)
Definition: fs_test_lib.c:105
char * publish_tmp_file
Name of the temporary file used, or NULL for none.
Definition: fs_test_lib.c:85
struct GNUNET_FS_Uri * publish_uri
Result URI.
Definition: fs_test_lib.c:80
unsigned int verbose
Verbosity level of the current operation.
Definition: fs_test_lib.c:100
struct GNUNET_SCHEDULER_Task * publish_timeout_task
Task to abort publishing (timeout).
Definition: fs_test_lib.c:65
struct GNUNET_FS_PublishContext * publish_context
Context for current publishing operation.
Definition: fs_test_lib.c:75
struct GNUNET_TESTBED_Peer * peer
The peer associated with this model.