exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

commit bfd0a9625436f07a5c2b2d8b397525107da97ddb
parent f3329ee39876fc7d41e07e69bf519304478cbfc4
Author: Christian Grothoff <christian@grothoff.org>
Date:   Thu, 28 Jan 2021 21:23:16 +0100

improve test logging

Diffstat:
Msrc/util/crypto_helper_denom.c | 4++++
Msrc/util/crypto_helper_esign.c | 6++++++
Msrc/util/test_helper_eddsa.c | 8+++++---
Msrc/util/test_helper_rsa.c | 8+++++---
4 files changed, 20 insertions(+), 6 deletions(-)

diff --git a/src/util/crypto_helper_denom.c b/src/util/crypto_helper_denom.c @@ -518,6 +518,8 @@ TALER_CRYPTO_helper_denom_sign ( try_connect (dh); if (-1 == dh->sock) { + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + "Failed to connect to helper\n"); *ec = TALER_EC_EXCHANGE_DENOMINATION_HELPER_UNAVAILABLE; return ds; } @@ -556,6 +558,8 @@ TALER_CRYPTO_helper_denom_sign ( if (! await_read_ready (dh)) { do_disconnect (dh); + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + "Timeout waiting for helper\n"); *ec = TALER_EC_GENERIC_TIMEOUT; return ds; } diff --git a/src/util/crypto_helper_esign.c b/src/util/crypto_helper_esign.c @@ -469,7 +469,11 @@ TALER_CRYPTO_helper_esign_sign_ ( try_connect (esh); if (-1 == esh->sock) + { + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + "Failed to connect to helper\n"); return TALER_EC_EXCHANGE_SIGNKEY_HELPER_UNAVAILABLE; + } sr->header.size = htons (sizeof (buf)); sr->header.type = htons (TALER_HELPER_EDDSA_MT_REQ_SIGN); sr->reserved = htonl (0); @@ -504,6 +508,8 @@ TALER_CRYPTO_helper_esign_sign_ ( if (! await_read_ready (esh)) { do_disconnect (esh); + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + "Timeout waiting for helper\n"); return TALER_EC_GENERIC_TIMEOUT; } ret = recv (esh->sock, diff --git a/src/util/test_helper_eddsa.c b/src/util/test_helper_eddsa.c @@ -253,7 +253,9 @@ test_signing (struct TALER_CRYPTO_ExchangeSignHelper *esh) break; default: /* unexpected error */ - GNUNET_break (0); + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Unexpected error %d\n", + ec); return 7; } } @@ -394,7 +396,7 @@ main (int argc, (void) argc; (void) argv; GNUNET_log_setup ("test-helper-eddsa", - "WARNING", + "INFO", NULL); GNUNET_OS_init (TALER_project_data_default ()); libexec_dir = GNUNET_OS_installation_get_path (GNUNET_OS_IPK_BINDIR); @@ -410,7 +412,7 @@ main (int argc, "-c", "test_helper_eddsa.conf", "-L", - "WARNING", + "INFO", NULL); if (NULL == helper) { diff --git a/src/util/test_helper_rsa.c b/src/util/test_helper_rsa.c @@ -333,7 +333,9 @@ test_signing (struct TALER_CRYPTO_DenominationHelper *dh) break; default: /* unexpected error */ - GNUNET_break (0); + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Unexpected error %d\n", + ec); return 7; } } @@ -534,7 +536,7 @@ main (int argc, (void) argc; (void) argv; GNUNET_log_setup ("test-helper-rsa", - "WARNING", + "INFO", NULL); GNUNET_OS_init (TALER_project_data_default ()); libexec_dir = GNUNET_OS_installation_get_path (GNUNET_OS_IPK_BINDIR); @@ -550,7 +552,7 @@ main (int argc, "-c", "test_helper_rsa.conf", "-L", - "WARNING", + "INFO", NULL); if (NULL == helper) {