From e8f06b00f51a5d5115460cd4addaefcffe15f747 Mon Sep 17 00:00:00 2001 From: "Nathan S. Evans" Date: Wed, 23 Jun 2010 08:22:49 +0000 Subject: missing null check --- src/testing/Makefile.am | 60 ++++++++++++++++++++++++++++++++++++++++++++++--- src/testing/testing.c | 5 +++-- 2 files changed, 60 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/testing/Makefile.am b/src/testing/Makefile.am index 2cfa330b3..6003e675e 100644 --- a/src/testing/Makefile.am +++ b/src/testing/Makefile.am @@ -25,7 +25,13 @@ check_PROGRAMS = \ test_testing \ test_testing_connect \ test_testing_group \ - test_testing_topology_clique + test_testing_topology_clique \ + test_testing_topology_clique_random \ + test_testing_topology_clique_minimum \ + test_testing_topology_clique_dfs \ + test_testing_topology_churn \ + test_testing_topology_line +# test_testing_topology_blacklist \ # test_testing_group_remote \ # test_testing_topology_ring \ # test_testing_topology_2d_torus \ @@ -39,7 +45,13 @@ TESTS = \ test_testing \ test_testing_connect \ test_testing_group \ - test_testing_topology_clique + test_testing_topology_clique \ + test_testing_topology_clique_random \ + test_testing_topology_clique_minimum \ + test_testing_topology_clique_dfs \ + test_testing_topology_churn \ + test_testing_topology_line +# test_testing_topology_blacklist \ # test_testing_group_remote \ # test_testing_topology_ring \ # test_testing_topology_2d_torus \ @@ -70,8 +82,45 @@ test_testing_group_LDADD = \ test_testing_topology_clique_SOURCES = \ test_testing_topology.c test_testing_topology_clique_LDADD = \ + $(top_builddir)/src/testing/libgnunettesting.la \ + $(top_builddir)/src/util/libgnunetutil.la + +#test_testing_topology_blacklist_SOURCES = \ +# test_testing_topology_blacklist.c +#test_testing_topology_blacklist_LDADD = \ +# $(top_builddir)/src/testing/libgnunettesting.la \ +# $(top_builddir)/src/util/libgnunetutil.la + +test_testing_topology_churn_SOURCES = \ + test_testing_topology_churn.c +test_testing_topology_churn_LDADD = \ + $(top_builddir)/src/testing/libgnunettesting.la \ + $(top_builddir)/src/util/libgnunetutil.la + +test_testing_topology_clique_random_SOURCES = \ + test_testing_topology.c +test_testing_topology_clique_random_LDADD = \ + $(top_builddir)/src/testing/libgnunettesting.la \ + $(top_builddir)/src/util/libgnunetutil.la + +test_testing_topology_clique_minimum_SOURCES = \ + test_testing_topology.c +test_testing_topology_clique_minimum_LDADD = \ + $(top_builddir)/src/testing/libgnunettesting.la \ + $(top_builddir)/src/util/libgnunetutil.la + +test_testing_topology_clique_dfs_SOURCES = \ + test_testing_topology.c +test_testing_topology_clique_dfs_LDADD = \ + $(top_builddir)/src/testing/libgnunettesting.la \ + $(top_builddir)/src/util/libgnunetutil.la + +test_testing_topology_line_SOURCES = \ + test_testing_topology.c +test_testing_topology_line_LDADD = \ $(top_builddir)/src/testing/libgnunettesting.la \ $(top_builddir)/src/util/libgnunetutil.la + #test_testing_group_remote_SOURCES = \ # test_testing_group_remote.c @@ -127,11 +176,16 @@ EXTRA_DIST = \ test_testing_connect_peer1.conf \ test_testing_connect_peer2.conf \ test_testing_data_topology_clique.conf \ + test_testing_data_topology_clique_random.conf \ + test_testing_data_topology_clique_minimum.conf \ + test_testing_data_topology_clique_dfs.conf \ test_testing_data_topology_ring.conf \ test_testing_data_topology_2d_torus.conf \ test_testing_data_topology_small_world_ring.conf \ test_testing_data_topology_small_world_torus.conf \ test_testing_data_topology_erdos_renyi.conf \ test_testing_data_topology_internat.conf \ - test_testing_data_topology_scale_free.conf + test_testing_data_topology_scale_free.conf \ + test_testing_data_topology_blacklist.conf \ + test_testing_data_topology_churn.conf diff --git a/src/testing/testing.c b/src/testing/testing.c index 58d09806b..c21650300 100644 --- a/src/testing/testing.c +++ b/src/testing/testing.c @@ -529,8 +529,9 @@ start_fsm (void *cls, { if (GNUNET_TIME_absolute_get_remaining(d->max_timeout).value == 0) { - d->dead_cb (d->dead_cb_cls, - _("either `gnunet-arm' or `ssh' does not seem to terminate.\n")); + if (NULL != d->dead_cb) + d->dead_cb (d->dead_cb_cls, + _("either `gnunet-arm' or `ssh' does not seem to terminate.\n")); if (d->th != NULL) { GNUNET_TRANSPORT_get_hello_cancel(d->th, &process_hello, d); -- cgit v1.2.3