diff options
author | Julius Bünger <buenger@mytum.de> | 2016-07-01 23:38:39 +0000 |
---|---|---|
committer | Julius Bünger <buenger@mytum.de> | 2016-07-01 23:38:39 +0000 |
commit | 14659eaa11e9af2f096425559a038e842089ca16 (patch) | |
tree | cbd21a366d43f7c3fa5916655acaa24aea3e5538 /src | |
parent | fd921d12bd321648bb44358ec87ddf488f4e5a34 (diff) | |
download | gnunet-14659eaa11e9af2f096425559a038e842089ca16.tar.gz gnunet-14659eaa11e9af2f096425559a038e842089ca16.zip |
-rps test _peers: disable storage of valid peers
Diffstat (limited to 'src')
-rw-r--r-- | src/rps/test_rps.conf | 8 | ||||
-rw-r--r-- | src/rps/test_service_rps_peers.c | 10 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/rps/test_rps.conf b/src/rps/test_rps.conf index a629451e4..fdca2a8ed 100644 --- a/src/rps/test_rps.conf +++ b/src/rps/test_rps.conf | |||
@@ -1,3 +1,6 @@ | |||
1 | [PATHS] | ||
2 | GNUNET_TEST_HOME = /tmp/rps-test/ | ||
3 | |||
1 | [rps] | 4 | [rps] |
2 | #PREFIX = valgrind --leak-check=full --show-leak-kinds=all --log-file=/tmp/rps/valgrind!gnunet-service-rps!%p | 5 | #PREFIX = valgrind --leak-check=full --show-leak-kinds=all --log-file=/tmp/rps/valgrind!gnunet-service-rps!%p |
3 | #BINARY = gnunet-service-rps | 6 | #BINARY = gnunet-service-rps |
@@ -12,7 +15,7 @@ NOARMBIND = YES | |||
12 | 15 | ||
13 | # This is the timeinterval between the rounds | 16 | # This is the timeinterval between the rounds |
14 | ROUNDINTERVAL = 2 s | 17 | ROUNDINTERVAL = 2 s |
15 | FILENAME_VALID_PEERS = $GNUNET_DATA_HOME/rps/valid_peers.txt | 18 | FILENAME_VALID_PEERS = $GNUNET_TEST_HOME/rps/valid_peers.txt |
16 | 19 | ||
17 | # This is the 'estimate' in the beginning. | 20 | # This is the 'estimate' in the beginning. |
18 | # This determines the size of the peers we keep in memory | 21 | # This determines the size of the peers we keep in memory |
@@ -55,9 +58,6 @@ DISABLE_TRY_CONNECT = YES | |||
55 | DISABLE_TRY_CONNECT = YES | 58 | DISABLE_TRY_CONNECT = YES |
56 | #OPTIONS=-l /tmp/rps_profiler_logs/cadet-[]-%Y-%m-%d.log | 59 | #OPTIONS=-l /tmp/rps_profiler_logs/cadet-[]-%Y-%m-%d.log |
57 | 60 | ||
58 | [PATHS] | ||
59 | GNUNET_TEST_HOME = /tmp/rps-test/ | ||
60 | |||
61 | #[arm] | 61 | #[arm] |
62 | #GLOBAL_POSTFIX=-l /tmp/rps_profiler_logs/other-[]-%Y-%m-%d.log | 62 | #GLOBAL_POSTFIX=-l /tmp/rps_profiler_logs/other-[]-%Y-%m-%d.log |
63 | 63 | ||
diff --git a/src/rps/test_service_rps_peers.c b/src/rps/test_service_rps_peers.c index ede3d05a5..37ed1974c 100644 --- a/src/rps/test_service_rps_peers.c +++ b/src/rps/test_service_rps_peers.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #define ABORT() { fprintf(stderr, "Error at %s:%d\n", __FILE__, __LINE__); Peers_terminate (); return 1; } | 27 | #define ABORT() { fprintf(stderr, "Error at %s:%d\n", __FILE__, __LINE__); Peers_terminate (); return 1; } |
28 | #define CHECK(c) { if (! (c)) ABORT(); } | 28 | #define CHECK(c) { if (! (c)) ABORT(); } |
29 | 29 | ||
30 | #define FN_VALID_PEERS "DISABLE" | ||
30 | 31 | ||
31 | /** | 32 | /** |
32 | * @brief Dummy implementation of #PeerOp (Operation on peer) | 33 | * @brief Dummy implementation of #PeerOp (Operation on peer) |
@@ -48,7 +49,6 @@ void peer_op (void *cls, const struct GNUNET_PeerIdentity *peer) | |||
48 | void | 49 | void |
49 | peer_op (void *cls, const struct GNUNET_PeerIdentity *peer); | 50 | peer_op (void *cls, const struct GNUNET_PeerIdentity *peer); |
50 | 51 | ||
51 | |||
52 | static int | 52 | static int |
53 | check () | 53 | check () |
54 | { | 54 | { |
@@ -59,25 +59,25 @@ check () | |||
59 | memset (&own_id, 1, sizeof (own_id)); | 59 | memset (&own_id, 1, sizeof (own_id)); |
60 | 60 | ||
61 | /* Do nothing */ | 61 | /* Do nothing */ |
62 | Peers_initialise ("", NULL, &own_id); | 62 | Peers_initialise (FN_VALID_PEERS, NULL, &own_id); |
63 | Peers_terminate (); | 63 | Peers_terminate (); |
64 | 64 | ||
65 | 65 | ||
66 | /* Create peer */ | 66 | /* Create peer */ |
67 | Peers_initialise ("", NULL, &own_id); | 67 | Peers_initialise (FN_VALID_PEERS, NULL, &own_id); |
68 | CHECK (GNUNET_YES == Peers_insert_peer (&k1)); | 68 | CHECK (GNUNET_YES == Peers_insert_peer (&k1)); |
69 | Peers_terminate (); | 69 | Peers_terminate (); |
70 | 70 | ||
71 | 71 | ||
72 | /* Create peer */ | 72 | /* Create peer */ |
73 | Peers_initialise ("", NULL, &own_id); | 73 | Peers_initialise (FN_VALID_PEERS, NULL, &own_id); |
74 | CHECK (GNUNET_YES == Peers_insert_peer (&k1)); | 74 | CHECK (GNUNET_YES == Peers_insert_peer (&k1)); |
75 | CHECK (GNUNET_YES == Peers_remove_peer (&k1)); | 75 | CHECK (GNUNET_YES == Peers_remove_peer (&k1)); |
76 | Peers_terminate (); | 76 | Peers_terminate (); |
77 | 77 | ||
78 | 78 | ||
79 | /* Insertion and Removal */ | 79 | /* Insertion and Removal */ |
80 | Peers_initialise ("", NULL, &own_id); | 80 | Peers_initialise (FN_VALID_PEERS, NULL, &own_id); |
81 | CHECK (GNUNET_NO == Peers_check_peer_known (&k1)); | 81 | CHECK (GNUNET_NO == Peers_check_peer_known (&k1)); |
82 | 82 | ||
83 | CHECK (GNUNET_YES == Peers_insert_peer (&k1)); | 83 | CHECK (GNUNET_YES == Peers_insert_peer (&k1)); |