[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r4819 - GNUnet/src/applications/session
From: |
gnunet |
Subject: |
[GNUnet-SVN] r4819 - GNUnet/src/applications/session |
Date: |
Sun, 27 May 2007 21:30:39 -0600 (MDT) |
Author: grothoff
Date: 2007-05-27 21:30:39 -0600 (Sun, 27 May 2007)
New Revision: 4819
Removed:
GNUnet/src/applications/session/peer1.conf
GNUnet/src/applications/session/peer1/
GNUnet/src/applications/session/peer2.conf
GNUnet/src/applications/session/peer2/
Modified:
GNUnet/src/applications/session/Makefile.am
GNUnet/src/applications/session/sessiontest.c
Log:
bye
Modified: GNUnet/src/applications/session/Makefile.am
===================================================================
--- GNUnet/src/applications/session/Makefile.am 2007-05-28 03:30:16 UTC (rev
4818)
+++ GNUnet/src/applications/session/Makefile.am 2007-05-28 03:30:39 UTC (rev
4819)
@@ -24,13 +24,10 @@
sessiontest.c
sessiontest_LDADD = \
$(top_builddir)/src/applications/stats/libgnunetstats_api.la \
+ $(top_builddir)/src/applications/testing/libgnunettesting_api.la \
$(top_builddir)/src/util/config_impl/libgnunetutil_config.la \
$(top_builddir)/src/util/network_client/libgnunetutil_network_client.la \
$(top_builddir)/src/util/libgnunetutil.la
EXTRA_DIST = \
- check.conf \
- peer1.conf \
- peer2.conf \
- peer1/.hostkey \
- peer2/.hostkey
+ check.conf
Deleted: GNUnet/src/applications/session/peer1.conf
===================================================================
--- GNUnet/src/applications/session/peer1.conf 2007-05-28 03:30:16 UTC (rev
4818)
+++ GNUnet/src/applications/session/peer1.conf 2007-05-28 03:30:39 UTC (rev
4819)
@@ -1,38 +0,0 @@
-# This is the configuration for the GNUnet daemon when running
-# the test in this directory (make check).
-[PATHS]
-GNUNETD_HOME = peer1
-
-[GNUNETD]
-GNUNETD_HOME = peer1
-# VALGRIND = 300
-HELLOEXPIRES = 60
-LOGLEVEL = WARNING
-LOGFILE = $GNUNETD_HOME/log
-KEEPLOG = 0
-PIDFILE = $GNUNETD_HOME/gnunetd.pid
-HOSTS = $GNUNETD_HOME/data/hosts/
-APPLICATIONS = "advertising topology tbench stats"
-TRANSPORTS = "tcp"
-
-[MODULES]
-topology = "topology_default"
-
-[NETWORK]
-PORT = 2087
-INTERFACE = eth0
-HELOEXCHANGE = NO
-TRUSTED = 127.0.0.0/8;
-
-[LOAD]
-INTERFACES = eth0
-BASICLIMITING = YES
-MAXNETUPBPSTOTAL = 50000
-MAXNETDOWNBPSTOTAL = 50000
-MAXCPULOAD = 100
-
-[TCP]
-PORT = 2086
-# BLACKLIST =
-
-
Deleted: GNUnet/src/applications/session/peer2.conf
===================================================================
--- GNUnet/src/applications/session/peer2.conf 2007-05-28 03:30:16 UTC (rev
4818)
+++ GNUnet/src/applications/session/peer2.conf 2007-05-28 03:30:39 UTC (rev
4819)
@@ -1,40 +0,0 @@
-# This is the configuration for the GNUnet daemon when running
-# the test in this directory (make check).
-[PATHS]
-GNUNETD_HOME = peer2
-
-[GNUNETD]
-GNUNETD_HOME = peer2
-# VALGRIND = 300
-HELLOEXPIRES = 60
-LOGLEVEL = WARNING
-LOGFILE = $GNUNETD_HOME/log
-KEEPLOG = 0
-PIDFILE = $GNUNETD_HOME/gnunetd.pid
-HOSTS = $GNUNETD_HOME/data/hosts/
-APPLICATIONS = "advertising topology tbench stats"
-TRANSPORTS = "tcp"
-
-[MODULES]
-topology = "topology_default"
-
-[NETWORK]
-PORT = 12087
-INTERFACE = eth0
-HELOEXCHANGE = NO
-TRUSTED = 127.0.0.0/8;
-
-[LOAD]
-INTERFACES = eth0
-BASICLIMITING = YES
-MAXNETUPBPSTOTAL = 50000
-MAXNETDOWNBPSTOTAL = 50000
-MAXCPULOAD = 100
-
-[TCP]
-PORT = 12086
-# BLACKLIST =
-
-
-
-
Modified: GNUnet/src/applications/session/sessiontest.c
===================================================================
--- GNUnet/src/applications/session/sessiontest.c 2007-05-28 03:30:16 UTC
(rev 4818)
+++ GNUnet/src/applications/session/sessiontest.c 2007-05-28 03:30:39 UTC
(rev 4819)
@@ -29,6 +29,7 @@
#include "gnunet_util.h"
#include "gnunet_util_config_impl.h"
#include "gnunet_util_network_client.h"
+#include "gnunet_testing_lib.h"
#include "gnunet_stats_lib.h"
#define START_PEERS 1
@@ -36,11 +37,11 @@
static int ok;
static int waitForConnect(const char * name,
- unsigned long long value,
- void * cls) {
+ unsigned long long value,
+ void * cls) {
if ( (value > 0) &&
(0 == strcmp(_("# of connected peers"),
- name)) ) {
+ name)) ) {
ok = 1;
return SYSERR;
}
@@ -56,8 +57,7 @@
*/
int main(int argc, char ** argv) {
#if START_PEERS
- pid_t daemon1;
- pid_t daemon2;
+ struct DaemonContext * peers;
#endif
int ret;
struct ClientServerConnection * sock;
@@ -71,40 +71,19 @@
return -1;
}
#if START_PEERS
- daemon1 = os_daemon_start(NULL,
- cfg,
- "peer1.conf",
- NO);
- daemon2 = os_daemon_start(NULL,
- cfg,
- "peer2.conf",
- NO);
-#endif
- /* in case existing hellos have expired */
- PTHREAD_SLEEP(30 * cronSECONDS);
- system("cp peer1/data/hosts/* peer2/data/hosts/");
- system("cp peer2/data/hosts/* peer1/data/hosts/");
- ret = 0;
-#if START_PEERS
- if (daemon1 != -1) {
- if (os_daemon_stop(NULL, daemon1) != YES)
- ret = 1;
+ peers = gnunet_testing_start_daemons("tcp",
+ "advertising stats",
+ "/tmp/session-test",
+ 2087,
+ 10000,
+ 2);
+ if (peers == NULL) {
+ GC_free(cfg);
+ return -1;
}
- if (daemon2 != -1) {
- if (os_daemon_stop(NULL, daemon2) != YES)
- ret = 1;
- }
- if (ret != 0)
- return 1;
- daemon1 = os_daemon_start(NULL,
- cfg,
- "peer1.conf",
- NO);
- daemon2 = os_daemon_start(NULL,
- cfg,
- "peer2.conf",
- NO);
#endif
+ gnunet_testing_connect_daemons(2087,
+ 12087);
if (OK == connection_wait_for_running(NULL,
cfg,
30 * cronSECONDS)) {
@@ -130,20 +109,10 @@
ret = 1;
}
#if START_PEERS
- if (daemon1 != -1) {
- if (os_daemon_stop(NULL, daemon1) != YES)
- ret = 1;
- }
- if (daemon2 != -1) {
- if (os_daemon_stop(NULL, daemon2) != YES)
- ret = 1;
- }
+ gnunet_testing_stop_daemons(peers);
#endif
- if (ok == 0)
- ret = 1;
-
GC_free(cfg);
- return ret;
+ return (ok == 0) ? 1 : 0;
}
/* end of sessiontest.c */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r4819 - GNUnet/src/applications/session,
gnunet <=