gnunet-svn
[Top][All Lists]
Advanced

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

[taler-exchange] branch master updated: improve test logging


From: gnunet
Subject: [taler-exchange] branch master updated: improve test logging
Date: Thu, 28 Jan 2021 21:23:18 +0100

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository exchange.

The following commit(s) were added to refs/heads/master by this push:
     new bfd0a962 improve test logging
bfd0a962 is described below

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

    improve test logging
---
 src/util/crypto_helper_denom.c | 4 ++++
 src/util/crypto_helper_esign.c | 6 ++++++
 src/util/test_helper_eddsa.c   | 8 +++++---
 src/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
index 0545863d..a70d071d 100644
--- 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
index 4d8daf88..3759d0c8 100644
--- 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
index 5ac10a98..aac85585 100644
--- 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
index 17006a66..96b88c34 100644
--- 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)
   {

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

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