aboutsummaryrefslogtreecommitdiff
path: root/src/testing
diff options
context:
space:
mode:
Diffstat (limited to 'src/testing')
-rw-r--r--src/testing/test_testing_large_topology.c62
-rw-r--r--src/testing/test_testing_reconnect.c8
-rw-r--r--src/testing/test_testing_topology.c64
-rw-r--r--src/testing/test_testing_topology_blacklist.c8
-rw-r--r--src/testing/testing_group.c16
-rw-r--r--src/testing/testing_peergroup.c8
6 files changed, 83 insertions, 83 deletions
diff --git a/src/testing/test_testing_large_topology.c b/src/testing/test_testing_large_topology.c
index e966ca137..2bca7b3b9 100644
--- a/src/testing/test_testing_large_topology.c
+++ b/src/testing/test_testing_large_topology.c
@@ -245,7 +245,7 @@ finish_testing ()
245 245
246 if (dotOutFile != NULL) 246 if (dotOutFile != NULL)
247 { 247 {
248 fprintf (dotOutFile, "}"); 248 FPRINTF (dotOutFile, "%s", "}");
249 fclose (dotOutFile); 249 fclose (dotOutFile);
250 } 250 }
251 251
@@ -290,19 +290,19 @@ topology_cb (void *cls, const struct GNUNET_PeerIdentity *first,
290 { 290 {
291 if (outfile != NULL) 291 if (outfile != NULL)
292 { 292 {
293 fprintf (outfile, "\t\"%s\" -- ", GNUNET_i2s (first)); 293 FPRINTF (outfile, "\t\"%s\" -- ", GNUNET_i2s (first));
294 fprintf (outfile, "\"%s\";\n", GNUNET_i2s (second)); 294 FPRINTF (outfile, "\"%s\";\n", GNUNET_i2s (second));
295 } 295 }
296 topology_connections++; 296 topology_connections++;
297 } 297 }
298 else 298 else
299 { 299 {
300 fprintf (stderr, 300 FPRINTF (stderr,
301 "Finished iterating over topology, %d total connections!\n", 301 "Finished iterating over topology, %d total connections!\n",
302 topology_connections); 302 topology_connections);
303 if (outfile != NULL) 303 if (outfile != NULL)
304 { 304 {
305 fprintf (outfile, "}\n"); 305 FPRINTF (outfile, "%s", "}\n");
306 fclose (outfile); 306 fclose (outfile);
307 GNUNET_SCHEDULER_add_now (&finish_testing, NULL); 307 GNUNET_SCHEDULER_add_now (&finish_testing, NULL);
308 } 308 }
@@ -326,16 +326,16 @@ process_mtype (void *cls, const struct GNUNET_PeerIdentity *peer,
326 if ((total_messages_received) % modnum == 0) 326 if ((total_messages_received) % modnum == 0)
327 { 327 {
328 if (total_messages_received == 0) 328 if (total_messages_received == 0)
329 fprintf (stdout, "0%%"); 329 FPRINTF (stdout, "%s", "0%%");
330 else 330 else
331 fprintf (stdout, "%d%%", 331 FPRINTF (stdout, "%d%%",
332 (int) (((float) total_messages_received / expected_messages) * 332 (int) (((float) total_messages_received / expected_messages) *
333 100)); 333 100));
334 334
335 } 335 }
336 else if (total_messages_received % dotnum == 0) 336 else if (total_messages_received % dotnum == 0)
337 { 337 {
338 fprintf (stdout, "."); 338 FPRINTF (stdout, "%s", ".");
339 } 339 }
340 fflush (stdout); 340 fflush (stdout);
341#endif 341#endif
@@ -354,7 +354,7 @@ process_mtype (void *cls, const struct GNUNET_PeerIdentity *peer,
354 if (total_messages_received == expected_messages) 354 if (total_messages_received == expected_messages)
355 { 355 {
356#if VERBOSE 356#if VERBOSE
357 fprintf (stdout, "100%%]\n"); 357 FPRINTF (stdout, "%s", "100%%]\n");
358#endif 358#endif
359 GNUNET_SCHEDULER_cancel (die_task); 359 GNUNET_SCHEDULER_cancel (die_task);
360 GNUNET_asprintf (&dotOutFileNameFinished, "%s.dot", "final_topology"); 360 GNUNET_asprintf (&dotOutFileNameFinished, "%s.dot", "final_topology");
@@ -362,7 +362,7 @@ process_mtype (void *cls, const struct GNUNET_PeerIdentity *peer,
362 GNUNET_free (dotOutFileNameFinished); 362 GNUNET_free (dotOutFileNameFinished);
363 if (dotOutFileFinished != NULL) 363 if (dotOutFileFinished != NULL)
364 { 364 {
365 fprintf (dotOutFileFinished, "strict graph G {\n"); 365 FPRINTF (dotOutFileFinished, "%s", "strict graph G {\n");
366 } 366 }
367 topology_connections = 0; 367 topology_connections = 0;
368 GNUNET_TESTING_get_topology (pg, &topology_cb, dotOutFileFinished); 368 GNUNET_TESTING_get_topology (pg, &topology_cb, dotOutFileFinished);
@@ -424,7 +424,7 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
424 424
425 if (dotOutFile != NULL) 425 if (dotOutFile != NULL)
426 { 426 {
427 fprintf (dotOutFile, "}"); 427 FPRINTF (dotOutFile, "%s", "}");
428 fclose (dotOutFile); 428 fclose (dotOutFile);
429 } 429 }
430} 430}
@@ -639,16 +639,16 @@ topology_callback (void *cls, const struct GNUNET_PeerIdentity *first,
639 if ((total_connections) % modnum == 0) 639 if ((total_connections) % modnum == 0)
640 { 640 {
641 if (total_connections == 0) 641 if (total_connections == 0)
642 fprintf (stdout, "0%%"); 642 FPRINTF (stdout, "%s", "0%%");
643 else 643 else
644 fprintf (stdout, "%d%%", 644 FPRINTF (stdout, "%d%%",
645 (int) (((float) total_connections / expected_connections) * 645 (int) (((float) total_connections / expected_connections) *
646 100)); 646 100));
647 647
648 } 648 }
649 else if (total_connections % dotnum == 0) 649 else if (total_connections % dotnum == 0)
650 { 650 {
651 fprintf (stdout, "."); 651 FPRINTF (stdout, "%s", ".");
652 } 652 }
653 fflush (stdout); 653 fflush (stdout);
654#endif 654#endif
@@ -667,7 +667,7 @@ topology_callback (void *cls, const struct GNUNET_PeerIdentity *first,
667 667
668 expected_messages++; 668 expected_messages++;
669 if (dotOutFile != NULL) 669 if (dotOutFile != NULL)
670 fprintf (dotOutFile, "\tn%s -- n%s;\n", first_daemon->shortname, 670 FPRINTF (dotOutFile, "\tn%s -- n%s;\n", first_daemon->shortname,
671 second_daemon->shortname); 671 second_daemon->shortname);
672 } 672 }
673#if VERBOSE 673#if VERBOSE
@@ -683,7 +683,7 @@ topology_callback (void *cls, const struct GNUNET_PeerIdentity *first,
683 if (total_connections == expected_connections) 683 if (total_connections == expected_connections)
684 { 684 {
685#if VERBOSE 685#if VERBOSE
686 fprintf (stdout, "100%%]\n"); 686 FPRINTF (stdout, "%s", "100%%]\n");
687#endif 687#endif
688#if VERBOSE 688#if VERBOSE
689 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 689 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -695,7 +695,7 @@ topology_callback (void *cls, const struct GNUNET_PeerIdentity *first,
695 GNUNET_SCHEDULER_cancel (die_task); 695 GNUNET_SCHEDULER_cancel (die_task);
696 die_task = GNUNET_SCHEDULER_NO_TASK; 696 die_task = GNUNET_SCHEDULER_NO_TASK;
697#if DELAY_FOR_LOGGING 697#if DELAY_FOR_LOGGING
698 fprintf (stdout, "Sending test messages in 10 seconds.\n"); 698 FPRINTF (stdout, "%s", "Sending test messages in 10 seconds.\n");
699 GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply 699 GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply
700 (GNUNET_TIME_UNIT_SECONDS, 10), 700 (GNUNET_TIME_UNIT_SECONDS, 10),
701 &send_test_messages, test_messages); 701 &send_test_messages, test_messages);
@@ -709,7 +709,7 @@ topology_callback (void *cls, const struct GNUNET_PeerIdentity *first,
709 test_messages); 709 test_messages);
710#endif 710#endif
711#if VERBOSE 711#if VERBOSE
712 fprintf (stdout, "Test message progress: ["); 712 FPRINTF (stdout, "%s", "Test message progress: [");
713#endif 713#endif
714 714
715 } 715 }
@@ -784,7 +784,7 @@ connect_topology ()
784 modnum = expected_connections / 4; 784 modnum = expected_connections / 4;
785 dotnum = (expected_connections / 50) + 1; 785 dotnum = (expected_connections / 50) + 1;
786#if VERBOSE 786#if VERBOSE
787 fprintf (stdout, "Peer connection progress: ["); 787 FPRINTF (stdout, "%s", "Peer connection progress: [");
788#endif 788#endif
789} 789}
790 790
@@ -798,7 +798,7 @@ create_topology ()
798#if VERBOSE 798#if VERBOSE
799 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 799 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
800 "Topology set up, now starting peers!\n"); 800 "Topology set up, now starting peers!\n");
801 fprintf (stdout, "Daemon start progress ["); 801 FPRINTF (stdout, "%s", "Daemon start progress [");
802#endif 802#endif
803 GNUNET_TESTING_daemons_continue_startup (pg); 803 GNUNET_TESTING_daemons_continue_startup (pg);
804 } 804 }
@@ -836,15 +836,15 @@ peers_started_callback (void *cls, const struct GNUNET_PeerIdentity *id,
836 if ((num_peers - peers_left) % modnum == 0) 836 if ((num_peers - peers_left) % modnum == 0)
837 { 837 {
838 if (num_peers - peers_left == 0) 838 if (num_peers - peers_left == 0)
839 fprintf (stdout, "0%%"); 839 FPRINTF (stdout, "%s", "0%%");
840 else 840 else
841 fprintf (stdout, "%d%%", 841 FPRINTF (stdout, "%d%%",
842 (int) (((float) (num_peers - peers_left) / num_peers) * 100)); 842 (int) (((float) (num_peers - peers_left) / num_peers) * 100));
843 843
844 } 844 }
845 else if ((num_peers - peers_left) % dotnum == 0) 845 else if ((num_peers - peers_left) % dotnum == 0)
846 { 846 {
847 fprintf (stdout, "."); 847 FPRINTF (stdout, "%s", ".");
848 } 848 }
849 fflush (stdout); 849 fflush (stdout);
850#endif 850#endif
@@ -852,7 +852,7 @@ peers_started_callback (void *cls, const struct GNUNET_PeerIdentity *id,
852 if (peers_left == 0) 852 if (peers_left == 0)
853 { 853 {
854#if VERBOSE 854#if VERBOSE
855 fprintf (stdout, "100%%]\n"); 855 FPRINTF (stdout, "%s", "100%%]\n");
856#endif 856#endif
857#if VERBOSE 857#if VERBOSE
858 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 858 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -865,7 +865,7 @@ peers_started_callback (void *cls, const struct GNUNET_PeerIdentity *id,
865 GNUNET_SCHEDULER_add_delayed (timeout, &end_badly, 865 GNUNET_SCHEDULER_add_delayed (timeout, &end_badly,
866 "from peers_started_callback"); 866 "from peers_started_callback");
867#if DELAY_FOR_LOGGING 867#if DELAY_FOR_LOGGING
868 fprintf (stdout, "Connecting topology in 10 seconds\n"); 868 FPRINTF (stdout, "%s", "Connecting topology in 10 seconds\n");
869 gather_log_data (); 869 gather_log_data ();
870 GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply 870 GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply
871 (GNUNET_TIME_UNIT_SECONDS, 10), 871 (GNUNET_TIME_UNIT_SECONDS, 10),
@@ -905,15 +905,15 @@ hostkey_callback (void *cls, const struct GNUNET_PeerIdentity *id,
905 if ((num_peers - peers_left) % modnum == 0) 905 if ((num_peers - peers_left) % modnum == 0)
906 { 906 {
907 if (num_peers - peers_left == 0) 907 if (num_peers - peers_left == 0)
908 fprintf (stdout, "0%%"); 908 FPRINTF (stdout, "%s", "0%%");
909 else 909 else
910 fprintf (stdout, "%d%%", 910 FPRINTF (stdout, "%d%%",
911 (int) (((float) (num_peers - peers_left) / num_peers) * 100)); 911 (int) (((float) (num_peers - peers_left) / num_peers) * 100));
912 912
913 } 913 }
914 else if ((num_peers - peers_left) % dotnum == 0) 914 else if ((num_peers - peers_left) % dotnum == 0)
915 { 915 {
916 fprintf (stdout, "."); 916 FPRINTF (stdout, "%s", ".");
917 } 917 }
918 fflush (stdout); 918 fflush (stdout);
919#endif 919#endif
@@ -921,7 +921,7 @@ hostkey_callback (void *cls, const struct GNUNET_PeerIdentity *id,
921 if (peers_left == 0) 921 if (peers_left == 0)
922 { 922 {
923#if VERBOSE 923#if VERBOSE
924 fprintf (stdout, "100%%]\n"); 924 FPRINTF (stdout, "%s", "100%%]\n");
925 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 925 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
926 "All %d hostkeys created, now creating topology!\n", num_peers); 926 "All %d hostkeys created, now creating topology!\n", num_peers);
927#endif 927#endif
@@ -952,7 +952,7 @@ run (void *cls, char *const *args, const char *cfgfile,
952 dotOutFile = fopen (dotOutFileName, "w"); 952 dotOutFile = fopen (dotOutFileName, "w");
953 if (dotOutFile != NULL) 953 if (dotOutFile != NULL)
954 { 954 {
955 fprintf (dotOutFile, "strict graph G {\n"); 955 FPRINTF (dotOutFile, "%s", "strict graph G {\n");
956 } 956 }
957 957
958#if VERBOSE 958#if VERBOSE
@@ -1101,7 +1101,7 @@ run (void *cls, char *const *args, const char *cfgfile,
1101 modnum = num_peers / 4; 1101 modnum = num_peers / 4;
1102 dotnum = (num_peers / 50) + 1; 1102 dotnum = (num_peers / 50) + 1;
1103#if VERBOSE 1103#if VERBOSE
1104 fprintf (stdout, "Hostkey generation progress: ["); 1104 FPRINTF (stdout, "%s", "Hostkey generation progress: [");
1105#endif 1105#endif
1106 /* Set up a task to end testing if peer start fails */ 1106 /* Set up a task to end testing if peer start fails */
1107 die_task = 1107 die_task =
diff --git a/src/testing/test_testing_reconnect.c b/src/testing/test_testing_reconnect.c
index 20c628c6a..bcee38659 100644
--- a/src/testing/test_testing_reconnect.c
+++ b/src/testing/test_testing_reconnect.c
@@ -72,11 +72,11 @@ end2_cb (void *cls, const char *emsg)
72 { 72 {
73 if (phase < NUM_PHASES) 73 if (phase < NUM_PHASES)
74 { 74 {
75 fprintf (stderr, "."); 75 FPRINTF (stderr, "%s", ".");
76 run_phase (); 76 run_phase ();
77 return; 77 return;
78 } 78 }
79 fprintf (stderr, ".\n"); 79 FPRINTF (stderr, "%s", ".\n");
80#if VERBOSE 80#if VERBOSE
81 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 81 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
82 "Both daemons terminated, will now exit.\n"); 82 "Both daemons terminated, will now exit.\n");
@@ -129,8 +129,8 @@ my_connect_complete (void *cls, const struct GNUNET_PeerIdentity *first,
129{ 129{
130 cc = NULL; 130 cc = NULL;
131#if VERBOSE 131#if VERBOSE
132 fprintf (stderr, "Peer %s ", GNUNET_i2s (first)); 132 FPRINTF (stderr, "Peer %s ", GNUNET_i2s (first));
133 fprintf (stderr, "connected to %s\n", GNUNET_i2s (second)); 133 FPRINTF (stderr, "connected to %s\n", GNUNET_i2s (second));
134#endif 134#endif
135 GNUNET_SCHEDULER_add_now (&finish_testing, NULL); 135 GNUNET_SCHEDULER_add_now (&finish_testing, NULL);
136} 136}
diff --git a/src/testing/test_testing_topology.c b/src/testing/test_testing_topology.c
index 7d0c0da5f..17f3be89a 100644
--- a/src/testing/test_testing_topology.c
+++ b/src/testing/test_testing_topology.c
@@ -253,8 +253,8 @@ finish_testing ()
253 253
254 if (dotOutFile != NULL) 254 if (dotOutFile != NULL)
255 { 255 {
256 fprintf (dotOutFile, "}"); 256 FPRINTF (dotOutFile, "%s", "}");
257 fclose (dotOutFile); 257 FCLOSE (dotOutFile);
258 } 258 }
259 259
260 ok = 0; 260 ok = 0;
@@ -326,19 +326,19 @@ topology_cb (void *cls, const struct GNUNET_PeerIdentity *first,
326 { 326 {
327 if (outfile != NULL) 327 if (outfile != NULL)
328 { 328 {
329 fprintf (outfile, "\t\"%s\" -- ", GNUNET_i2s (first)); 329 FPRINTF (outfile, "\t\"%s\" -- ", GNUNET_i2s (first));
330 fprintf (outfile, "\"%s\";\n", GNUNET_i2s (second)); 330 FPRINTF (outfile, "\"%s\";\n", GNUNET_i2s (second));
331 } 331 }
332 topology_connections++; 332 topology_connections++;
333 } 333 }
334 else 334 else
335 { 335 {
336 fprintf (stderr, 336 FPRINTF (stderr,
337 "Finished iterating over topology, %d total connections!\n", 337 "Finished iterating over topology, %d total connections!\n",
338 topology_connections); 338 topology_connections);
339 if (outfile != NULL) 339 if (outfile != NULL)
340 { 340 {
341 fprintf (outfile, "}\n"); 341 FPRINTF (outfile, "%s", "}\n");
342 fclose (outfile); 342 fclose (outfile);
343#if DO_STATS 343#if DO_STATS
344 GNUNET_TESTING_get_statistics (pg, &stats_finished, &stats_print, NULL); 344 GNUNET_TESTING_get_statistics (pg, &stats_finished, &stats_print, NULL);
@@ -366,16 +366,16 @@ process_mtype (void *cls, const struct GNUNET_PeerIdentity *peer,
366 if ((total_messages_received) % modnum == 0) 366 if ((total_messages_received) % modnum == 0)
367 { 367 {
368 if (total_messages_received == 0) 368 if (total_messages_received == 0)
369 fprintf (stdout, "0%%"); 369 FPRINTF (stdout, "%s", "0%%");
370 else 370 else
371 fprintf (stdout, "%d%%", 371 FPRINTF (stdout, "%d%%",
372 (int) (((float) total_messages_received / expected_messages) * 372 (int) (((float) total_messages_received / expected_messages) *
373 100)); 373 100));
374 374
375 } 375 }
376 else if (total_messages_received % dotnum == 0) 376 else if (total_messages_received % dotnum == 0)
377 { 377 {
378 fprintf (stdout, "."); 378 FPRINTF (stdout, "%s", ".");
379 } 379 }
380 fflush (stdout); 380 fflush (stdout);
381#endif 381#endif
@@ -394,7 +394,7 @@ process_mtype (void *cls, const struct GNUNET_PeerIdentity *peer,
394 if (total_messages_received == expected_messages) 394 if (total_messages_received == expected_messages)
395 { 395 {
396#if PROGRESS_BARS 396#if PROGRESS_BARS
397 fprintf (stdout, "100%%]\n"); 397 FPRINTF (stdout, "%s", "100%%]\n");
398#endif 398#endif
399 GNUNET_SCHEDULER_cancel (die_task); 399 GNUNET_SCHEDULER_cancel (die_task);
400 GNUNET_asprintf (&dotOutFileNameFinished, "%s.dot", "final_topology"); 400 GNUNET_asprintf (&dotOutFileNameFinished, "%s.dot", "final_topology");
@@ -402,7 +402,7 @@ process_mtype (void *cls, const struct GNUNET_PeerIdentity *peer,
402 GNUNET_free (dotOutFileNameFinished); 402 GNUNET_free (dotOutFileNameFinished);
403 if (dotOutFileFinished != NULL) 403 if (dotOutFileFinished != NULL)
404 { 404 {
405 fprintf (dotOutFileFinished, "strict graph G {\n"); 405 FPRINTF (dotOutFileFinished, "%s", "strict graph G {\n");
406 } 406 }
407 topology_connections = 0; 407 topology_connections = 0;
408 GNUNET_TESTING_get_topology (pg, &topology_cb, dotOutFileFinished); 408 GNUNET_TESTING_get_topology (pg, &topology_cb, dotOutFileFinished);
@@ -464,7 +464,7 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
464 464
465 if (dotOutFile != NULL) 465 if (dotOutFile != NULL)
466 { 466 {
467 fprintf (dotOutFile, "}"); 467 FPRINTF (dotOutFile, "%s", "}");
468 fclose (dotOutFile); 468 fclose (dotOutFile);
469 } 469 }
470} 470}
@@ -680,16 +680,16 @@ topology_callback (void *cls, const struct GNUNET_PeerIdentity *first,
680 if ((total_connections) % modnum == 0) 680 if ((total_connections) % modnum == 0)
681 { 681 {
682 if (total_connections == 0) 682 if (total_connections == 0)
683 fprintf (stdout, "0%%"); 683 FPRINTF (stdout, "%s", "0%%");
684 else 684 else
685 fprintf (stdout, "%d%%", 685 FPRINTF (stdout, "%d%%",
686 (int) (((float) total_connections / expected_connections) * 686 (int) (((float) total_connections / expected_connections) *
687 100)); 687 100));
688 688
689 } 689 }
690 else if (total_connections % dotnum == 0) 690 else if (total_connections % dotnum == 0)
691 { 691 {
692 fprintf (stdout, "."); 692 FPRINTF (stdout, "%s", ".");
693 } 693 }
694 fflush (stdout); 694 fflush (stdout);
695#endif 695#endif
@@ -708,7 +708,7 @@ topology_callback (void *cls, const struct GNUNET_PeerIdentity *first,
708 708
709 expected_messages++; 709 expected_messages++;
710 if (dotOutFile != NULL) 710 if (dotOutFile != NULL)
711 fprintf (dotOutFile, "\tn%s -- n%s;\n", first_daemon->shortname, 711 FPRINTF (dotOutFile, "\tn%s -- n%s;\n", first_daemon->shortname,
712 second_daemon->shortname); 712 second_daemon->shortname);
713 } 713 }
714#if VERBOSE 714#if VERBOSE
@@ -724,7 +724,7 @@ topology_callback (void *cls, const struct GNUNET_PeerIdentity *first,
724 if (total_connections == expected_connections) 724 if (total_connections == expected_connections)
725 { 725 {
726#if PROGRESS_BARS 726#if PROGRESS_BARS
727 fprintf (stdout, "100%%]\n"); 727 FPRINTF (stdout, "%s", "100%%]\n");
728#endif 728#endif
729#if VERBOSE 729#if VERBOSE
730 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 730 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -740,7 +740,7 @@ topology_callback (void *cls, const struct GNUNET_PeerIdentity *first,
740 GNUNET_SCHEDULER_cancel (die_task); 740 GNUNET_SCHEDULER_cancel (die_task);
741 die_task = GNUNET_SCHEDULER_NO_TASK; 741 die_task = GNUNET_SCHEDULER_NO_TASK;
742#if DELAY_FOR_LOGGING 742#if DELAY_FOR_LOGGING
743 fprintf (stdout, "Sending test messages in 10 seconds.\n"); 743 FPRINTF (stdout, "%s", "Sending test messages in 10 seconds.\n");
744 GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply 744 GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply
745 (GNUNET_TIME_UNIT_SECONDS, 10), 745 (GNUNET_TIME_UNIT_SECONDS, 10),
746 &send_test_messages, test_messages); 746 &send_test_messages, test_messages);
@@ -754,7 +754,7 @@ topology_callback (void *cls, const struct GNUNET_PeerIdentity *first,
754 test_messages); 754 test_messages);
755#endif 755#endif
756#if PROGRESS_BARS 756#if PROGRESS_BARS
757 fprintf (stdout, "Test message progress: ["); 757 FPRINTF (stdout, "%s", "Test message progress: [");
758#endif 758#endif
759 759
760 } 760 }
@@ -837,7 +837,7 @@ connect_topology ()
837 if (dotnum == 0) 837 if (dotnum == 0)
838 dotnum = 1; 838 dotnum = 1;
839#if PROGRESS_BARS 839#if PROGRESS_BARS
840 fprintf (stdout, "Peer connection progress: ["); 840 FPRINTF (stdout, "%s", "Peer connection progress: [");
841#endif 841#endif
842} 842}
843 843
@@ -851,7 +851,7 @@ create_topology ()
851#if PROGRESS_BARS 851#if PROGRESS_BARS
852 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 852 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
853 "Topology set up, now starting peers!\n"); 853 "Topology set up, now starting peers!\n");
854 fprintf (stdout, "Daemon start progress ["); 854 FPRINTF (stdout, "%s", "Daemon start progress [");
855#endif 855#endif
856 GNUNET_TESTING_daemons_continue_startup (pg); 856 GNUNET_TESTING_daemons_continue_startup (pg);
857 } 857 }
@@ -892,15 +892,15 @@ peers_started_callback (void *cls, const struct GNUNET_PeerIdentity *id,
892 if ((num_peers - peers_left) % modnum == 0) 892 if ((num_peers - peers_left) % modnum == 0)
893 { 893 {
894 if (num_peers - peers_left == 0) 894 if (num_peers - peers_left == 0)
895 fprintf (stdout, "0%%"); 895 FPRINTF (stdout, "%s", "0%%");
896 else 896 else
897 fprintf (stdout, "%d%%", 897 FPRINTF (stdout, "%d%%",
898 (int) (((float) (num_peers - peers_left) / num_peers) * 100)); 898 (int) (((float) (num_peers - peers_left) / num_peers) * 100));
899 899
900 } 900 }
901 else if ((num_peers - peers_left) % dotnum == 0) 901 else if ((num_peers - peers_left) % dotnum == 0)
902 { 902 {
903 fprintf (stdout, "."); 903 FPRINTF (stdout, "%s", ".");
904 } 904 }
905 fflush (stdout); 905 fflush (stdout);
906#endif 906#endif
@@ -908,7 +908,7 @@ peers_started_callback (void *cls, const struct GNUNET_PeerIdentity *id,
908 if (peers_left == 0) 908 if (peers_left == 0)
909 { 909 {
910#if PROGRESS_BARS 910#if PROGRESS_BARS
911 fprintf (stdout, "100%%]\n"); 911 FPRINTF (stdout, "%s", "100%%]\n");
912#endif 912#endif
913#if VERBOSE 913#if VERBOSE
914 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 914 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -922,7 +922,7 @@ peers_started_callback (void *cls, const struct GNUNET_PeerIdentity *id,
922 (GNUNET_TIME_UNIT_MINUTES, 8), &end_badly, 922 (GNUNET_TIME_UNIT_MINUTES, 8), &end_badly,
923 "from peers_started_callback"); 923 "from peers_started_callback");
924#if DELAY_FOR_LOGGING 924#if DELAY_FOR_LOGGING
925 fprintf (stdout, "Connecting topology in 10 seconds\n"); 925 FPRINTF (stdout, "%s", "Connecting topology in 10 seconds\n");
926 gather_log_data (); 926 gather_log_data ();
927 GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply 927 GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply
928 (GNUNET_TIME_UNIT_SECONDS, 10), 928 (GNUNET_TIME_UNIT_SECONDS, 10),
@@ -962,15 +962,15 @@ hostkey_callback (void *cls, const struct GNUNET_PeerIdentity *id,
962 if ((num_peers - peers_left) % modnum == 0) 962 if ((num_peers - peers_left) % modnum == 0)
963 { 963 {
964 if (num_peers - peers_left == 0) 964 if (num_peers - peers_left == 0)
965 fprintf (stdout, "0%%"); 965 FPRINTF (stdout, "%s", "0%%");
966 else 966 else
967 fprintf (stdout, "%d%%", 967 FPRINTF (stdout, "%d%%",
968 (int) (((float) (num_peers - peers_left) / num_peers) * 100)); 968 (int) (((float) (num_peers - peers_left) / num_peers) * 100));
969 969
970 } 970 }
971 else if ((num_peers - peers_left) % dotnum == 0) 971 else if ((num_peers - peers_left) % dotnum == 0)
972 { 972 {
973 fprintf (stdout, "."); 973 FPRINTF (stdout, "%s", ".");
974 } 974 }
975 fflush (stdout); 975 fflush (stdout);
976#endif 976#endif
@@ -978,7 +978,7 @@ hostkey_callback (void *cls, const struct GNUNET_PeerIdentity *id,
978 if (peers_left == 0) 978 if (peers_left == 0)
979 { 979 {
980#if PROGRESS_BARS 980#if PROGRESS_BARS
981 fprintf (stdout, "100%%]\n"); 981 FPRINTF (stdout, "%s", "100%%]\n");
982 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 982 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
983 "All %d hostkeys created, now creating topology!\n", num_peers); 983 "All %d hostkeys created, now creating topology!\n", num_peers);
984#endif 984#endif
@@ -1009,7 +1009,7 @@ run (void *cls, char *const *args, const char *cfgfile,
1009 dotOutFile = fopen (dotOutFileName, "w"); 1009 dotOutFile = fopen (dotOutFileName, "w");
1010 if (dotOutFile != NULL) 1010 if (dotOutFile != NULL)
1011 { 1011 {
1012 fprintf (dotOutFile, "strict graph G {\n"); 1012 FPRINTF (dotOutFile, "%s", "strict graph G {\n");
1013 } 1013 }
1014 1014
1015#if VERBOSE 1015#if VERBOSE
@@ -1156,7 +1156,7 @@ run (void *cls, char *const *args, const char *cfgfile,
1156 if (dotnum == 0) 1156 if (dotnum == 0)
1157 dotnum = 1; 1157 dotnum = 1;
1158#if PROGRESS_BARS 1158#if PROGRESS_BARS
1159 fprintf (stdout, "Hostkey generation progress: ["); 1159 FPRINTF (stdout, "%s", "Hostkey generation progress: [");
1160#endif 1160#endif
1161 /* Set up a task to end testing if peer start fails */ 1161 /* Set up a task to end testing if peer start fails */
1162 die_task = 1162 die_task =
diff --git a/src/testing/test_testing_topology_blacklist.c b/src/testing/test_testing_topology_blacklist.c
index 095c5b2a2..9ff1fcbaa 100644
--- a/src/testing/test_testing_topology_blacklist.c
+++ b/src/testing/test_testing_topology_blacklist.c
@@ -142,7 +142,7 @@ finish_testing ()
142#endif 142#endif
143 if (dotOutFile != NULL) 143 if (dotOutFile != NULL)
144 { 144 {
145 fprintf (dotOutFile, "}"); 145 FPRINTF (dotOutFile, "%s", "}");
146 fclose (dotOutFile); 146 fclose (dotOutFile);
147 } 147 }
148 148
@@ -167,7 +167,7 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
167 167
168 if (dotOutFile != NULL) 168 if (dotOutFile != NULL)
169 { 169 {
170 fprintf (dotOutFile, "}"); 170 FPRINTF (dotOutFile, "%s", "}");
171 fclose (dotOutFile); 171 fclose (dotOutFile);
172 } 172 }
173} 173}
@@ -191,7 +191,7 @@ topology_callback (void *cls, const struct GNUNET_PeerIdentity *first,
191 first_daemon->shortname, second_daemon->shortname); 191 first_daemon->shortname, second_daemon->shortname);
192#endif 192#endif
193 if (dotOutFile != NULL) 193 if (dotOutFile != NULL)
194 fprintf (dotOutFile, "\tn%s -- n%s;\n", first_daemon->shortname, 194 FPRINTF (dotOutFile, "\tn%s -- n%s;\n", first_daemon->shortname,
195 second_daemon->shortname); 195 second_daemon->shortname);
196 } 196 }
197 197
@@ -399,7 +399,7 @@ run (void *cls, char *const *args, const char *cfgfile,
399 dotOutFile = fopen (dotOutFileName, "w"); 399 dotOutFile = fopen (dotOutFileName, "w");
400 if (dotOutFile != NULL) 400 if (dotOutFile != NULL)
401 { 401 {
402 fprintf (dotOutFile, "strict graph G {\n"); 402 FPRINTF (dotOutFile, "%s", "strict graph G {\n");
403 } 403 }
404 404
405#if VERBOSE 405#if VERBOSE
diff --git a/src/testing/testing_group.c b/src/testing/testing_group.c
index f56c51381..4f67179c1 100644
--- a/src/testing/testing_group.c
+++ b/src/testing/testing_group.c
@@ -1115,17 +1115,17 @@ update_meter (struct ProgressMeter *meter)
1115 { 1115 {
1116 if (meter->completed == 0) 1116 if (meter->completed == 0)
1117 { 1117 {
1118 fprintf (stdout, "%sProgress: [0%%", meter->startup_string); 1118 FPRINTF (stdout, "%sProgress: [0%%", meter->startup_string);
1119 } 1119 }
1120 else 1120 else
1121 fprintf (stdout, "%d%%", 1121 FPRINTF (stdout, "%d%%",
1122 (int) (((float) meter->completed / meter->total) * 100)); 1122 (int) (((float) meter->completed / meter->total) * 100));
1123 } 1123 }
1124 else if (meter->completed % meter->dotnum == 0) 1124 else if (meter->completed % meter->dotnum == 0)
1125 fprintf (stdout, "."); 1125 FPRINTF (stdout, "%s", ".");
1126 1126
1127 if (meter->completed + 1 == meter->total) 1127 if (meter->completed + 1 == meter->total)
1128 fprintf (stdout, "%d%%]\n", 100); 1128 FPRINTF (stdout, "%d%%]\n", 100);
1129 fflush (stdout); 1129 fflush (stdout);
1130 } 1130 }
1131 meter->completed++; 1131 meter->completed++;
@@ -2810,7 +2810,7 @@ friend_file_iterator (void *cls, const GNUNET_HashCode * key, void *value)
2810 2810
2811 temppeer = &peer->id; 2811 temppeer = &peer->id;
2812 GNUNET_CRYPTO_hash_to_enc (&temppeer->hashPubKey, &peer_enc); 2812 GNUNET_CRYPTO_hash_to_enc (&temppeer->hashPubKey, &peer_enc);
2813 fprintf (temp_friend_handle, "%s\n", (char *) &peer_enc); 2813 FPRINTF (temp_friend_handle, "%s\n", (char *) &peer_enc);
2814 2814
2815 return GNUNET_YES; 2815 return GNUNET_YES;
2816} 2816}
@@ -2849,7 +2849,7 @@ blacklist_file_iterator (void *cls, const GNUNET_HashCode * key, void *value)
2849 GNUNET_CRYPTO_hash_to_enc (&temppeer->hashPubKey, &peer_enc); 2849 GNUNET_CRYPTO_hash_to_enc (&temppeer->hashPubKey, &peer_enc);
2850 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Writing entry %s:%s to file\n", 2850 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Writing entry %s:%s to file\n",
2851 blacklist_ctx->transport, (char *) &peer_enc); 2851 blacklist_ctx->transport, (char *) &peer_enc);
2852 fprintf (blacklist_ctx->temp_file_handle, "%s:%s\n", blacklist_ctx->transport, 2852 FPRINTF (blacklist_ctx->temp_file_handle, "%s:%s\n", blacklist_ctx->transport,
2853 (char *) &peer_enc); 2853 (char *) &peer_enc);
2854 2854
2855 return GNUNET_YES; 2855 return GNUNET_YES;
@@ -2899,7 +2899,7 @@ create_and_copy_friend_files (struct GNUNET_TESTING_PeerGroup *pg)
2899 { 2899 {
2900 GNUNET_CRYPTO_hash_to_enc (&pg->peers[conn_iter->index].daemon-> 2900 GNUNET_CRYPTO_hash_to_enc (&pg->peers[conn_iter->index].daemon->
2901 id.hashPubKey, &peer_enc); 2901 id.hashPubKey, &peer_enc);
2902 fprintf (temp_friend_handle, "%s\n", (char *) &peer_enc); 2902 FPRINTF (temp_friend_handle, "%s\n", (char *) &peer_enc);
2903 conn_iter = conn_iter->next; 2903 conn_iter = conn_iter->next;
2904 } 2904 }
2905#else 2905#else
@@ -3086,7 +3086,7 @@ create_and_copy_blacklist_files (struct GNUNET_TESTING_PeerGroup *pg,
3086 { 3086 {
3087 GNUNET_CRYPTO_hash_to_enc (&pg->peers[conn_iter->index].daemon-> 3087 GNUNET_CRYPTO_hash_to_enc (&pg->peers[conn_iter->index].daemon->
3088 id.hashPubKey, &peer_enc); 3088 id.hashPubKey, &peer_enc);
3089 fprintf (temp_file_handle, "%s:%s\n", pos, (char *) &peer_enc); 3089 FPRINTF (temp_file_handle, "%s:%s\n", pos, (char *) &peer_enc);
3090 conn_iter = conn_iter->next; 3090 conn_iter = conn_iter->next;
3091 } 3091 }
3092#else 3092#else
diff --git a/src/testing/testing_peergroup.c b/src/testing/testing_peergroup.c
index bf69a7fc8..a34cb5abe 100644
--- a/src/testing/testing_peergroup.c
+++ b/src/testing/testing_peergroup.c
@@ -210,17 +210,17 @@ update_meter (struct ProgressMeter *meter)
210 { 210 {
211 if (meter->completed == 0) 211 if (meter->completed == 0)
212 { 212 {
213 fprintf (stdout, "%sProgress: [0%%", meter->startup_string); 213 FPRINTF (stdout, "%sProgress: [0%%", meter->startup_string);
214 } 214 }
215 else 215 else
216 fprintf (stdout, "%d%%", 216 FPRINTF (stdout, "%d%%",
217 (int) (((float) meter->completed / meter->total) * 100)); 217 (int) (((float) meter->completed / meter->total) * 100));
218 } 218 }
219 else if (meter->completed % meter->dotnum == 0) 219 else if (meter->completed % meter->dotnum == 0)
220 fprintf (stdout, "."); 220 FPRINTF (stdout, "%s", ".");
221 221
222 if (meter->completed + 1 == meter->total) 222 if (meter->completed + 1 == meter->total)
223 fprintf (stdout, "%d%%]\n", 100); 223 FPRINTF (stdout, "%d%%]\n", 100);
224 fflush (stdout); 224 fflush (stdout);
225 } 225 }
226 meter->completed++; 226 meter->completed++;