aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2010-06-28 10:47:50 +0000
committerChristian Grothoff <christian@grothoff.org>2010-06-28 10:47:50 +0000
commitb917264c966ab8a8fa8476ebc7d718dcea8f4143 (patch)
treea3f170889774cec8099e675ab3bf38232c74ed13
parent30fd6fcf51409d4adcb4372c8360eaa235919670 (diff)
downloadgnunet-b917264c966ab8a8fa8476ebc7d718dcea8f4143.tar.gz
gnunet-b917264c966ab8a8fa8476ebc7d718dcea8f4143.zip
eliminating testbed API that was never implemented and is not needed
-rw-r--r--src/include/gnunet_testing_lib.h68
-rw-r--r--src/testing/Makefile.am3
-rw-r--r--src/testing/testing_testbed.c119
3 files changed, 1 insertions, 189 deletions
diff --git a/src/include/gnunet_testing_lib.h b/src/include/gnunet_testing_lib.h
index 3524b1c86..627a90694 100644
--- a/src/include/gnunet_testing_lib.h
+++ b/src/include/gnunet_testing_lib.h
@@ -769,74 +769,6 @@ GNUNET_TESTING_daemons_vary (struct GNUNET_TESTING_PeerGroup *pg,
769 void *cb_cls); 769 void *cb_cls);
770 770
771 771
772/**
773 * Start "count" GNUnet daemons with a particular topology.
774 *
775 * @param sched scheduler to use
776 * @param cfg configuration template to use
777 * @param count number of peers the testbed should have
778 * @param topology desired topology (enforced via F2F)
779 * @param cb function to call on each daemon that was started
780 * @param cb_cls closure for cb
781 * @param hostname where to run the peers; can be NULL (to run
782 * everything on localhost). Additional
783 * hosts can be specified using a NULL-terminated list of
784 * varargs, hosts will then be used round-robin from that
785 * list.
786 * @return handle to control the testbed
787 */
788struct GNUNET_TESTING_Testbed *
789GNUNET_TESTING_testbed_start (struct GNUNET_SCHEDULER_Handle *sched,
790 const struct GNUNET_CONFIGURATION_Handle *cfg,
791 unsigned int count,
792 enum GNUNET_TESTING_Topology topology,
793 GNUNET_TESTING_NotifyDaemonRunning cb,
794 void *cb_cls,
795 const char *hostname,
796 ...);
797
798
799/**
800 * Stop all of the daemons started with the start function.
801 *
802 * @param tb handle for the testbed
803 * @param cb function to call when done
804 * @param cb_cls closure for cb
805 */
806void
807GNUNET_TESTING_testbed_stop (struct GNUNET_TESTING_Testbed *tb,
808 GNUNET_TESTING_NotifyCompletion cb,
809 void *cb_cls );
810
811
812/**
813 * Simulate churn in the testbed by stopping some peers (and possibly
814 * re-starting others if churn is called multiple times). This
815 * function can only be used to create leave-join churn (peers "never"
816 * leave for good). First "voff" random peers that are currently
817 * online will be taken offline; then "von" random peers that are then
818 * offline will be put back online. No notifications will be
819 * generated for any of these operations except for the callback upon
820 * completion. Note that the implementation is at liberty to keep
821 * the ARM service itself (but none of the other services or daemons)
822 * running even though the "peer" is being varied offline.
823 *
824 * @param tb handle for the testbed
825 * @param voff number of peers that should go offline
826 * @param von number of peers that should come back online;
827 * must be zero on first call (since "testbed_start"
828 * always starts all of the peers)
829 * @param cb function to call at the end
830 * @param cb_cls closure for cb
831 */
832void
833GNUNET_TESTING_testbed_churn (struct GNUNET_TESTING_Testbed *tb,
834 unsigned int voff,
835 unsigned int von,
836 GNUNET_TESTING_NotifyCompletion cb,
837 void *cb_cls);
838
839
840#if 0 /* keep Emacsens' auto-indent happy */ 772#if 0 /* keep Emacsens' auto-indent happy */
841{ 773{
842#endif 774#endif
diff --git a/src/testing/Makefile.am b/src/testing/Makefile.am
index ec6c739b8..163b4f9c9 100644
--- a/src/testing/Makefile.am
+++ b/src/testing/Makefile.am
@@ -13,8 +13,7 @@ lib_LTLIBRARIES = libgnunettesting.la
13 13
14libgnunettesting_la_SOURCES = \ 14libgnunettesting_la_SOURCES = \
15 testing.c \ 15 testing.c \
16 testing_group.c \ 16 testing_group.c
17 testing_testbed.c
18libgnunettesting_la_LIBADD = $(XLIB) \ 17libgnunettesting_la_LIBADD = $(XLIB) \
19 $(top_builddir)/src/core/libgnunetcore.la \ 18 $(top_builddir)/src/core/libgnunetcore.la \
20 $(top_builddir)/src/transport/libgnunettransport.la \ 19 $(top_builddir)/src/transport/libgnunettransport.la \
diff --git a/src/testing/testing_testbed.c b/src/testing/testing_testbed.c
deleted file mode 100644
index 3d973da77..000000000
--- a/src/testing/testing_testbed.c
+++ /dev/null
@@ -1,119 +0,0 @@
1/*
2 This file is part of GNUnet
3 (C) 2008, 2009 Christian Grothoff (and other contributing authors)
4
5 GNUnet is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published
7 by the Free Software Foundation; either version 2, or (at your
8 option) any later version.
9
10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with GNUnet; see the file COPYING. If not, write to the
17 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA.
19 */
20
21/**
22 * @file testing/testing_testbed.c
23 * @brief convenience API for writing testcases for GNUnet
24 * Many testcases need to start and stop gnunetd,
25 * and this library is supposed to make that easier
26 * for TESTCASES. Normal programs should always
27 * use functions from gnunet_{util,arm}_lib.h. This API is
28 * ONLY for writing testcases!
29 * @author Christian Grothoff
30 */
31#include "platform.h"
32#include "gnunet_arm_service.h"
33#include "gnunet_testing_lib.h"
34
35
36/**
37 * Handle to an entire testbed of GNUnet peers.
38 */
39struct GNUNET_TESTING_Testbed
40{
41};
42
43
44/**
45 * Start "count" GNUnet daemons with a particular topology.
46 *
47 * @param sched scheduler to use
48 * @param cfg configuration template to use
49 * @param count number of peers the testbed should have
50 * @param topology desired topology (enforced via F2F)
51 * @param cb function to call on each daemon that was started
52 * @param cb_cls closure for cb
53 * @param hostname where to run the peers; can be NULL (to run
54 * everything on localhost). Additional
55 * hosts can be specified using a NULL-terminated list of
56 * varargs, hosts will then be used round-robin from that
57 * list.
58 * @return handle to control the testbed
59 */
60struct GNUNET_TESTING_Testbed *
61GNUNET_TESTING_testbed_start (struct GNUNET_SCHEDULER_Handle *sched,
62 const struct GNUNET_CONFIGURATION_Handle *cfg,
63 unsigned int count,
64 enum GNUNET_TESTING_Topology topology,
65 GNUNET_TESTING_NotifyDaemonRunning cb,
66 void *cb_cls, const char *hostname, ...)
67{
68 GNUNET_break (0);
69 return NULL;
70}
71
72
73/**
74 * Stop all of the daemons started with the start function.
75 *
76 * @param tb handle for the testbed
77 * @param cb function to call when done
78 * @param cb_cls closure for cb
79 */
80void
81GNUNET_TESTING_testbed_stop (struct GNUNET_TESTING_Testbed *tb,
82 GNUNET_TESTING_NotifyCompletion cb, void *cb_cls)
83{
84 GNUNET_break (0);
85}
86
87
88/**
89 * Simulate churn in the testbed by stopping some peers (and possibly
90 * re-starting others if churn is called multiple times). This
91 * function can only be used to create leave-join churn (peers "never"
92 * leave for good). First "voff" random peers that are currently
93 * online will be taken offline; then "von" random peers that are then
94 * offline will be put back online. No notifications will be
95 * generated for any of these operations except for the callback upon
96 * completion. Note that the implementation is at liberty to keep
97 * the ARM service itself (but none of the other services or daemons)
98 * running even though the "peer" is being varied offline.
99 *
100 * @param tb handle for the testbed
101 * @param voff number of peers that should go offline
102 * @param von number of peers that should come back online;
103 * must be zero on first call (since "testbed_start"
104 * always starts all of the peers)
105 * @param cb function to call at the end
106 * @param cb_cls closure for cb
107 */
108void
109GNUNET_TESTING_testbed_churn (struct GNUNET_TESTING_Testbed *tb,
110 unsigned int voff,
111 unsigned int von,
112 GNUNET_TESTING_NotifyCompletion cb,
113 void *cb_cls)
114{
115 GNUNET_break (0);
116}
117
118
119/* end of testing_testbed.c */