From: Nathan S. Evans Date: Fri, 7 May 2010 09:44:56 +0000 (+0000) Subject: fix for failure of dht testcase due to long wait for hostkey generation. testcase... X-Git-Tag: initial-import-from-subversion-38251~21826 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=e8fa3dbf6a3368a79b640c7d7229e42cc3318c9d;p=oweals%2Fgnunet.git fix for failure of dht testcase due to long wait for hostkey generation. testcase now uses gnunet-peerinfo to generate the hostkey first, then runs gnunet. A much better fix would be to have services that need a hostkey not report to arm that they are happily running when they may hang indefinitely trying to generate or retrieve a hostkey. Or if most things really need a hostkey have gnunet-service-arm generate the damned thing BEFORE starting services. --- diff --git a/src/dht/test_dht_tools.sh b/src/dht/test_dht_tools.sh index 0154d99c7..cbbbfd639 100755 --- a/src/dht/test_dht_tools.sh +++ b/src/dht/test_dht_tools.sh @@ -6,7 +6,7 @@ checkout="check.out" armexe="gnunet-arm -c $tempcfg " putexe="gnunet-dht-put -c $tempcfg " getexe="gnunet-dht-get -c $tempcfg " - +peerinfo="gnunet-peerinfo -c $tempcfg -sq" stop_arm() { if ! $armexe $DEBUG -e -d > $out ; then @@ -19,6 +19,14 @@ stop_arm() cp test_dht_api_peer1.conf $tempcfg +echo -n "TEST: Generating hostkey..." +if ! $peerinfo > $out ; then + echo "FAIL: error running $peerinfo" + echo "Command output was:" + cat $out + exit 1 +fi + echo -n "TEST: Starting ARM..." if ! $armexe $DEBUG -s > $out ; then echo "FAIL: error running $armexe"