[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r26634 - gnunet/src/dv
From: |
gnunet |
Subject: |
[GNUnet-SVN] r26634 - gnunet/src/dv |
Date: |
Thu, 28 Mar 2013 13:21:29 +0100 |
Author: grothoff
Date: 2013-03-28 13:21:29 +0100 (Thu, 28 Mar 2013)
New Revision: 26634
Added:
gnunet/src/dv/test_transport_blacklist.c
gnunet/src/dv/test_transport_blacklist_data.conf
gnunet/src/dv/test_transport_dv.c
Removed:
gnunet/src/dv/test_transport_api_dv.c
Modified:
gnunet/src/dv/Makefile.am
gnunet/src/dv/test_transport_dv_data.conf
Log:
-adding blacklist test to check that as well
Modified: gnunet/src/dv/Makefile.am
===================================================================
--- gnunet/src/dv/Makefile.am 2013-03-28 12:15:08 UTC (rev 26633)
+++ gnunet/src/dv/Makefile.am 2013-03-28 12:21:29 UTC (rev 26634)
@@ -66,21 +66,31 @@
libgnunetdv.la
check_PROGRAMS = \
- test_transport_api_dv
+ test_transport_blacklist \
+ test_transport_dv
if ENABLE_TEST_RUN
TESTS = $(check_PROGRAMS)
endif
-test_transport_api_dv_SOURCES = \
- test_transport_api_dv.c
-test_transport_api_dv_LDADD = \
+test_transport_dv_SOURCES = \
+ test_transport_dv.c
+test_transport_dv_LDADD = \
$(top_builddir)/src/testbed/libgnunettestbed.la \
$(top_builddir)/src/core/libgnunetcore.la \
$(top_builddir)/src/transport/libgnunettransport.la \
$(top_builddir)/src/util/libgnunetutil.la
+test_transport_blacklist_SOURCES = \
+ test_transport_blacklist.c
+test_transport_blacklist_LDADD = \
+ $(top_builddir)/src/testbed/libgnunettestbed.la \
+ $(top_builddir)/src/core/libgnunetcore.la \
+ $(top_builddir)/src/transport/libgnunettransport.la \
+ $(top_builddir)/src/util/libgnunetutil.la
+
EXTRA_DIST = \
- test_transport_dv_data.conf
+ test_transport_dv_data.conf \
+ test_transport_blacklist_data.conf
Deleted: gnunet/src/dv/test_transport_api_dv.c
===================================================================
--- gnunet/src/dv/test_transport_api_dv.c 2013-03-28 12:15:08 UTC (rev
26633)
+++ gnunet/src/dv/test_transport_api_dv.c 2013-03-28 12:21:29 UTC (rev
26634)
@@ -1,65 +0,0 @@
-/*
- This file is part of GNUnet.
- (C) 2009 Christian Grothoff (and other contributing authors)
-
- GNUnet is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published
- by the Free Software Foundation; either version 3, or (at your
- option) any later version.
-
- GNUnet is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GNUnet; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA.
-*/
-/**
- * @file dv/test_transport_api_dv.c
- * @brief base testcase for testing distance vector transport
- */
-#include "platform.h"
-#include "gnunet_core_service.h"
-#include "gnunet_testbed_service.h"
-
-/**
- * Return value from main, set to 0 on success.
- */
-static int ok;
-
-
-static void
-test_connection (void *cls,
- unsigned int num_peers,
- struct GNUNET_TESTBED_Peer **peers)
-{
- if (4 != num_peers)
- {
- fprintf (stderr, "Testbed failed to connect peers\n");
- GNUNET_SCHEDULER_shutdown ();
- return;
- }
- ok = 0;
- if (0)
- GNUNET_SCHEDULER_shutdown ();
- else
- fprintf (stderr, "Test passed, press CTRL-C to shut down\n");
-}
-
-
-int
-main (int argc, char *argv[])
-{
- ok = 1;
- (void) GNUNET_TESTBED_test_run ("test-transport-api-dv",
- "test_transport_dv_data.conf",
- 4,
- 0, NULL, NULL,
- &test_connection, NULL);
- return ok;
-}
-
-/* end of test_transport_api_dv.c */
Copied: gnunet/src/dv/test_transport_blacklist.c (from rev 26629,
gnunet/src/dv/test_transport_api_dv.c)
===================================================================
--- gnunet/src/dv/test_transport_blacklist.c (rev 0)
+++ gnunet/src/dv/test_transport_blacklist.c 2013-03-28 12:21:29 UTC (rev
26634)
@@ -0,0 +1,63 @@
+/*
+ This file is part of GNUnet.
+ (C) 2009, 2013 Christian Grothoff (and other contributing authors)
+
+ GNUnet is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published
+ by the Free Software Foundation; either version 3, or (at your
+ option) any later version.
+
+ GNUnet is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GNUnet; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+/**
+ * @file dv/test_transport_blacklist.c
+ * @brief base testcase for testing blacklist
+ */
+#include "platform.h"
+#include "gnunet_core_service.h"
+#include "gnunet_testbed_service.h"
+
+/**
+ * Return value from main, set to 0 on success.
+ */
+static int ok;
+
+
+static void
+test_connection (void *cls,
+ unsigned int num_peers,
+ struct GNUNET_TESTBED_Peer **peers)
+{
+ if (4 != num_peers)
+ {
+ ok = 0;
+ }
+ else
+ {
+ fprintf (stderr, "Testbed connect peers despite blacklist!\n");
+ }
+ GNUNET_SCHEDULER_shutdown ();
+}
+
+
+int
+main (int argc, char *argv[])
+{
+ ok = 1;
+ (void) GNUNET_TESTBED_test_run ("test-transport-blacklist",
+ "test_transport_blacklist_data.conf",
+ 4,
+ 0, NULL, NULL,
+ &test_connection, NULL);
+ return ok;
+}
+
+/* end of test_transport_blacklist.c */
Copied: gnunet/src/dv/test_transport_blacklist_data.conf (from rev 26622,
gnunet/src/dv/test_transport_dv_data.conf)
===================================================================
--- gnunet/src/dv/test_transport_blacklist_data.conf
(rev 0)
+++ gnunet/src/dv/test_transport_blacklist_data.conf 2013-03-28 12:21:29 UTC
(rev 26634)
@@ -0,0 +1,68 @@
+[PATHS]
+SERVICEHOME = /tmp/test-gnunet-dv-testing/
+
+[transport]
+PORT = 2565
+PLUGINS = tcp
+
+[arm]
+DEFAULTSERVICES = core
+
+[dv]
+AUTOSTART = YES
+#PREFIX = valgrind
+
+[consensus]
+PREFIX = valgrind
+
+[testbed]
+OVERLAY_TOPOLOGY = CLIQUE
+
+[fs]
+AUTOSTART = NO
+
+[datastore]
+AUTOSTART = NO
+
+[dns]
+AUTOSTART = NO
+
+[nse]
+AUTOSTART = NO
+
+[chat]
+AUTOSTART = NO
+
+[gns]
+AUTOSTART = NO
+
+[vpn]
+AUTOSTART = NO
+
+[namestore]
+AUTOSTART = NO
+
+[lockmanager]
+AUTOSTART = NO
+
+# Topology:
+# 5M-HT
+# HT-P5
+# HT-AG
+# 5M-P5
+# 5M-AG
+# Disallowed: P5-AG => needs DV!
+
+[transport-blacklist-HT3HI3HOVEI05OQANEDN3OELVO8LPS6DDGVI612TKMH0TA1R06NGB197LS0HGSIA4BQVBA93S6PCU4M70NN6GSLLML6ADI2CV5KIIE0]
+
+[transport-blacklist-P565723JO1C2HSN6J29TAQ22MN6CI8HTMUU55T0FUQG4CMDGGEQ8UCNBKUMB94GC8R9G4FB2SF9LDOBAJ6AMINBP4JHHDD6L7VD801G]
+# forbid P565 to talk to AG2P via TCP to force DV @ distance 2
+AG2PHES1BARB9IJCPAMJTFPVJ5V3A72S3F2A8SBUB8DAQ2V0O3V8G6G2JU56FHGFOHMQVKBSQFV98TCGTC3RJ1NINP82G0RC00N1520
= tcp
+
+[transport-blacklist-AG2PHES1BARB9IJCPAMJTFPVJ5V3A72S3F2A8SBUB8DAQ2V0O3V8G6G2JU56FHGFOHMQVKBSQFV98TCGTC3RJ1NINP82G0RC00N1520]
+
+# forbid P565 to talk to AG2P via TCP to force DV @ distance 2 (again, just to
be sure)
+P565723JO1C2HSN6J29TAQ22MN6CI8HTMUU55T0FUQG4CMDGGEQ8UCNBKUMB94GC8R9G4FB2SF9LDOBAJ6AMINBP4JHHDD6L7VD801G
= tcp
+
+[transport-blacklist-5MBMI6V7A8UFH0BD965HNNAQEDBIQRCC4LDNT9Q7KMEAQU00VEJFEQKDU4KCL9E64ACCRO0PJ1C689K765NCAHFUVSV99Q15KPK1RRO]
+
Copied: gnunet/src/dv/test_transport_dv.c (from rev 26629,
gnunet/src/dv/test_transport_api_dv.c)
===================================================================
--- gnunet/src/dv/test_transport_dv.c (rev 0)
+++ gnunet/src/dv/test_transport_dv.c 2013-03-28 12:21:29 UTC (rev 26634)
@@ -0,0 +1,65 @@
+/*
+ This file is part of GNUnet.
+ (C) 2009, 2013 Christian Grothoff (and other contributing authors)
+
+ GNUnet is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published
+ by the Free Software Foundation; either version 3, or (at your
+ option) any later version.
+
+ GNUnet is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GNUnet; see the file COPYING. If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
+/**
+ * @file dv/test_transport_dv.c
+ * @brief base testcase for testing distance vector transport
+ */
+#include "platform.h"
+#include "gnunet_core_service.h"
+#include "gnunet_testbed_service.h"
+
+/**
+ * Return value from main, set to 0 on success.
+ */
+static int ok;
+
+
+static void
+test_connection (void *cls,
+ unsigned int num_peers,
+ struct GNUNET_TESTBED_Peer **peers)
+{
+ if (4 != num_peers)
+ {
+ fprintf (stderr, "Testbed failed to connect peers\n");
+ GNUNET_SCHEDULER_shutdown ();
+ return;
+ }
+ ok = 0;
+ if (0)
+ GNUNET_SCHEDULER_shutdown ();
+ else
+ fprintf (stderr, "Test passed, press CTRL-C to shut down\n");
+}
+
+
+int
+main (int argc, char *argv[])
+{
+ ok = 1;
+ (void) GNUNET_TESTBED_test_run ("test-transport-api-dv",
+ "test_transport_dv_data.conf",
+ 4,
+ 0, NULL, NULL,
+ &test_connection, NULL);
+ return ok;
+}
+
+/* end of test_transport_api_dv.c */
Modified: gnunet/src/dv/test_transport_dv_data.conf
===================================================================
--- gnunet/src/dv/test_transport_dv_data.conf 2013-03-28 12:15:08 UTC (rev
26633)
+++ gnunet/src/dv/test_transport_dv_data.conf 2013-03-28 12:21:29 UTC (rev
26634)
@@ -4,7 +4,6 @@
[transport]
PORT = 2565
PLUGINS = tcp dv
-BLACKLIST_FILE = $SERVICEHOME/blacklist
[arm]
DEFAULTSERVICES = core
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r26634 - gnunet/src/dv,
gnunet <=