improve test logging
This commit is contained in:
parent
f3329ee398
commit
bfd0a96254
@ -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;
|
||||
}
|
||||
|
@ -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,
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user