-fix check
This commit is contained in:
parent
0ac1b7abad
commit
61616fe2c8
@ -670,7 +670,6 @@ helper_rsa_cb (
|
|||||||
section_name,
|
section_name,
|
||||||
GNUNET_STRINGS_relative_time_to_string (validity_duration,
|
GNUNET_STRINGS_relative_time_to_string (validity_duration,
|
||||||
GNUNET_NO));
|
GNUNET_NO));
|
||||||
GNUNET_assert (TALER_DENOMINATION_RSA == denom_pub->cipher);
|
|
||||||
key_generation++;
|
key_generation++;
|
||||||
TEH_resume_keys_requests (false);
|
TEH_resume_keys_requests (false);
|
||||||
hd = GNUNET_CONTAINER_multihashmap_get (hs->rsa_keys,
|
hd = GNUNET_CONTAINER_multihashmap_get (hs->rsa_keys,
|
||||||
@ -688,9 +687,9 @@ helper_rsa_cb (
|
|||||||
hd->validity_duration = validity_duration;
|
hd->validity_duration = validity_duration;
|
||||||
hd->h_details.h_rsa = *h_rsa;
|
hd->h_details.h_rsa = *h_rsa;
|
||||||
hd->sm_sig = *sm_sig;
|
hd->sm_sig = *sm_sig;
|
||||||
|
GNUNET_assert (TALER_DENOMINATION_RSA == hd->denom_pub.cipher);
|
||||||
TALER_denom_pub_deep_copy (&hd->denom_pub,
|
TALER_denom_pub_deep_copy (&hd->denom_pub,
|
||||||
denom_pub);
|
denom_pub);
|
||||||
GNUNET_assert (TALER_DENOMINATION_RSA == hd->denom_pub.cipher);
|
|
||||||
// FIXME-OEC: set AGE RESTRICTION (from 'global' variable,
|
// FIXME-OEC: set AGE RESTRICTION (from 'global' variable,
|
||||||
// that itself is set from /managmenet API!) HERE!
|
// that itself is set from /managmenet API!) HERE!
|
||||||
// ISSUE: tricky to handle if configuration changes
|
// ISSUE: tricky to handle if configuration changes
|
||||||
|
@ -29,6 +29,12 @@
|
|||||||
#include "taler_signatures.h"
|
#include "taler_signatures.h"
|
||||||
#include "taler_testing_lib.h"
|
#include "taler_testing_lib.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Run multiple taler-exchange-httpd processes in
|
||||||
|
* parallel using GNU parallel?
|
||||||
|
*/
|
||||||
|
#define GNU_PARALLEL 1
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
TALER_TESTING_cleanup_files (const char *config_name)
|
TALER_TESTING_cleanup_files (const char *config_name)
|
||||||
@ -74,12 +80,13 @@ remove_dir (const struct GNUNET_CONFIGURATION_Handle *cfg,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int
|
enum GNUNET_GenericReturnValue
|
||||||
TALER_TESTING_cleanup_files_cfg (void *cls,
|
TALER_TESTING_cleanup_files_cfg (void *cls,
|
||||||
const struct GNUNET_CONFIGURATION_Handle *cfg)
|
const struct GNUNET_CONFIGURATION_Handle *cfg)
|
||||||
{
|
{
|
||||||
char *dir;
|
char *dir;
|
||||||
|
|
||||||
|
(void) cls;
|
||||||
if (GNUNET_OK !=
|
if (GNUNET_OK !=
|
||||||
GNUNET_CONFIGURATION_get_value_filename (cfg,
|
GNUNET_CONFIGURATION_get_value_filename (cfg,
|
||||||
"exchange-offline",
|
"exchange-offline",
|
||||||
@ -115,7 +122,7 @@ TALER_TESTING_cleanup_files_cfg (void *cls,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int
|
enum GNUNET_GenericReturnValue
|
||||||
TALER_TESTING_run_auditor_exchange (const char *config_filename,
|
TALER_TESTING_run_auditor_exchange (const char *config_filename,
|
||||||
const char *exchange_master_pub,
|
const char *exchange_master_pub,
|
||||||
const char *exchange_base_url,
|
const char *exchange_base_url,
|
||||||
@ -164,7 +171,7 @@ TALER_TESTING_run_auditor_exchange (const char *config_filename,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int
|
enum GNUNET_GenericReturnValue
|
||||||
TALER_TESTING_exchange_db_reset (const char *config_filename)
|
TALER_TESTING_exchange_db_reset (const char *config_filename)
|
||||||
{
|
{
|
||||||
struct GNUNET_OS_Process *proc;
|
struct GNUNET_OS_Process *proc;
|
||||||
@ -215,7 +222,7 @@ TALER_TESTING_exchange_db_reset (const char *config_filename)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int
|
enum GNUNET_GenericReturnValue
|
||||||
TALER_TESTING_auditor_db_reset (const char *config_filename)
|
TALER_TESTING_auditor_db_reset (const char *config_filename)
|
||||||
{
|
{
|
||||||
struct GNUNET_OS_Process *proc;
|
struct GNUNET_OS_Process *proc;
|
||||||
@ -297,7 +304,7 @@ struct SignInfo
|
|||||||
* @param cfg configuration to use
|
* @param cfg configuration to use
|
||||||
* @return #GNUNET_OK on success
|
* @return #GNUNET_OK on success
|
||||||
*/
|
*/
|
||||||
static int
|
static enum GNUNET_GenericReturnValue
|
||||||
sign_keys_for_exchange (void *cls,
|
sign_keys_for_exchange (void *cls,
|
||||||
const struct GNUNET_CONFIGURATION_Handle *cfg)
|
const struct GNUNET_CONFIGURATION_Handle *cfg)
|
||||||
{
|
{
|
||||||
@ -388,7 +395,7 @@ fail:
|
|||||||
* @return #GNUNET_OK on success, #GNUNET_NO if test should be
|
* @return #GNUNET_OK on success, #GNUNET_NO if test should be
|
||||||
* skipped, #GNUNET_SYSERR on test failure
|
* skipped, #GNUNET_SYSERR on test failure
|
||||||
*/
|
*/
|
||||||
int
|
enum GNUNET_GenericReturnValue
|
||||||
TALER_TESTING_prepare_exchange (const char *config_filename,
|
TALER_TESTING_prepare_exchange (const char *config_filename,
|
||||||
int reset_db,
|
int reset_db,
|
||||||
struct TALER_TESTING_ExchangeConfiguration *ec)
|
struct TALER_TESTING_ExchangeConfiguration *ec)
|
||||||
@ -581,7 +588,7 @@ TALER_TESTING_wait_auditor_ready (const char *base_url)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int
|
enum GNUNET_GenericReturnValue
|
||||||
TALER_TESTING_setup_with_exchange (TALER_TESTING_Main main_cb,
|
TALER_TESTING_setup_with_exchange (TALER_TESTING_Main main_cb,
|
||||||
void *main_cb_cls,
|
void *main_cb_cls,
|
||||||
const char *config_file)
|
const char *config_file)
|
||||||
@ -591,7 +598,7 @@ TALER_TESTING_setup_with_exchange (TALER_TESTING_Main main_cb,
|
|||||||
.main_cb = main_cb,
|
.main_cb = main_cb,
|
||||||
.main_cb_cls = main_cb_cls
|
.main_cb_cls = main_cb_cls
|
||||||
};
|
};
|
||||||
int result;
|
enum GNUNET_GenericReturnValue result;
|
||||||
|
|
||||||
result =
|
result =
|
||||||
GNUNET_CONFIGURATION_parse_and_run (config_file,
|
GNUNET_CONFIGURATION_parse_and_run (config_file,
|
||||||
@ -631,7 +638,7 @@ stop_helpers (struct GNUNET_OS_Process *helpers[2])
|
|||||||
* @param config_filename configuration file to use
|
* @param config_filename configuration file to use
|
||||||
* @param[out] helpers where to store the process handles.
|
* @param[out] helpers where to store the process handles.
|
||||||
*/
|
*/
|
||||||
static int
|
static enum GNUNET_GenericReturnValue
|
||||||
start_helpers (const char *config_filename,
|
start_helpers (const char *config_filename,
|
||||||
struct GNUNET_OS_Process *helpers[2])
|
struct GNUNET_OS_Process *helpers[2])
|
||||||
{
|
{
|
||||||
@ -690,7 +697,7 @@ start_helpers (const char *config_filename,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int
|
enum GNUNET_GenericReturnValue
|
||||||
TALER_TESTING_setup_with_exchange_cfg (
|
TALER_TESTING_setup_with_exchange_cfg (
|
||||||
void *cls,
|
void *cls,
|
||||||
const struct GNUNET_CONFIGURATION_Handle *cfg)
|
const struct GNUNET_CONFIGURATION_Handle *cfg)
|
||||||
@ -751,10 +758,20 @@ TALER_TESTING_setup_with_exchange_cfg (
|
|||||||
}
|
}
|
||||||
exchanged = GNUNET_OS_start_process (GNUNET_OS_INHERIT_STD_ALL,
|
exchanged = GNUNET_OS_start_process (GNUNET_OS_INHERIT_STD_ALL,
|
||||||
NULL, NULL, NULL,
|
NULL, NULL, NULL,
|
||||||
|
#if GNU_PARALLEL
|
||||||
|
"parallel",
|
||||||
|
#endif
|
||||||
"taler-exchange-httpd",
|
"taler-exchange-httpd",
|
||||||
"taler-exchange-httpd",
|
"taler-exchange-httpd",
|
||||||
"-a", /* some tests may need timetravel */
|
"-a", /* some tests may need timetravel */
|
||||||
"-c", setup_ctx->config_filename,
|
"-c", setup_ctx->config_filename,
|
||||||
|
#if GNU_PARALLEL
|
||||||
|
":::",
|
||||||
|
"-",
|
||||||
|
"-",
|
||||||
|
"-",
|
||||||
|
"-",
|
||||||
|
#endif
|
||||||
NULL);
|
NULL);
|
||||||
if (NULL == exchanged)
|
if (NULL == exchanged)
|
||||||
{
|
{
|
||||||
@ -782,6 +799,14 @@ TALER_TESTING_setup_with_exchange_cfg (
|
|||||||
GNUNET_break (0 ==
|
GNUNET_break (0 ==
|
||||||
GNUNET_OS_process_kill (exchanged,
|
GNUNET_OS_process_kill (exchanged,
|
||||||
SIGTERM));
|
SIGTERM));
|
||||||
|
#if GNU_PARALLEL
|
||||||
|
/* GNU Parallel kills on 2nd SIGTERM, need to give it a
|
||||||
|
chance to process the 1st signal first... */
|
||||||
|
sleep (1);
|
||||||
|
GNUNET_break (0 ==
|
||||||
|
GNUNET_OS_process_kill (exchanged,
|
||||||
|
SIGTERM));
|
||||||
|
#endif
|
||||||
GNUNET_break (GNUNET_OK ==
|
GNUNET_break (GNUNET_OK ==
|
||||||
GNUNET_OS_process_wait (exchanged));
|
GNUNET_OS_process_wait (exchanged));
|
||||||
GNUNET_OS_process_destroy (exchanged);
|
GNUNET_OS_process_destroy (exchanged);
|
||||||
@ -798,6 +823,14 @@ TALER_TESTING_setup_with_exchange_cfg (
|
|||||||
GNUNET_break (0 ==
|
GNUNET_break (0 ==
|
||||||
GNUNET_OS_process_kill (exchanged,
|
GNUNET_OS_process_kill (exchanged,
|
||||||
SIGTERM));
|
SIGTERM));
|
||||||
|
#if GNU_PARALLEL
|
||||||
|
/* GNU Parallel kills on 2nd SIGTERM, need to give it a
|
||||||
|
chance to process the 1st signal first... */
|
||||||
|
sleep (1);
|
||||||
|
GNUNET_break (0 ==
|
||||||
|
GNUNET_OS_process_kill (exchanged,
|
||||||
|
SIGTERM));
|
||||||
|
#endif
|
||||||
GNUNET_break (GNUNET_OK ==
|
GNUNET_break (GNUNET_OK ==
|
||||||
GNUNET_OS_process_wait (exchanged));
|
GNUNET_OS_process_wait (exchanged));
|
||||||
GNUNET_OS_process_destroy (exchanged);
|
GNUNET_OS_process_destroy (exchanged);
|
||||||
@ -806,7 +839,7 @@ TALER_TESTING_setup_with_exchange_cfg (
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int
|
enum GNUNET_GenericReturnValue
|
||||||
TALER_TESTING_setup_with_auditor_and_exchange_cfg (
|
TALER_TESTING_setup_with_auditor_and_exchange_cfg (
|
||||||
void *cls,
|
void *cls,
|
||||||
const struct GNUNET_CONFIGURATION_Handle *cfg)
|
const struct GNUNET_CONFIGURATION_Handle *cfg)
|
||||||
@ -902,7 +935,7 @@ TALER_TESTING_setup_with_auditor_and_exchange_cfg (
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int
|
enum GNUNET_GenericReturnValue
|
||||||
TALER_TESTING_setup_with_auditor_and_exchange (TALER_TESTING_Main main_cb,
|
TALER_TESTING_setup_with_auditor_and_exchange (TALER_TESTING_Main main_cb,
|
||||||
void *main_cb_cls,
|
void *main_cb_cls,
|
||||||
const char *config_file)
|
const char *config_file)
|
||||||
@ -920,7 +953,7 @@ TALER_TESTING_setup_with_auditor_and_exchange (TALER_TESTING_Main main_cb,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int
|
enum GNUNET_GenericReturnValue
|
||||||
TALER_TESTING_url_port_free (const char *url)
|
TALER_TESTING_url_port_free (const char *url)
|
||||||
{
|
{
|
||||||
const char *port;
|
const char *port;
|
||||||
|
Loading…
Reference in New Issue
Block a user