aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-02-19 21:52:43 +0100
committerChristian Grothoff <christian@grothoff.org>2020-02-19 21:52:54 +0100
commitca8202057d58faaed3e1fa6c57adf0aa003811c4 (patch)
tree3f479c09609394995e656967bd3a7caceb7f5ef1 /src
parent3b2afcd3b931d56bf028aaf397014d27ff91b2a2 (diff)
downloadgnunet-ca8202057d58faaed3e1fa6c57adf0aa003811c4.tar.gz
gnunet-ca8202057d58faaed3e1fa6c57adf0aa003811c4.zip
fixing the GNS multirecord multipeer test
Diffstat (limited to 'src')
-rw-r--r--src/gns/test_gns_lookup_peer1.conf13
-rw-r--r--src/gns/test_gns_lookup_peer2.conf16
-rwxr-xr-xsrc/gns/test_gns_multiple_record_lookup.sh32
3 files changed, 51 insertions, 10 deletions
diff --git a/src/gns/test_gns_lookup_peer1.conf b/src/gns/test_gns_lookup_peer1.conf
index 3b034f8d5..1cf0ba628 100644
--- a/src/gns/test_gns_lookup_peer1.conf
+++ b/src/gns/test_gns_lookup_peer1.conf
@@ -5,6 +5,8 @@ DISABLE = YES
5 5
6[PATHS] 6[PATHS]
7GNUNET_TEST_HOME = $GNUNET_TMP/test-gnunet-gns-peer-1/ 7GNUNET_TEST_HOME = $GNUNET_TMP/test-gnunet-gns-peer-1/
8GNUNET_RUNTIME_DIR = $GNUNET_TMP/test-gnunet-gns-peer-1-system-runtime/
9GNUNET_USER_RUNTIME_DIR = $GNUNET_TMP/test-gnunet-gns-peer-1-user-runtime/
8 10
9[dht] 11[dht]
10START_ON_DEMAND = YES 12START_ON_DEMAND = YES
@@ -42,12 +44,17 @@ WAN_QUOTA_IN = 1 GB
42WAN_QUOTA_OUT = 1 GB 44WAN_QUOTA_OUT = 1 GB
43 45
44[transport] 46[transport]
45plugins = tcp 47plugins = unix
46NEIGHBOUR_LIMIT = 50 48NEIGHBOUR_LIMIT = 50
47PORT = 2091 49PORT = 2091
48 50
49[transport-tcp] 51[transport-unix]
50TIMEOUT = 300 s 52UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-transport-plugin-unix1.sock
53
54[hostlist]
55SERVERS = http://localhost:9999/
56OPTIONS = -b
57IMMEDIATE_START = YES
51 58
52[nat] 59[nat]
53DISABLEV6 = YES 60DISABLEV6 = YES
diff --git a/src/gns/test_gns_lookup_peer2.conf b/src/gns/test_gns_lookup_peer2.conf
index d64fdcda3..2e861ff0a 100644
--- a/src/gns/test_gns_lookup_peer2.conf
+++ b/src/gns/test_gns_lookup_peer2.conf
@@ -5,6 +5,8 @@ DISABLE = YES
5 5
6[PATHS] 6[PATHS]
7GNUNET_TEST_HOME = $GNUNET_TMP/test-gnunet-gns-peer-2/ 7GNUNET_TEST_HOME = $GNUNET_TMP/test-gnunet-gns-peer-2/
8GNUNET_RUNTIME_DIR = $GNUNET_TMP/test-gnunet-gns-peer-2-runtime/
9GNUNET_USER_RUNTIME_DIR = $GNUNET_TMP/test-gnunet-gns-peer-2-user-runtime/
8 10
9[dht] 11[dht]
10START_ON_DEMAND = YES 12START_ON_DEMAND = YES
@@ -42,17 +44,23 @@ AUTOCONNECT = YES
42FRIENDS-ONLY = NO 44FRIENDS-ONLY = NO
43MINIMUM-FRIENDS = 0 45MINIMUM-FRIENDS = 0
44 46
47[hostlist]
48SERVERS =
49HTTPPORT = 9999
50OPTIONS = -p
51IMMEDIATE_START = YES
52
53
45[ats] 54[ats]
46WAN_QUOTA_IN = 1 GB 55WAN_QUOTA_IN = 1 GB
47WAN_QUOTA_OUT = 1 GB 56WAN_QUOTA_OUT = 1 GB
48 57
49[transport] 58[transport]
50plugins = tcp 59plugins = unix
51NEIGHBOUR_LIMIT = 50 60NEIGHBOUR_LIMIT = 50
52PORT = 2092
53 61
54[transport-tcp] 62[transport-unix]
55TIMEOUT = 300 s 63UNIXPATH = $GNUNET_RUNTIME_DIR/gnunet-transport-plugin-unix2.sock
56 64
57[nat] 65[nat]
58DISABLEV6 = YES 66DISABLEV6 = YES
diff --git a/src/gns/test_gns_multiple_record_lookup.sh b/src/gns/test_gns_multiple_record_lookup.sh
index fbd9a6b13..2d00945d6 100755
--- a/src/gns/test_gns_multiple_record_lookup.sh
+++ b/src/gns/test_gns_multiple_record_lookup.sh
@@ -4,6 +4,10 @@ trap "gnunet-arm -e -c test_gns_lookup_peer1.conf" INT
4trap "gnunet-arm -e -c test_gns_lookup_peer2.conf" INT 4trap "gnunet-arm -e -c test_gns_lookup_peer2.conf" INT
5which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 5" 5which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 5"
6 6
7unset XDG_DATA_HOME
8unset XDG_CONFIG_HOME
9unset XDG_CACHE_HOME
10
7LOCATION=$(which gnunet-config) 11LOCATION=$(which gnunet-config)
8if [ -z $LOCATION ] 12if [ -z $LOCATION ]
9then 13then
@@ -27,18 +31,40 @@ LABEL="fnord"
27 31
28gnunet-arm -s -c test_gns_lookup_peer2.conf 32gnunet-arm -s -c test_gns_lookup_peer2.conf
29PKEY=`$DO_TIMEOUT gnunet-identity -V -C $OTHER_EGO -c test_gns_lookup_peer2.conf` 33PKEY=`$DO_TIMEOUT gnunet-identity -V -C $OTHER_EGO -c test_gns_lookup_peer2.conf`
34
35# Note: if zonemaster is kept running, it MAY publish the "A" record in the
36# DHT immediately and then _LATER_ also the "AAAA" record. But as then there
37# will be TWO valid blocks in the DHT (one with only A and one with A and
38# AAAA), the subsequent GET for both may fail and only return the result with
39# just the "A" record).
40# If we _waited_ until the original block with just "A" expired, everything
41# would be fine, but we don't want to do that for the test, so we
42# simply pause publishing to the DHT until all records are defined.
43# In the future, it would be good to have an enhanced gnunet-namestore command
44# that would read a series of changes to be made to a record set from
45# stdin and do them _all_ *atomically*. Then we would not need to do this.
46
47gnunet-arm -c test_gns_lookup_peer2.conf -k zonemaster
48gnunet-arm -c test_gns_lookup_peer2.conf -k zonemaster-monitor
49
30gnunet-namestore -p -z $OTHER_EGO -a -n $LABEL -t A -V $TEST_IP -e 3600s -c test_gns_lookup_peer2.conf 50gnunet-namestore -p -z $OTHER_EGO -a -n $LABEL -t A -V $TEST_IP -e 3600s -c test_gns_lookup_peer2.conf
31gnunet-namestore -p -z $OTHER_EGO -a -n $LABEL -t AAAA -V $TEST_IPV6 -e 3600s -c test_gns_lookup_peer2.conf 51gnunet-namestore -p -z $OTHER_EGO -a -n $LABEL -t AAAA -V $TEST_IPV6 -e 3600s -c test_gns_lookup_peer2.conf
32gnunet-namestore -D -z $OTHER_EGO -n $LABEL 52gnunet-namestore -D -z $OTHER_EGO -n $LABEL
33gnunet-arm -e -c test_gns_lookup_peer2.conf
34 53
35echo "Second peer" 54gnunet-arm -c test_gns_lookup_peer2.conf -i zonemaster
55gnunet-arm -c test_gns_lookup_peer2.conf -i zonemaster-monitor
56
57
36gnunet-arm -s -c test_gns_lookup_peer1.conf 58gnunet-arm -s -c test_gns_lookup_peer1.conf
37echo "Second peer started" 59
60
38RESP=`$DO_TIMEOUT gnunet-gns --raw -u $LABEL.$PKEY -t ANY -c test_gns_lookup_peer1.conf` 61RESP=`$DO_TIMEOUT gnunet-gns --raw -u $LABEL.$PKEY -t ANY -c test_gns_lookup_peer1.conf`
39RESP1=`$DO_TIMEOUT gnunet-gns --raw -u $LABEL.$PKEY -t A -c test_gns_lookup_peer1.conf` 62RESP1=`$DO_TIMEOUT gnunet-gns --raw -u $LABEL.$PKEY -t A -c test_gns_lookup_peer1.conf`
40RESP2=`$DO_TIMEOUT gnunet-gns --raw -u $LABEL.$PKEY -t AAAA -c test_gns_lookup_peer1.conf` 63RESP2=`$DO_TIMEOUT gnunet-gns --raw -u $LABEL.$PKEY -t AAAA -c test_gns_lookup_peer1.conf`
64
65
41gnunet-arm -e -c test_gns_lookup_peer1.conf 66gnunet-arm -e -c test_gns_lookup_peer1.conf
67gnunet-arm -e -c test_gns_lookup_peer2.conf
42 68
43rm -rf `gnunet-config -c test_gns_lookup_peer1.conf -f -s paths -o GNUNET_TEST_HOME` 69rm -rf `gnunet-config -c test_gns_lookup_peer1.conf -f -s paths -o GNUNET_TEST_HOME`
44rm -rf `gnunet-config -c test_gns_lookup_peer2.conf -f -s paths -o GNUNET_TEST_HOME` 70rm -rf `gnunet-config -c test_gns_lookup_peer2.conf -f -s paths -o GNUNET_TEST_HOME`