[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r30349 - gnunet/src/gns
From: |
gnunet |
Subject: |
[GNUnet-SVN] r30349 - gnunet/src/gns |
Date: |
Sun, 20 Oct 2013 13:33:52 +0200 |
Author: schanzen
Date: 2013-10-20 13:33:51 +0200 (Sun, 20 Oct 2013)
New Revision: 30349
Modified:
gnunet/src/gns/test_gns_cname_lookup.sh
gnunet/src/gns/test_gns_lookup.sh
Log:
-more test coverage, more bugs found
Modified: gnunet/src/gns/test_gns_cname_lookup.sh
===================================================================
--- gnunet/src/gns/test_gns_cname_lookup.sh 2013-10-19 14:46:57 UTC (rev
30348)
+++ gnunet/src/gns/test_gns_cname_lookup.sh 2013-10-20 11:33:51 UTC (rev
30349)
@@ -19,6 +19,7 @@
gnunet-namestore -p -z testego -a -n $TEST_RECORD_NAME_PLUS -t CNAME -V
$TEST_RECORD_CNAME_PLUS -e never -c test_gns_lookup.conf
gnunet-namestore -p -z testego -a -n $TEST_RECORD_CNAME_SERVER -t A -V
$TEST_IP_PLUS -e never -c test_gns_lookup.conf
RES_CNAME=`$DO_TIMEOUT gnunet-gns --raw -z testego -u www.gnu -t A -c
test_gns_lookup.conf`
+RES_CNAME_RAW=`$DO_TIMEOUT gnunet-gns --raw -z testego -u www.gnu -t CNAME -c
test_gns_lookup.conf`
RES_CNAME_DNS=`$DO_TIMEOUT gnunet-gns --raw -z testego -u www3.gnu -t A -c
test_gns_lookup.conf`
gnunet-namestore -p -z testego -d -n $TEST_RECORD_NAME_DNS -t CNAME -V
$TEST_RECORD_CNAME_DNS -e never -c test_gns_lookup.conf
gnunet-namestore -p -z testego -d -n $TEST_RECORD_NAME_PLUS -t CNAME -V
$TEST_RECORD_CNAME_PLUS -e never -c test_gns_lookup.conf
@@ -26,6 +27,14 @@
gnunet-identity -D testego -c test_gns_lookup.conf
gnunet-arm -e -c test_gns_lookup.conf
+if [ "$RES_CNAME_RAW" == "server.gnu" ]
+then
+ echo "PASS: CNAME resulution from GNS"
+else
+ echo "FAIL: CNAME resolution from GNS, got $RES_CNAME_RAW."
+ exit 1
+fi
+
if [ "$RES_CNAME" == "$TEST_IP_PLUS" ]
then
echo "PASS: IP resulution from GNS"
Modified: gnunet/src/gns/test_gns_lookup.sh
===================================================================
--- gnunet/src/gns/test_gns_lookup.sh 2013-10-19 14:46:57 UTC (rev 30348)
+++ gnunet/src/gns/test_gns_lookup.sh 2013-10-20 11:33:51 UTC (rev 30349)
@@ -3,18 +3,31 @@
rm -r `gnunet-config -c test_gns_lookup.conf -s PATHS -o GNUNET_HOME -f`
which timeout &> /dev/null && DO_TIMEOUT="timeout 5"
TEST_IP="127.0.0.1"
+TEST_IP6="dead::beef"
gnunet-arm -s -c test_gns_lookup.conf
gnunet-identity -C testego -c test_gns_lookup.conf
gnunet-namestore -p -z testego -a -n www -t A -V $TEST_IP -e never -c
test_gns_lookup.conf
+gnunet-namestore -p -z testego -a -n www -t AAAA -V $TEST_IP6 -e never -c
test_gns_lookup.conf
RES_IP=`$DO_TIMEOUT gnunet-gns --raw -z testego -u www.gnu -t A -c
test_gns_lookup.conf`
+RES_IP6=`$DO_TIMEOUT gnunet-gns --raw -z testego -u www.gnu -t AAAA -c
test_gns_lookup.conf`
gnunet-namestore -z testego -d -n www -t A -V $TEST_IP -e never -c
test_gns_lookup.conf
+gnunet-namestore -z testego -d -n www -t AAAA -V $TEST_IP6 -e never -c
test_gns_lookup.conf
gnunet-identity -D testego -c test_gns_lookup.conf
gnunet-arm -e -c test_gns_lookup.conf
+if [ "$RES_IP6" == "$TEST_IP6" ]
+then
+ echo "PASS: Resolved correct IPv6 address, got $RES_IP6"
+else
+ echo "FAIL: Failed to resolve to proper IP, got $RES_IP6."
+ exit 1
+fi
+
if [ "$RES_IP" == "$TEST_IP" ]
then
+ echo "PASS: Resolved correct IP address, got $RES_IP"
exit 0
else
- echo "Failed to resolve to proper IP, got $RES_IP."
+ echo "FAIL: Failed to resolve to proper IP, got $RES_IP."
exit 1
fi
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r30349 - gnunet/src/gns,
gnunet <=