From cc7582e76838292103a9e2d61e4cddcc8a30b6bb Mon Sep 17 00:00:00 2001 From: Sree Harsha Totakura Date: Tue, 30 Apr 2013 12:19:35 +0000 Subject: [PATCH] - mesh test case to show it doesn't respond to shutdown --- src/stream/Makefile.am | 8 +++++++- src/stream/mesh-test.c | 31 +++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 src/stream/mesh-test.c diff --git a/src/stream/Makefile.am b/src/stream/Makefile.am index 099469711..c42f752bf 100644 --- a/src/stream/Makefile.am +++ b/src/stream/Makefile.am @@ -33,6 +33,7 @@ check_PROGRAMS = \ test_stream_local \ test_stream_big \ test_stream_sequence_wraparound \ + mesh-test \ $(STREAM_BENCHMARKS) EXTRA_DIST = test_stream_local.conf @@ -89,4 +90,9 @@ perf_stream_api_LDADD = \ $(top_builddir)/src/stream/libgnunetstream.la \ $(top_builddir)/src/util/libgnunetutil.la \ $(top_builddir)/src/testing/libgnunettesting.la \ - $(top_builddir)/src/testbed/libgnunettestbed.la \ No newline at end of file + $(top_builddir)/src/testbed/libgnunettestbed.la + +mesh_test_SOURCES = mesh-test.c +mesh_test_LDADD = \ + $(top_builddir)/src/mesh/libgnunetmesh.la \ + $(top_builddir)/src/util/libgnunetutil.la \ No newline at end of file diff --git a/src/stream/mesh-test.c b/src/stream/mesh-test.c new file mode 100644 index 000000000..eb9594a9f --- /dev/null +++ b/src/stream/mesh-test.c @@ -0,0 +1,31 @@ +#include "platform.h" +#include "gnunet_common.h" +#include "gnunet_util_lib.h" +#include "gnunet_mesh_service.h" + +static void +run (void *cls, char *const *args, + const char *cfgfile, + const struct GNUNET_CONFIGURATION_Handle *cfg) +{ + struct GNUNET_MESH_Handle *m; + + m = GNUNET_MESH_connect (cfg, /* the configuration handle */ + socket, /* cls */ + NULL, /* No inbound tunnel handler */ + NULL, /* No in-tunnel cleaner */ + NULL, + NULL); /* We don't get inbound tunnels */ +} + +int +main (int argc, char **argv) +{ + static const struct GNUNET_GETOPT_CommandLineOption options[] = { + GNUNET_GETOPT_OPTION_END + }; + GNUNET_PROGRAM_run (argc, argv, "mesh-test", + "help", + options, &run, NULL); + return 0; +} -- 2.25.1