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