aboutsummaryrefslogtreecommitdiff
path: root/src/gns
diff options
context:
space:
mode:
authorng0 <ng0@n0.is>2019-03-09 11:54:36 +0000
committerng0 <ng0@n0.is>2019-03-09 11:54:36 +0000
commit47d973e97236d93c90d8f2fb49ccb46164e03e24 (patch)
tree67d67db8c8fa87f6a1a47698734fa7dafc1927cf /src/gns
parent9e3255786c36e163ea25e44cbacf1409c843ced1 (diff)
downloadgnunet-47d973e97236d93c90d8f2fb49ccb46164e03e24.tar.gz
gnunet-47d973e97236d93c90d8f2fb49ccb46164e03e24.zip
bashism
Diffstat (limited to 'src/gns')
-rwxr-xr-xsrc/gns/test_gns_at_lookup.sh6
-rwxr-xr-xsrc/gns/test_gns_cname_lookup.sh12
-rwxr-xr-xsrc/gns/test_gns_config_lookup.sh6
3 files changed, 12 insertions, 12 deletions
diff --git a/src/gns/test_gns_at_lookup.sh b/src/gns/test_gns_at_lookup.sh
index d900c070b..bacc63eb0 100755
--- a/src/gns/test_gns_at_lookup.sh
+++ b/src/gns/test_gns_at_lookup.sh
@@ -1,4 +1,4 @@
1#!/bin/bash 1#!/bin/sh
2# This file is in the public domain. 2# This file is in the public domain.
3trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT 3trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT
4 4
@@ -14,7 +14,7 @@ then
14 exit 77 14 exit 77
15fi 15fi
16 16
17which timeout &> /dev/null && DO_TIMEOUT="timeout 5" 17which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 5"
18rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME` 18rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME`
19 19
20TEST_IP="127.0.0.1" 20TEST_IP="127.0.0.1"
@@ -31,7 +31,7 @@ gnunet-namestore -z delegatedego -d -n '@' -t A -V $TEST_IP -e never -c test_gn
31gnunet-arm -e -c test_gns_lookup.conf 31gnunet-arm -e -c test_gns_lookup.conf
32rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME` 32rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME`
33 33
34if [ "$RES_IP" == "$TEST_IP" ] 34if [ "$RES_IP" = "$TEST_IP" ]
35then 35then
36 exit 0 36 exit 0
37else 37else
diff --git a/src/gns/test_gns_cname_lookup.sh b/src/gns/test_gns_cname_lookup.sh
index de575c561..d97a4fe5e 100755
--- a/src/gns/test_gns_cname_lookup.sh
+++ b/src/gns/test_gns_cname_lookup.sh
@@ -1,4 +1,4 @@
1#!/bin/bash 1#!/bin/sh
2# This file is in the public domain. 2# This file is in the public domain.
3trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT 3trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT
4 4
@@ -16,7 +16,7 @@ fi
16 16
17# permissive DNS resolver we will use for the test 17# permissive DNS resolver we will use for the test
18DNS_RESOLVER="8.8.8.8" 18DNS_RESOLVER="8.8.8.8"
19if ! nslookup gnunet.org $DNS_RESOLVER &> /dev/null 19if ! nslookup gnunet.org $DNS_RESOLVER > /dev/null 2>&1
20then 20then
21 echo "Cannot reach DNS, skipping test" 21 echo "Cannot reach DNS, skipping test"
22 exit 77 22 exit 77
@@ -36,7 +36,7 @@ TEST_RECORD_NAME_DNS="www3"
36MY_EGO="myego" 36MY_EGO="myego"
37TEST_DOMAIN_PLUS="www.$MY_EGO" 37TEST_DOMAIN_PLUS="www.$MY_EGO"
38TEST_DOMAIN_DNS="www3.$MY_EGO" 38TEST_DOMAIN_DNS="www3.$MY_EGO"
39which timeout &> /dev/null && DO_TIMEOUT="timeout 15" 39which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 15"
40 40
41gnunet-arm -s -c test_gns_lookup.conf 41gnunet-arm -s -c test_gns_lookup.conf
42gnunet-identity -C $MY_EGO -c test_gns_lookup.conf 42gnunet-identity -C $MY_EGO -c test_gns_lookup.conf
@@ -57,7 +57,7 @@ rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME`
57# make cmp case-insensitive by converting to lower case first 57# make cmp case-insensitive by converting to lower case first
58RES_CNAME_RAW=`echo $RES_CNAME_RAW | tr [A-Z] [a-z]` 58RES_CNAME_RAW=`echo $RES_CNAME_RAW | tr [A-Z] [a-z]`
59TESTEGOZONE=`echo $TESTEGOZONE | tr [A-Z] [a-z]` 59TESTEGOZONE=`echo $TESTEGOZONE | tr [A-Z] [a-z]`
60if [ "$RES_CNAME_RAW" == "server.$TESTEGOZONE" ] 60if [ "$RES_CNAME_RAW" = "server.$TESTEGOZONE" ]
61then 61then
62 echo "PASS: CNAME resolution from GNS" 62 echo "PASS: CNAME resolution from GNS"
63else 63else
@@ -65,7 +65,7 @@ else
65 exit 1 65 exit 1
66fi 66fi
67 67
68if [ "$RES_CNAME" == "$TEST_IP_PLUS" ] 68if [ "$RES_CNAME" = "$TEST_IP_PLUS" ]
69then 69then
70 echo "PASS: IP resolution from GNS" 70 echo "PASS: IP resolution from GNS"
71else 71else
@@ -73,7 +73,7 @@ else
73 exit 1 73 exit 1
74fi 74fi
75 75
76if [ "$RES_CNAME_DNS" == "$TEST_IP_DNS" ] 76if [ "$RES_CNAME_DNS" = "$TEST_IP_DNS" ]
77then 77then
78 echo "PASS: IP resolution from DNS" 78 echo "PASS: IP resolution from DNS"
79 exit 0 79 exit 0
diff --git a/src/gns/test_gns_config_lookup.sh b/src/gns/test_gns_config_lookup.sh
index 35d7c32d9..1c5a62b01 100755
--- a/src/gns/test_gns_config_lookup.sh
+++ b/src/gns/test_gns_config_lookup.sh
@@ -1,4 +1,4 @@
1#!/bin/bash 1#!/bin/sh
2# This file is in the public domain. 2# This file is in the public domain.
3trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT 3trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT
4 4
@@ -18,7 +18,7 @@ MY_EGO="myego"
18rm -rf `gnunet-config -c test_gns_lookup.conf -s PATHS -o GNUNET_HOME -f` 18rm -rf `gnunet-config -c test_gns_lookup.conf -s PATHS -o GNUNET_HOME -f`
19CFG=`mktemp --tmpdir=$PWD` 19CFG=`mktemp --tmpdir=$PWD`
20cp test_gns_lookup.conf $CFG || exit 77 20cp test_gns_lookup.conf $CFG || exit 77
21which timeout &> /dev/null && DO_TIMEOUT="timeout 5" 21which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 5"
22TEST_IP="dead::beef" 22TEST_IP="dead::beef"
23gnunet-arm -s -c $CFG || exit 77 23gnunet-arm -s -c $CFG || exit 77
24gnunet-identity -C $MY_EGO -c $CFG 24gnunet-identity -C $MY_EGO -c $CFG
@@ -35,7 +35,7 @@ gnunet-arm -e -c $CFG
35rm -rf `gnunet-config -c $CFG -f -s paths -o GNUNET_TEST_HOME` 35rm -rf `gnunet-config -c $CFG -f -s paths -o GNUNET_TEST_HOME`
36rm $CFG 36rm $CFG
37 37
38if [ "$RES_IP" == "$TEST_IP" ] 38if [ "$RES_IP" = "$TEST_IP" ]
39then 39then
40 exit 0 40 exit 0
41else 41else