summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcello Stanisci <stanisci.m@gmail.com>2018-12-19 12:18:47 +0100
committerMarcello Stanisci <stanisci.m@gmail.com>2018-12-19 12:18:47 +0100
commit396b7747db0d1ba94f1cd3369f826c2c779ed454 (patch)
tree5ecc1f427c920215a0f3e9d72faf0ef6f06621bf
parent17cac648f18e97bb43ae6829ffbe1f0b11541ba8 (diff)
downloadtwister-396b7747db0d1ba94f1cd3369f826c2c779ed454.tar.gz
twister-396b7747db0d1ba94f1cd3369f826c2c779ed454.tar.bz2
twister-396b7747db0d1ba94f1cd3369f826c2c779ed454.zip
#5459
-rw-r--r--src/twister/testing_api_cmd_exec_client.c104
1 files changed, 56 insertions, 48 deletions
diff --git a/src/twister/testing_api_cmd_exec_client.c b/src/twister/testing_api_cmd_exec_client.c
index 860457a..efdac46 100644
--- a/src/twister/testing_api_cmd_exec_client.c
+++ b/src/twister/testing_api_cmd_exec_client.c
@@ -267,17 +267,18 @@ TALER_TESTING_cmd_hack_response_code (const char *label,
unsigned int http_status)
{
struct HackResponseCodeState *hrcs;
- struct TALER_TESTING_Command cmd;
hrcs = GNUNET_new (struct HackResponseCodeState);
hrcs->http_status = http_status;
hrcs->config_filename = config_filename;
- cmd.label = label;
- cmd.run = &hack_response_code_run;
- cmd.cleanup = &hack_response_code_cleanup;
- cmd.traits = &hack_response_code_traits;
- cmd.cls = hrcs;
+ struct TALER_TESTING_Command cmd = {
+ .label = label,
+ .run = &hack_response_code_run,
+ .cleanup = &hack_response_code_cleanup,
+ .traits = &hack_response_code_traits,
+ .cls = hrcs
+ };
return cmd;
}
@@ -507,17 +508,18 @@ TALER_TESTING_cmd_delete_object (const char *label,
const char *path)
{
struct DeleteObjectState *dos;
- struct TALER_TESTING_Command cmd;
dos = GNUNET_new (struct DeleteObjectState);
dos->path = path;
dos->config_filename = config_filename;
- cmd.label = label;
- cmd.run = &delete_object_run;
- cmd.cleanup = &delete_object_cleanup;
- cmd.traits = &delete_object_traits;
- cmd.cls = dos;
+ struct TALER_TESTING_Command cmd = {
+ .label = label,
+ .run = &delete_object_run,
+ .cleanup = &delete_object_cleanup,
+ .traits = &delete_object_traits,
+ .cls = dos
+ };
return cmd;
}
@@ -658,17 +660,18 @@ TALER_TESTING_cmd_flip_upload (const char *label,
const char *path)
{
struct FlipObjectState *dos;
- struct TALER_TESTING_Command cmd = {0};
dos = GNUNET_new (struct FlipObjectState);
dos->path = path;
dos->config_filename = config_filename;
- cmd.label = label;
- cmd.run = &flip_upload_run;
- cmd.cleanup = &flip_object_cleanup;
- cmd.traits = &flip_object_traits;
- cmd.cls = dos;
+ struct TALER_TESTING_Command cmd = {
+ .label = label,
+ .run = &flip_upload_run,
+ .cleanup = &flip_object_cleanup,
+ .traits = &flip_object_traits,
+ .cls = dos
+ };
return cmd;
}
@@ -689,17 +692,18 @@ TALER_TESTING_cmd_flip_download (const char *label,
const char *path)
{
struct FlipObjectState *dos;
- struct TALER_TESTING_Command cmd;
dos = GNUNET_new (struct FlipObjectState);
dos->path = path;
dos->config_filename = config_filename;
- cmd.label = label;
- cmd.run = &flip_download_run;
- cmd.cleanup = &flip_object_cleanup;
- cmd.traits = &flip_object_traits;
- cmd.cls = dos;
+ struct TALER_TESTING_Command cmd = {
+ .label = label,
+ .run = &flip_download_run,
+ .cleanup = &flip_object_cleanup,
+ .traits = &flip_object_traits,
+ .cls = dos
+ };
return cmd;
}
@@ -889,16 +893,17 @@ TALER_TESTING_cmd_malform_request (const char *label,
const char *config_filename)
{
struct MalformRequestState *mrs;
- struct TALER_TESTING_Command cmd;
mrs = GNUNET_new (struct MalformRequestState);
mrs->config_filename = config_filename;
- cmd.label = label;
- cmd.run = &malform_request_run;
- cmd.cleanup = &malform_request_cleanup;
- cmd.traits = &malform_request_traits;
- cmd.cls = mrs;
+ struct TALER_TESTING_Command cmd = {
+ .label = label,
+ .run = &malform_request_run,
+ .cleanup = &malform_request_cleanup,
+ .traits = &malform_request_traits,
+ .cls = mrs
+ };
return cmd;
}
@@ -918,16 +923,17 @@ TALER_TESTING_cmd_malform_response (const char *label,
const char *config_filename)
{
struct MalformResponseState *mrs;
- struct TALER_TESTING_Command cmd;
mrs = GNUNET_new (struct MalformResponseState);
mrs->config_filename = config_filename;
- cmd.label = label;
- cmd.run = &malform_response_run;
- cmd.cleanup = &malform_response_cleanup;
- cmd.traits = &malform_response_traits;
- cmd.cls = mrs;
+ struct TALER_TESTING_Command cmd = {
+ .label = label,
+ .run = &malform_response_run,
+ .cleanup = &malform_response_cleanup,
+ .traits = &malform_response_traits,
+ .cls = mrs
+ };
return cmd;
@@ -953,18 +959,19 @@ TALER_TESTING_cmd_modify_object_dl (const char *label,
const char *value)
{
struct ModifyObjectState *mos;
- struct TALER_TESTING_Command cmd;
mos = GNUNET_new (struct ModifyObjectState);
mos->path = path;
mos->value = value;
mos->config_filename = config_filename;
- cmd.label = label;
- cmd.run = &modify_object_dl_run;
- cmd.cleanup = &modify_object_cleanup;
- cmd.traits = &modify_object_traits;
- cmd.cls = mos;
+ struct TALER_TESTING_Command cmd = {
+ .label = label,
+ .run = &modify_object_dl_run,
+ .cleanup = &modify_object_cleanup,
+ .traits = &modify_object_traits,
+ .cls = mos
+ };
return cmd;
}
@@ -989,18 +996,19 @@ TALER_TESTING_cmd_modify_object_ul (const char *label,
const char *value)
{
struct ModifyObjectState *mos;
- struct TALER_TESTING_Command cmd;
mos = GNUNET_new (struct ModifyObjectState);
mos->path = path;
mos->value = value;
mos->config_filename = config_filename;
- cmd.label = label;
- cmd.run = &modify_object_ul_run;
- cmd.cleanup = &modify_object_cleanup;
- cmd.traits = &modify_object_traits;
- cmd.cls = mos;
+ struct TALER_TESTING_Command cmd = {
+ .label = label,
+ .run = &modify_object_ul_run,
+ .cleanup = &modify_object_cleanup,
+ .traits = &modify_object_traits,
+ .cls = mos
+ };
return cmd;
}