aboutsummaryrefslogtreecommitdiff
path: root/src/ats-tests/ats-testing-experiment.c
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2014-02-03 17:49:18 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2014-02-03 17:49:18 +0000
commitb26ee701eb12e7664fc0f158e5f38bfbd4149b10 (patch)
treefdd6a4cab56ea4c1f23fd662e621d782477817b7 /src/ats-tests/ats-testing-experiment.c
parentf52d267bb4d1ec781cf051b9a8d5beaa2b2ceb03 (diff)
downloadgnunet-b26ee701eb12e7664fc0f158e5f38bfbd4149b10.tar.gz
gnunet-b26ee701eb12e7664fc0f158e5f38bfbd4149b10.zip
logging all nodes in a single file
Diffstat (limited to 'src/ats-tests/ats-testing-experiment.c')
-rw-r--r--src/ats-tests/ats-testing-experiment.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/ats-tests/ats-testing-experiment.c b/src/ats-tests/ats-testing-experiment.c
index 8471733d6..4db1758cb 100644
--- a/src/ats-tests/ats-testing-experiment.c
+++ b/src/ats-tests/ats-testing-experiment.c
@@ -142,7 +142,7 @@ load_episode (struct Experiment *e, struct Episode *cur,
142 GNUNET_free (op_name); 142 GNUNET_free (op_name);
143 return GNUNET_SYSERR; 143 return GNUNET_SYSERR;
144 } 144 }
145 if (o->src_id > e->num_masters) 145 if (o->src_id > (e->num_masters - 1))
146 { 146 {
147 fprintf (stderr, "Invalid src %llu in operation %u `%s' in episode %u\n", 147 fprintf (stderr, "Invalid src %llu in operation %u `%s' in episode %u\n",
148 o->src_id, op_counter, op, cur->id); 148 o->src_id, op_counter, op, cur->id);
@@ -163,7 +163,7 @@ load_episode (struct Experiment *e, struct Episode *cur,
163 GNUNET_free (op_name); 163 GNUNET_free (op_name);
164 return GNUNET_SYSERR; 164 return GNUNET_SYSERR;
165 } 165 }
166 if (o->dest_id > e->num_slaves) 166 if (o->dest_id > (e->num_slaves - 1))
167 { 167 {
168 fprintf (stderr, "Invalid destination %llu in operation %u `%s' in episode %u\n", 168 fprintf (stderr, "Invalid destination %llu in operation %u `%s' in episode %u\n",
169 o->dest_id, op_counter, op, cur->id); 169 o->dest_id, op_counter, op, cur->id);
@@ -554,6 +554,17 @@ GNUNET_ATS_TEST_experimentation_load (char *filename)
554 e->num_slaves); 554 e->num_slaves);
555 555
556 if (GNUNET_SYSERR == GNUNET_CONFIGURATION_get_value_time(cfg, "experiment", 556 if (GNUNET_SYSERR == GNUNET_CONFIGURATION_get_value_time(cfg, "experiment",
557 "log_freq", &e->log_freq))
558 {
559 fprintf (stderr, "Invalid %s", "log_freq");
560 free_experiment (e);
561 return NULL;
562 }
563 else
564 fprintf (stderr, "Experiment logging frequency: `%s'\n",
565 GNUNET_STRINGS_relative_time_to_string (e->log_freq, GNUNET_YES));
566
567 if (GNUNET_SYSERR == GNUNET_CONFIGURATION_get_value_time(cfg, "experiment",
557 "max_duration", &e->max_duration)) 568 "max_duration", &e->max_duration))
558 { 569 {
559 fprintf (stderr, "Invalid %s", "max_duration"); 570 fprintf (stderr, "Invalid %s", "max_duration");