gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-exchange] branch master updated (e153215f -> 9cbd1cc1)


From: gnunet
Subject: [taler-exchange] branch master updated (e153215f -> 9cbd1cc1)
Date: Sat, 07 Dec 2019 17:20:11 +0100

This is an automated email from the git hooks/post-receive script.

grothoff pushed a change to branch master
in repository exchange.

    from e153215f fix j2
     new b164e090 check total loss initially
     new 5a96c528 mark unused argument
     new 91a418fe add valgrind prefix capability
     new 9cbd1cc1 report on file used

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 contrib/auditor-report.tex.j2            |  2 +-
 src/auditor/taler-auditor.c              |  2 ++
 src/auditor/test-auditor.sh              | 18 ++++++++++++++----
 src/exchange-tools/taler-exchange-wire.c |  5 +++--
 src/lib/test_exchange_api.conf           |  9 +++++++++
 src/lib/testing_api_helpers.c            | 11 +++++------
 6 files changed, 34 insertions(+), 13 deletions(-)

diff --git a/contrib/auditor-report.tex.j2 b/contrib/auditor-report.tex.j2
index 2c2f1636..6985bfcd 100644
--- a/contrib/auditor-report.tex.j2
+++ b/contrib/auditor-report.tex.j2
@@ -631,7 +631,7 @@ public key for ``payback-master'' operations.
   \label{table:bad_signature_losses}
 \endlastfoot
 {% for item in data.bad_sig_losses %}
-  \multicolumn{3}{l}{ {\tt \small {{ item.key_pub }} } } \\
+  \multicolumn{3}{l}{ {\tt \small \truncate{0.9\textwidth}{ {{ item.key_pub }} 
} } } \\
 \nopagebreak
   {{ item.operation }} &
   {{ item.row }} &
diff --git a/src/auditor/taler-auditor.c b/src/auditor/taler-auditor.c
index 0834d1dc..6e4c76a9 100644
--- a/src/auditor/taler-auditor.c
+++ b/src/auditor/taler-auditor.c
@@ -1116,6 +1116,8 @@ handle_reserve_out (void *cls,
   struct GNUNET_TIME_Absolute expire_withdraw;
   enum GNUNET_DB_QueryStatus qs;
 
+  (void) denom_sig; /* FIXME: checked elsewhere? If so, potential for
+                       optimization to simply not fetch this value from DB! */
   /* should be monotonically increasing */
   GNUNET_assert (rowid >= ppr.last_reserve_out_serial_id);
   ppr.last_reserve_out_serial_id = rowid + 1;
diff --git a/src/auditor/test-auditor.sh b/src/auditor/test-auditor.sh
index 7100c5a4..1883a9ec 100755
--- a/src/auditor/test-auditor.sh
+++ b/src/auditor/test-auditor.sh
@@ -23,6 +23,10 @@ ALL_TESTS=`seq 0 25`
 #
 TESTS=${1:-$ALL_TESTS}
 
+# Global variable to run the auditor processes under valgrind
+# VALGRIND=valgrind
+VALGRIND=""
+
 # Exit, with status code "skip" (no 'real' failure)
 function exit_skip() {
     echo $1
@@ -68,15 +72,15 @@ function pre_audit () {
 function audit_only () {
     # Run the auditor!
     echo -n "Running audit(s) ..."
-    taler-auditor -L DEBUG -r -c $CONF -m $MASTER_PUB > test-audit.json 2> 
test-audit.log || exit_fail "auditor failed"
+    $VALGRIND taler-auditor -L DEBUG -r -c $CONF -m $MASTER_PUB > 
test-audit.json 2> test-audit.log || exit_fail "auditor failed"
     echo -n "."
     # Also do incremental run
-    taler-auditor -L DEBUG -c $CONF -m $MASTER_PUB > test-audit-inc.json 2> 
test-audit-inc.log || exit_fail "auditor failed"
+    $VALGRIND taler-auditor -L DEBUG -c $CONF -m $MASTER_PUB > 
test-audit-inc.json 2> test-audit-inc.log || exit_fail "auditor failed"
     echo -n "."
-    taler-wire-auditor -L DEBUG -r -c $CONF -m $MASTER_PUB > 
test-wire-audit.json 2> test-wire-audit.log || exit_fail "wire auditor failed"
+    $VALGRIND taler-wire-auditor -L DEBUG -r -c $CONF -m $MASTER_PUB > 
test-wire-audit.json 2> test-wire-audit.log || exit_fail "wire auditor failed"
     # Also do incremental run
     echo -n "."
-    taler-wire-auditor -L DEBUG -c $CONF -m $MASTER_PUB > 
test-wire-audit-inc.json 2> test-wire-audit-inc.log || exit_fail "wire auditor 
failed"
+    $VALGRIND taler-wire-auditor -L DEBUG -c $CONF -m $MASTER_PUB > 
test-wire-audit-inc.json 2> test-wire-audit-inc.log || exit_fail "wire auditor 
failed"
     echo " DONE"
 }
 
@@ -157,6 +161,12 @@ jq -e .wire_format_inconsistencies[0] < 
test-wire-audit.json > /dev/null && exit
 
 echo PASS
 
+LOSS=`jq -r .total_bad_sig_loss < test-audit.json`
+if test $LOSS != "TESTKUDOS:0.0"
+then
+    exit_fail "Wrong total bad sig loss, got unexpected loss of $LOSS"
+fi
+
 echo -n "Test for wire amounts... "
 WIRED=`jq -r .total_wire_in_delta_plus < test-wire-audit.json`
 if test $WIRED != "TESTKUDOS:0"
diff --git a/src/exchange-tools/taler-exchange-wire.c 
b/src/exchange-tools/taler-exchange-wire.c
index ae8a4a74..e39e3c82 100644
--- a/src/exchange-tools/taler-exchange-wire.c
+++ b/src/exchange-tools/taler-exchange-wire.c
@@ -198,8 +198,9 @@ run (void *cls,
                           &mpub_cfg))
   {
     fprintf (stderr,
-             "Master public key `%s' in configuration does not match our 
master private key!\n",
-             masters);
+             "Master public key `%s' in configuration does not match our 
master private key from `%s'!\n",
+             masters,
+             masterkeyfile);
     GNUNET_free (masters);
     global_ret = 1;
     return;
diff --git a/src/lib/test_exchange_api.conf b/src/lib/test_exchange_api.conf
index c2159dcd..c7adcfe0 100644
--- a/src/lib/test_exchange_api.conf
+++ b/src/lib/test_exchange_api.conf
@@ -5,6 +5,15 @@
 # Persistant data storage for the testcase
 TALER_TEST_HOME = test_exchange_api_home/
 
+# Persistant data storage
+TALER_DATA_HOME = $TALER_HOME/.local/share/taler/
+
+# Configuration files
+TALER_CONFIG_HOME = $TALER_HOME/.config/taler/
+
+# Cached data, no big deal if lost
+TALER_CACHE_HOME = $TALER_HOME/.cache/taler/
+
 [taler]
 # Currency supported by the exchange (can only be one)
 CURRENCY = EUR
diff --git a/src/lib/testing_api_helpers.c b/src/lib/testing_api_helpers.c
index 2e1fb2d0..cc843078 100644
--- a/src/lib/testing_api_helpers.c
+++ b/src/lib/testing_api_helpers.c
@@ -674,7 +674,6 @@ TALER_TESTING_wait_auditor_ready (const char *base_url)
  * @param main_cb routine containing all the commands to run.
  * @param main_cb_cls closure for @a main_cb, typically NULL.
  * @param config_file configuration file for the test-suite.
- *
  * @return #GNUNET_OK if all is okay, != #GNUNET_OK otherwise.
  *         non-#GNUNET_OK codes are #GNUNET_SYSERR most of the
  *         time.
@@ -691,11 +690,11 @@ TALER_TESTING_setup_with_exchange (TALER_TESTING_Main 
main_cb,
   };
   int result;
 
-  if (GNUNET_OK !=
-      (result = GNUNET_CONFIGURATION_parse_and_run (config_filename,
-                                                    &
-                                                    
TALER_TESTING_setup_with_exchange_cfg,
-                                                    &setup_ctx)))
+  result =
+    GNUNET_CONFIGURATION_parse_and_run (config_filename,
+                                        &TALER_TESTING_setup_with_exchange_cfg,
+                                        &setup_ctx);
+  if (GNUNET_OK != result)
     return result;
   return GNUNET_OK;
 }

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]