diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-08-10 08:10:44 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-08-10 08:10:44 +0200 |
commit | a97983ddb198c4da1a76837a37af0940d59cb36a (patch) | |
tree | c5e9ef8b579edc4655502856c9f80cbdd84fa19b | |
parent | c2a0196f16d24bc5c80ec99e13487a337ffb347b (diff) |
indentation and logging fixes
-rw-r--r-- | src/testing/test_bank_api.c | 6 | ||||
-rw-r--r-- | src/testing/test_bank_api_twisted.c | 12 | ||||
-rw-r--r-- | src/testing/testing_api_cmd_bank_transfer.c | 6 | ||||
-rw-r--r-- | src/testing/testing_api_twister_helpers.c | 31 |
4 files changed, 31 insertions, 24 deletions
diff --git a/src/testing/test_bank_api.c b/src/testing/test_bank_api.c index 3e34974bf..8e788493d 100644 --- a/src/testing/test_bank_api.c +++ b/src/testing/test_bank_api.c @@ -197,9 +197,9 @@ main (int argc, return 77; } - if (NULL == (bankd = TALER_TESTING_run_bank (CONFIG_FILE_PYBANK, - bc.exchange_auth. - wire_gateway_url))) + if (NULL == (bankd = TALER_TESTING_run_bank ( + CONFIG_FILE_PYBANK, + bc.exchange_auth.wire_gateway_url))) { GNUNET_break (0); return 77; diff --git a/src/testing/test_bank_api_twisted.c b/src/testing/test_bank_api_twisted.c index d17c3c81b..b3e861e51 100644 --- a/src/testing/test_bank_api_twisted.c +++ b/src/testing/test_bank_api_twisted.c @@ -174,8 +174,8 @@ main (int argc, else cfgfilename = CONFIG_FILE_PYBANK; - if (NULL == (twister_url = TALER_TWISTER_prepare_twister - (cfgfilename))) + if (NULL == (twister_url = TALER_TWISTER_prepare_twister ( + cfgfilename))) { GNUNET_break (0); return 77; @@ -189,7 +189,6 @@ main (int argc, GNUNET_free (twister_url); return 77; } - if (GNUNET_YES == with_fakebank) { TALER_LOG_DEBUG ("Running against the Fakebank.\n"); @@ -217,9 +216,9 @@ main (int argc, return 77; } - if (NULL == (bankd = TALER_TESTING_run_bank (cfgfilename, - bc.exchange_auth. - wire_gateway_url))) + if (NULL == (bankd = TALER_TESTING_run_bank ( + cfgfilename, + bc.exchange_auth.wire_gateway_url))) { GNUNET_break (0); GNUNET_free (twister_url); @@ -227,6 +226,7 @@ main (int argc, } } + sleep (5); ret = GNUNET_CONFIGURATION_parse_and_run (cfgfilename, &setup_with_cfg, NULL); diff --git a/src/testing/testing_api_cmd_bank_transfer.c b/src/testing/testing_api_cmd_bank_transfer.c index 7e7174b24..36d5e8919 100644 --- a/src/testing/testing_api_cmd_bank_transfer.c +++ b/src/testing/testing_api_cmd_bank_transfer.c @@ -209,7 +209,7 @@ confirmation_cb (void *cls, } GNUNET_break (0); GNUNET_log (GNUNET_ERROR_TYPE_ERROR, - "Fakebank returned HTTP status %u/%d\n", + "Bank returned HTTP status %u/%d\n", http_status, (int) ec); TALER_TESTING_interpreter_fail (is); @@ -252,8 +252,8 @@ transfer_run (void *cls, &buf_size); fts->is = is; fts->weh - = TALER_BANK_transfer - (TALER_TESTING_interpreter_get_context (is), + = TALER_BANK_transfer ( + TALER_TESTING_interpreter_get_context (is), &fts->auth, buf, buf_size, diff --git a/src/testing/testing_api_twister_helpers.c b/src/testing/testing_api_twister_helpers.c index 5f8663d46..935d8bcc1 100644 --- a/src/testing/testing_api_twister_helpers.c +++ b/src/testing/testing_api_twister_helpers.c @@ -44,13 +44,16 @@ TALER_TWISTER_prepare_twister (const char *config_filename) cfg = GNUNET_CONFIGURATION_create (); - if (GNUNET_OK != GNUNET_CONFIGURATION_load - (cfg, config_filename)) + if (GNUNET_OK != + GNUNET_CONFIGURATION_load (cfg, + config_filename)) TWISTER_FAIL (); - if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_number - (cfg, "twister", - "HTTP_PORT", &port)) + if (GNUNET_OK != + GNUNET_CONFIGURATION_get_value_number (cfg, + "twister", + "HTTP_PORT", + &port)) { GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, "twister", @@ -61,8 +64,9 @@ TALER_TWISTER_prepare_twister (const char *config_filename) GNUNET_CONFIGURATION_destroy (cfg); - if (GNUNET_OK != GNUNET_NETWORK_test_port_free - (IPPROTO_TCP, (uint16_t) port)) + if (GNUNET_OK != + GNUNET_NETWORK_test_port_free (IPPROTO_TCP, + (uint16_t) port)) { fprintf (stderr, "Required port %llu not available, skipping.\n", @@ -119,8 +123,10 @@ TALER_TWISTER_run_twister (const char *config_filename) } - if (GNUNET_SYSERR == GNUNET_OS_process_wait_status - (client_proc, &type, &code)) + if (GNUNET_SYSERR == + GNUNET_OS_process_wait_status (client_proc, + &type, + &code)) { GNUNET_OS_process_destroy (client_proc); GNUNET_OS_process_kill (proc, SIGTERM); @@ -131,7 +137,8 @@ TALER_TWISTER_run_twister (const char *config_filename) if ( (type == GNUNET_OS_PROCESS_EXITED) && (0 != code) ) { - fprintf (stderr, "Failed to check twister works.\n"); + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Failed to check twister works.\n"); GNUNET_OS_process_destroy (client_proc); GNUNET_OS_process_kill (proc, SIGTERM); GNUNET_OS_process_wait (proc); @@ -141,8 +148,8 @@ TALER_TWISTER_run_twister (const char *config_filename) if ( (type != GNUNET_OS_PROCESS_EXITED) || (0 != code) ) { - fprintf (stderr, "Unexpected error running" - " `taler-twister'!\n"); + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Unexpected error running `taler-twister'!\n"); GNUNET_OS_process_destroy (client_proc); GNUNET_OS_process_kill (proc, SIGTERM); GNUNET_OS_process_wait (proc); |