gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r29671 - in gnunet/src/gns: . egos


From: gnunet
Subject: [GNUnet-SVN] r29671 - in gnunet/src/gns: . egos
Date: Sat, 28 Sep 2013 12:53:36 +0200

Author: schanzen
Date: 2013-09-28 12:53:36 +0200 (Sat, 28 Sep 2013)
New Revision: 29671

Added:
   gnunet/src/gns/egos/short-zone
   gnunet/src/gns/test_gns_pseu_shorten.sh
Modified:
   gnunet/src/gns/Makefile.am
   gnunet/src/gns/gnunet-gns.c
Log:
-pseu shorten test, fails

Modified: gnunet/src/gns/Makefile.am
===================================================================
--- gnunet/src/gns/Makefile.am  2013-09-28 09:58:07 UTC (rev 29670)
+++ gnunet/src/gns/Makefile.am  2013-09-28 10:53:36 UTC (rev 29671)
@@ -203,6 +203,7 @@
   test_gns_mx_lookup.sh \
   test_gns_ns_lookup.sh \
   test_gns_dht_lookup.sh\
+  test_gns_pseu_shorten.sh\
   test_gns_cname_lookup.sh 
 
 if ENABLE_TEST_RUN

Added: gnunet/src/gns/egos/short-zone
===================================================================
(Binary files differ)

Index: gnunet/src/gns/egos/short-zone
===================================================================
--- gnunet/src/gns/egos/short-zone      2013-09-28 09:58:07 UTC (rev 29670)
+++ gnunet/src/gns/egos/short-zone      2013-09-28 10:53:36 UTC (rev 29671)

Property changes on: gnunet/src/gns/egos/short-zone
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Modified: gnunet/src/gns/gnunet-gns.c
===================================================================
--- gnunet/src/gns/gnunet-gns.c 2013-09-28 09:58:07 UTC (rev 29670)
+++ gnunet/src/gns/gnunet-gns.c 2013-09-28 10:53:36 UTC (rev 29671)
@@ -241,7 +241,7 @@
   struct GNUNET_CRYPTO_EccPublicSignKey *pkeym = cls;
 
   id_op = NULL;
-  if (NULL == ego) 
+  if (NULL == ego)
     lookup_with_keys (pkeym, NULL);
   else
     lookup_with_keys (pkeym,
@@ -265,7 +265,7 @@
   pkeym = GNUNET_new (struct GNUNET_CRYPTO_EccPublicSignKey);
   *pkeym = *pkey;
   id_op = GNUNET_IDENTITY_get (identity,
-                              "shorten-zone",
+                              "short-zone",
                               &identity_shorten_cb,
                               pkeym);
   if (NULL == id_op)

Added: gnunet/src/gns/test_gns_pseu_shorten.sh
===================================================================
--- gnunet/src/gns/test_gns_pseu_shorten.sh                             (rev 0)
+++ gnunet/src/gns/test_gns_pseu_shorten.sh     2013-09-28 10:53:36 UTC (rev 
29671)
@@ -0,0 +1,43 @@
+#!/bin/bash
+trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT
+which timeout &> /dev/null && DO_TIMEOUT="timeout 5"
+
+TEST_IP="127.0.0.1"
+TEST_PSEU="alice"
+TEST_NAME="www.mybestfriendalice.gnu"
+TEST_NAME_SHORT="www.alice.short.gnu"
+gnunet-arm -s -c test_gns_lookup.conf
+DELEGATED_PKEY=$(gnunet-identity -d -c test_gns_lookup.conf | grep 
delegatedego | awk '{print $3}')
+SHORT=$(gnunet-identity -c test_gns_lookup.conf -d | grep short-zone | awk 
'{print $3}')
+gnunet-identity -C short-zone -c test_gns_lookup.conf
+gnunet-identity -C delegatedego -c test_gns_lookup.conf
+gnunet-identity -e short-zone -s gns-short -c test_gns_lookup.conf
+gnunet-identity -C testego -c test_gns_lookup.conf -c test_gns_lookup.conf
+DELEGATED_PKEY=$(gnunet-identity -d -c test_gns_lookup.conf | grep 
delegatedego | awk '{print $3}')
+SHORT=$(gnunet-identity -c test_gns_lookup.conf -d | grep short-zone | awk 
'{print $3}')
+gnunet-namestore -p -z testego -a -n mybestfriendalice -t PKEY -V 
$DELEGATED_PKEY -e never -c test_gns_lookup.conf
+gnunet-namestore -p -z testego -a -n short -t PKEY -V $SHORT -e never -c 
test_gns_lookup.conf
+gnunet-namestore -p -z delegatedego -a -n www -t A -V $TEST_IP -e never -c 
test_gns_lookup.conf
+gnunet-namestore -p -z delegatedego -a -n "+" -t PSEU -V $TEST_PSEU -e never 
-c test_gns_lookup.conf
+RES_IP=`$DO_TIMEOUT gnunet-gns --raw -z testego -u $TEST_NAME -t A -c 
test_gns_lookup.conf`
+RES_IP_PSEU=`$DO_TIMEOUT gnunet-gns --raw -z testego -u www.alice.short.gnu -t 
A -c test_gns_lookup.conf`
+gnunet-namestore -z testego -d -n b -t PKEY -V $DELEGATED_PKEY  -e never -c 
test_gns_lookup.conf
+gnunet-namestore -z delegatedego -d -n www -t A -V $TEST_IP  -e never -c 
test_gns_lookup.conf
+gnunet-arm -e -c test_gns_lookup.conf
+
+if [ "$RES_IP" == "$TEST_IP" ]
+then
+  echo "$TEST_NAME resolved , got $RES_IP."
+else
+  echo "Failed to resolve $TEST_NAME to proper IP, got $RES_IP."
+  exit 1
+fi
+
+if [ "$RES_IP_PSEU" == "$TEST_IP" ]
+then
+  echo "$TEST_NAME_SHORT resolved , got $RES_IP."
+  exit 0
+else
+  echo "Failed to resolve $TEST_NAME_SHORT to proper IP, got $RES_IP_PSEU."
+  exit 1
+fi


Property changes on: gnunet/src/gns/test_gns_pseu_shorten.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property



reply via email to

[Prev in Thread] Current Thread [Next in Thread]