aboutsummaryrefslogtreecommitdiff
path: root/src/testing/testing.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/testing/testing.c')
-rw-r--r--src/testing/testing.c36
1 files changed, 14 insertions, 22 deletions
diff --git a/src/testing/testing.c b/src/testing/testing.c
index 23bc40d7e..9724fb55b 100644
--- a/src/testing/testing.c
+++ b/src/testing/testing.c
@@ -38,12 +38,6 @@
38 38
39 39
40/** 40/**
41 * We need pipe control only on WINDOWS
42 */
43#define PIPE_CONTROL GNUNET_NO
44
45
46/**
47 * Lowest port used for GNUnet testing. Should be high enough to not 41 * Lowest port used for GNUnet testing. Should be high enough to not
48 * conflict with other applications running on the hosts but be low 42 * conflict with other applications running on the hosts but be low
49 * enough to not conflict with client-ports (typically starting around 43 * enough to not conflict with client-ports (typically starting around
@@ -473,8 +467,8 @@ cleanup_shared_service_instance (struct SharedServiceInstance *i)
473 (void) unlink (i->cfg_fn); 467 (void) unlink (i->cfg_fn);
474 GNUNET_free (i->cfg_fn); 468 GNUNET_free (i->cfg_fn);
475 } 469 }
476 GNUNET_free_non_null (i->unix_sock); 470 GNUNET_free (i->unix_sock);
477 GNUNET_free_non_null (i->port_str); 471 GNUNET_free (i->port_str);
478 GNUNET_break (NULL == i->proc); 472 GNUNET_break (NULL == i->proc);
479 GNUNET_break (0 == i->n_refs); 473 GNUNET_break (0 == i->n_refs);
480 GNUNET_free (i); 474 GNUNET_free (i);
@@ -492,8 +486,7 @@ start_shared_service_instance (struct SharedServiceInstance *i)
492 (void) GNUNET_asprintf (&binary, "gnunet-service-%s", i->ss->sname); 486 (void) GNUNET_asprintf (&binary, "gnunet-service-%s", i->ss->sname);
493 libexec_binary = GNUNET_OS_get_libexec_binary_path (binary); 487 libexec_binary = GNUNET_OS_get_libexec_binary_path (binary);
494 GNUNET_free (binary); 488 GNUNET_free (binary);
495 i->proc = GNUNET_OS_start_process (PIPE_CONTROL, 489 i->proc = GNUNET_OS_start_process (GNUNET_OS_INHERIT_STD_OUT_AND_ERR,
496 GNUNET_OS_INHERIT_STD_OUT_AND_ERR,
497 NULL, 490 NULL,
498 NULL, 491 NULL,
499 NULL, 492 NULL,
@@ -551,17 +544,17 @@ GNUNET_TESTING_system_destroy (struct GNUNET_TESTING_System *system,
551 stop_shared_service_instance (i); 544 stop_shared_service_instance (i);
552 cleanup_shared_service_instance (i); 545 cleanup_shared_service_instance (i);
553 } 546 }
554 GNUNET_free_non_null (ss->instances); 547 GNUNET_free (ss->instances);
555 GNUNET_CONFIGURATION_destroy (ss->cfg); 548 GNUNET_CONFIGURATION_destroy (ss->cfg);
556 GNUNET_free (ss->sname); 549 GNUNET_free (ss->sname);
557 GNUNET_free (ss); 550 GNUNET_free (ss);
558 } 551 }
559 GNUNET_free_non_null (system->shared_services); 552 GNUNET_free (system->shared_services);
560 if (GNUNET_YES == remove_paths) 553 if (GNUNET_YES == remove_paths)
561 GNUNET_DISK_directory_remove (system->tmppath); 554 GNUNET_DISK_directory_remove (system->tmppath);
562 GNUNET_free (system->tmppath); 555 GNUNET_free (system->tmppath);
563 GNUNET_free_non_null (system->trusted_ip); 556 GNUNET_free (system->trusted_ip);
564 GNUNET_free_non_null (system->hostname); 557 GNUNET_free (system->hostname);
565 GNUNET_free (system); 558 GNUNET_free (system);
566} 559}
567 560
@@ -957,7 +950,7 @@ update_config_sections (void *cls, const char *section)
957 } 950 }
958 GNUNET_free (ikeys); 951 GNUNET_free (ikeys);
959 } 952 }
960 GNUNET_free_non_null (val); 953 GNUNET_free (val);
961 ACCEPT_FROM_key = "ACCEPT_FROM"; 954 ACCEPT_FROM_key = "ACCEPT_FROM";
962 if ((NULL != uc->system->trusted_ip) && 955 if ((NULL != uc->system->trusted_ip) &&
963 (NULL != strstr (uc->system->trusted_ip, ":"))) /* IPv6 in use */ 956 (NULL != strstr (uc->system->trusted_ip, ":"))) /* IPv6 in use */
@@ -1120,7 +1113,7 @@ GNUNET_TESTING_configuration_create_ (struct GNUNET_TESTING_System *system,
1120 *nports = uc.nports; 1113 *nports = uc.nports;
1121 } 1114 }
1122 else 1115 else
1123 GNUNET_free_non_null (uc.ports); 1116 GNUNET_free (uc.ports);
1124 return uc.status; 1117 return uc.status;
1125} 1118}
1126 1119
@@ -1316,8 +1309,8 @@ GNUNET_TESTING_peer_configure (struct GNUNET_TESTING_System *system,
1316 return peer; 1309 return peer;
1317 1310
1318err_ret: 1311err_ret:
1319 GNUNET_free_non_null (ss_instances); 1312 GNUNET_free (ss_instances);
1320 GNUNET_free_non_null (ports); 1313 GNUNET_free (ports);
1321 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%s", emsg_); 1314 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%s", emsg_);
1322 if (NULL != emsg) 1315 if (NULL != emsg)
1323 *emsg = emsg_; 1316 *emsg = emsg_;
@@ -1378,8 +1371,7 @@ GNUNET_TESTING_peer_start (struct GNUNET_TESTING_Peer *peer)
1378 peer->main_binary = 1371 peer->main_binary =
1379 GNUNET_CONFIGURATION_expand_dollar (peer->cfg, peer->main_binary); 1372 GNUNET_CONFIGURATION_expand_dollar (peer->cfg, peer->main_binary);
1380 peer->main_process = 1373 peer->main_process =
1381 GNUNET_OS_start_process_s (PIPE_CONTROL, 1374 GNUNET_OS_start_process_s (GNUNET_OS_INHERIT_STD_OUT_AND_ERR,
1382 GNUNET_OS_INHERIT_STD_OUT_AND_ERR,
1383 NULL, 1375 NULL,
1384 peer->main_binary, 1376 peer->main_binary,
1385 peer->args, 1377 peer->args,
@@ -1566,8 +1558,8 @@ GNUNET_TESTING_peer_destroy (struct GNUNET_TESTING_Peer *peer)
1566 GNUNET_CONFIGURATION_destroy (peer->cfg); 1558 GNUNET_CONFIGURATION_destroy (peer->cfg);
1567 GNUNET_free (peer->main_binary); 1559 GNUNET_free (peer->main_binary);
1568 GNUNET_free (peer->args); 1560 GNUNET_free (peer->args);
1569 GNUNET_free_non_null (peer->id); 1561 GNUNET_free (peer->id);
1570 GNUNET_free_non_null (peer->ss_instances); 1562 GNUNET_free (peer->ss_instances);
1571 if (NULL != peer->ports) 1563 if (NULL != peer->ports)
1572 { 1564 {
1573 for (cnt = 0; cnt < peer->nports; cnt++) 1565 for (cnt = 0; cnt < peer->nports; cnt++)