diff options
author | Sree Harsha Totakura <totakura@in.tum.de> | 2013-04-30 12:19:35 +0000 |
---|---|---|
committer | Sree Harsha Totakura <totakura@in.tum.de> | 2013-04-30 12:19:35 +0000 |
commit | cc7582e76838292103a9e2d61e4cddcc8a30b6bb (patch) | |
tree | d52db77ceb256bbbd29d7f738af7aeaae6ced719 /src/stream | |
parent | 27b6c3cd3b39634ecb635c0faebc39a26141417e (diff) | |
download | gnunet-cc7582e76838292103a9e2d61e4cddcc8a30b6bb.tar.gz gnunet-cc7582e76838292103a9e2d61e4cddcc8a30b6bb.zip |
- mesh test case to show it doesn't respond to shutdown
Diffstat (limited to 'src/stream')
-rw-r--r-- | src/stream/Makefile.am | 8 | ||||
-rw-r--r-- | src/stream/mesh-test.c | 31 |
2 files changed, 38 insertions, 1 deletions
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 = \ | |||
33 | test_stream_local \ | 33 | test_stream_local \ |
34 | test_stream_big \ | 34 | test_stream_big \ |
35 | test_stream_sequence_wraparound \ | 35 | test_stream_sequence_wraparound \ |
36 | mesh-test \ | ||
36 | $(STREAM_BENCHMARKS) | 37 | $(STREAM_BENCHMARKS) |
37 | 38 | ||
38 | EXTRA_DIST = test_stream_local.conf | 39 | EXTRA_DIST = test_stream_local.conf |
@@ -89,4 +90,9 @@ perf_stream_api_LDADD = \ | |||
89 | $(top_builddir)/src/stream/libgnunetstream.la \ | 90 | $(top_builddir)/src/stream/libgnunetstream.la \ |
90 | $(top_builddir)/src/util/libgnunetutil.la \ | 91 | $(top_builddir)/src/util/libgnunetutil.la \ |
91 | $(top_builddir)/src/testing/libgnunettesting.la \ | 92 | $(top_builddir)/src/testing/libgnunettesting.la \ |
92 | $(top_builddir)/src/testbed/libgnunettestbed.la \ No newline at end of file | 93 | $(top_builddir)/src/testbed/libgnunettestbed.la |
94 | |||
95 | mesh_test_SOURCES = mesh-test.c | ||
96 | mesh_test_LDADD = \ | ||
97 | $(top_builddir)/src/mesh/libgnunetmesh.la \ | ||
98 | $(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 @@ | |||
1 | #include "platform.h" | ||
2 | #include "gnunet_common.h" | ||
3 | #include "gnunet_util_lib.h" | ||
4 | #include "gnunet_mesh_service.h" | ||
5 | |||
6 | static void | ||
7 | run (void *cls, char *const *args, | ||
8 | const char *cfgfile, | ||
9 | const struct GNUNET_CONFIGURATION_Handle *cfg) | ||
10 | { | ||
11 | struct GNUNET_MESH_Handle *m; | ||
12 | |||
13 | m = GNUNET_MESH_connect (cfg, /* the configuration handle */ | ||
14 | socket, /* cls */ | ||
15 | NULL, /* No inbound tunnel handler */ | ||
16 | NULL, /* No in-tunnel cleaner */ | ||
17 | NULL, | ||
18 | NULL); /* We don't get inbound tunnels */ | ||
19 | } | ||
20 | |||
21 | int | ||
22 | main (int argc, char **argv) | ||
23 | { | ||
24 | static const struct GNUNET_GETOPT_CommandLineOption options[] = { | ||
25 | GNUNET_GETOPT_OPTION_END | ||
26 | }; | ||
27 | GNUNET_PROGRAM_run (argc, argv, "mesh-test", | ||
28 | "help", | ||
29 | options, &run, NULL); | ||
30 | return 0; | ||
31 | } | ||