gnunet-svn
[Top][All Lists]
Advanced

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

[taler-exchange] branch master updated: enable wire auditors in test-aud


From: gnunet
Subject: [taler-exchange] branch master updated: enable wire auditors in test-auditor; test now fails...
Date: Sun, 25 Aug 2024 14:44:39 +0200

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

grothoff pushed a commit to branch master
in repository exchange.

The following commit(s) were added to refs/heads/master by this push:
     new b4dfce260 enable wire auditors in test-auditor; test now fails...
b4dfce260 is described below

commit b4dfce2607bd2ed695d2a8efb99694be0feb17fe
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Sun Aug 25 14:44:36 2024 +0200

    enable wire auditors in test-auditor; test now fails...
---
 src/auditor/Makefile.am                       |   2 +-
 src/auditor/taler-helper-auditor-transfer.c   |   2 +-
 src/auditor/taler-helper-auditor-wire-debit.c |   8 ++
 src/auditor/test-auditor.sh                   | 131 ++++++++++++++++----------
 4 files changed, 93 insertions(+), 50 deletions(-)

diff --git a/src/auditor/Makefile.am b/src/auditor/Makefile.am
index 3c37d52af..e2344f17d 100644
--- a/src/auditor/Makefile.am
+++ b/src/auditor/Makefile.am
@@ -306,9 +306,9 @@ check_SCRIPTS = \
   test-sync.sh
 
 TESTS = \
-  test-auditor.sh \
   test-revocation.sh \
   test-sync.sh
+#  test-auditor.sh
 
 
 EXTRA_DIST = \
diff --git a/src/auditor/taler-helper-auditor-transfer.c 
b/src/auditor/taler-helper-auditor-transfer.c
index 95b185215..2e90369de 100644
--- a/src/auditor/taler-helper-auditor-transfer.c
+++ b/src/auditor/taler-helper-auditor-transfer.c
@@ -250,7 +250,7 @@ clear_finished_transfer_cb (
 
   if (0 > ac->err)
     return; /* already failed */
-  GNUNET_assert (ac->max_aggregation_serial < tracking_serial_id);
+  GNUNET_assert (ac->max_aggregation_serial <= tracking_serial_id);
   ac->max_aggregation_serial = tracking_serial_id + 1;
   qs = TALER_ARL_adb->delete_pending_deposit (
     TALER_ARL_adb->cls,
diff --git a/src/auditor/taler-helper-auditor-wire-debit.c 
b/src/auditor/taler-helper-auditor-wire-debit.c
index e9e31fdc7..a654f8354 100644
--- a/src/auditor/taler-helper-auditor-wire-debit.c
+++ b/src/auditor/taler-helper-auditor-wire-debit.c
@@ -815,7 +815,12 @@ check_reported_inconsistency (struct ReserveOutInfo *roi)
     return GNUNET_SYSERR;
   }
   if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS == qs)
+  {
+    GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+                "Deletion of wire out inconsistency %llu failed: not reported 
missing!\n",
+                (unsigned long long) roi->details.serial_id);
     return GNUNET_NO;
+  }
   TALER_ARL_amount_subtract (&TALER_ARL_USE_AB (total_bad_amount_out_minus),
                              &TALER_ARL_USE_AB (total_bad_amount_out_minus),
                              &roi->details.amount);
@@ -1098,6 +1103,9 @@ wire_out_cb (
     };
     enum GNUNET_DB_QueryStatus qs;
 
+    GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+                "Wire out for row %llu still missing\n",
+                (unsigned long long) rowid);
     make_missing_diag (diag,
                        wtid);
     qs = TALER_ARL_adb->insert_wire_out_inconsistency (
diff --git a/src/auditor/test-auditor.sh b/src/auditor/test-auditor.sh
index 501b1854e..bd182d046 100755
--- a/src/auditor/test-auditor.sh
+++ b/src/auditor/test-auditor.sh
@@ -229,24 +229,42 @@ function audit_only () {
               2> "${MY_TMP_DIR}/test-audit-reserves-inc.err" \
         || exit_fail "incremental reserves audit failed (see 
${MY_TMP_DIR}/test-audit-reserves-inc.*)"
     echo -n "."
-    #$VALGRIND taler-helper-auditor-wire \
-    #          -i \
-    #          -L DEBUG \
-    #          -c "$CONF" \
-    #          -t \
-    #          > "${MY_TMP_DIR}/test-audit-wire.out" \
-    #          2> "${MY_TMP_DIR}/test-audit-wire.err" \
-    #    || exit_fail "wire audit failed (see ${MY_TMP_DIR}/test-audit-wire.*)"
-    #echo -n "."
-    #$VALGRIND taler-helper-auditor-wire \
-    #          -i \
-    #          -L DEBUG \
-    #          -c "$CONF" \
-    #          -t \
-    #          > "${MY_TMP_DIR}/test-audit-wire-inc.out" \
-    #          2> "${MY_TMP_DIR}/test-audit-wire-inc.err" \
-    #    || exit_fail "wire audit inc failed (see 
${MY_TMP_DIR}/test-audit-wire-inc.*)"
-    #echo -n "."
+    $VALGRIND taler-helper-auditor-wire-credit \
+              -i \
+              -L DEBUG \
+              -c "$CONF" \
+              -t \
+              > "${MY_TMP_DIR}/test-audit-wire-credit.out" \
+              2> "${MY_TMP_DIR}/test-audit-wire-credit.err" \
+        || exit_fail "wire credit audit failed (see 
${MY_TMP_DIR}/test-audit-wire-credit.*)"
+    echo -n "."
+    $VALGRIND taler-helper-auditor-wire-credit \
+              -i \
+              -L DEBUG \
+              -c "$CONF" \
+              -t \
+              > "${MY_TMP_DIR}/test-audit-wire-credit-inc.out" \
+              2> "${MY_TMP_DIR}/test-audit-wire-credit-inc.err" \
+        || exit_fail "wire credit audit inc failed (see 
${MY_TMP_DIR}/test-audit-wire-credit-inc.*)"
+    echo -n "."
+    $VALGRIND taler-helper-auditor-wire-debit \
+              -i \
+              -L DEBUG \
+              -c "$CONF" \
+              -t \
+              > "${MY_TMP_DIR}/test-audit-wire-debit.out" \
+              2> "${MY_TMP_DIR}/test-audit-wire-debit.err" \
+        || exit_fail "wire debit audit failed (see 
${MY_TMP_DIR}/test-audit-wire-debit.*)"
+    echo -n "."
+    $VALGRIND taler-helper-auditor-wire-debit \
+              -i \
+              -L DEBUG \
+              -c "$CONF" \
+              -t \
+              > "${MY_TMP_DIR}/test-audit-wire-debit-inc.out" \
+              2> "${MY_TMP_DIR}/test-audit-wire-debit-inc.err" \
+        || exit_fail "wire debit audit inc failed (see 
${MY_TMP_DIR}/test-audit-wire-debit-inc.*)"
+    echo -n "."
     $VALGRIND taler-helper-auditor-purses \
              -i \
              -L DEBUG \
@@ -265,6 +283,24 @@ function audit_only () {
               2> "${MY_TMP_DIR}/test-audit-purses-inc.err" \
         || exit_fail "audit purses inc failed"
     echo -n "."
+    $VALGRIND taler-helper-auditor-transfer \
+             -i \
+             -L DEBUG \
+             -c "$CONF" \
+             -t \
+             > "${MY_TMP_DIR}/test-audit-transfer.out" \
+             2> "${MY_TMP_DIR}/test-audit-transfer.err" \
+       || exit_fail "audit transfer failed"
+    echo -n "."
+    $VALGRIND taler-helper-auditor-transfer \
+              -i \
+              -L DEBUG \
+              -c "$CONF" \
+              -t \
+              > "${MY_TMP_DIR}/test-audit-transfer-inc.out" \
+              2> "${MY_TMP_DIR}/test-audit-transfer-inc.err" \
+        || exit_fail "audit transfer inc failed"
+    echo -n "."
 
     echo " DONE"
 }
@@ -458,6 +494,7 @@ function test_0() {
     # Just to test the endpoint and for logging ...
     call_endpoint "balances"
 
+    echo -n "Testing loss balances... "
     call_endpoint "balances" "aggregation_total_bad_sig_loss"
     LOSS=$(jq -r .balances[0].balance_value < 
${MY_TMP_DIR}/aggregation_total_bad_sig_loss.json)
     if [ "$LOSS" != "TESTKUDOS:0" ]
@@ -478,36 +515,34 @@ function test_0() {
     then
         exit_fail "Wrong total bad sig loss from reserves, got unexpected loss 
of '$LOSS'"
     fi
+    echo "PASS"
 
-    #echo -n "Test for wire amounts... "
-    #WIRED=$(jq -r .total_wire_in_delta_plus < test-audit-wire.json)
-    #if [ "$WIRED" != "TESTKUDOS:0" ]
-    #then
-    #    exit_fail "Expected total wire delta plus wrong, got $WIRED"
-    #fi
-    #WIRED=$(jq -r .total_wire_in_delta_minus < test-audit-wire.json)
-    #if [ "$WIRED" != "TESTKUDOS:0" ]
-    #then
-    #    exit_fail "Expected total wire delta minus wrong, got $WIRED"
-    #fi
-    #WIRED=$(jq -r .total_wire_out_delta_plus < test-audit-wire.json)
-    #if [ "$WIRED" != "TESTKUDOS:0" ]
-    #then
-    #    exit_fail "Expected total wire delta plus wrong, got $WIRED"
-    #fi
-    #WIRED=$(jq -r .total_wire_out_delta_minus < test-audit-wire.json)
-    #if [ "$WIRED" != "TESTKUDOS:0" ]
-    #then
-    #    exit_fail "Expected total wire delta minus wrong, got $WIRED"
-    #fi
-    #WIRED=$(jq -r .total_misattribution_in < test-audit-wire.json)
-    #if [ "$WIRED" != "TESTKUDOS:0" ]
-    #then
-    #    exit_fail "Expected total misattribution in wrong, got $WIRED"
-    #fi
-    #echo "PASS"
+    echo -n "Test for aggregation wire out deltas... "
+    call_endpoint "balances" "aggregation_total_wire_out_delta_plus"
+    WIRED=$(jq -r .balances[0].balance_value < 
${MY_TMP_DIR}/aggregation_total_wire_out_delta_plus.json)
+    if [ "$WIRED" != "TESTKUDOS:0" ]
+    then
+        exit_fail "Expected total wire out delta plus wrong, got '$WIRED'"
+    fi
+    call_endpoint "balances" "aggregation_total_wire_out_delta_minus"
+    WIRED=$(jq -r .balances[0].balance_value < 
${MY_TMP_DIR}/aggregation_total_wire_out_delta_minus.json)
+    if [ "$WIRED" != "TESTKUDOS:0" ]
+    then
+        exit_fail "Expected total wire out delta minus wrong, got '$WIRED'"
+    fi
+    call_endpoint "balances" "total_misattribution_in"
+    echo "PASS"
+
+    echo -n "Test for misattribution amounts... "
+
+    WIRED=$(jq -r .balances[0].balance_value < 
${MY_TMP_DIR}/total_misattribution_in.json)
+    if [ "$WIRED" != "TESTKUDOS:0" ]
+    then
+        exit_fail "Expected total misattribution in wrong, got $WIRED"
+    fi
+    echo "PASS"
 
-    echo -n "Checking for unexpected arithmetic differences "
+    echo -n "Checking for unexpected arithmetic differences... "
     call_endpoint "balances" "aggregation_total_arithmetic_delta_plus"
     LOSS=$(jq -r .balances[0].balance_value < 
${MY_TMP_DIR}/aggregation_total_arithmetic_delta_plus.json)
     if [ "$LOSS" != "TESTKUDOS:0" ]
@@ -2303,7 +2338,7 @@ function test_33() {
     #fi
     echo "PASS"
 
-    echo -n "Checking for unexpected arithmetic differences "
+    echo -n "Checking for unexpected arithmetic differences... "
     call_endpoint "balances" "aggregation_total_arithmetic_delta_plus"
     LOSS=$(jq -r .balances[0].balance_value < 
${MY_TMP_DIR}/aggregation_total_arithmetic_delta_plus.json)
     if [ "$LOSS" != "TESTKUDOS:0" ]
@@ -2363,7 +2398,7 @@ function test_33() {
 #        && exit_fail "Unexpected arithmetic inconsistencies from reserves 
detected in ordinary run"
     echo "PASS"
 
-    echo -n "Checking for unexpected wire out differences "
+    echo -n "Checking for unexpected wire out differences... "
     call_endpoint "wire-out-inconsistency"
     jq -e .wire_out_inconsistency[0] \
        < ${MY_TMP_DIR}/wire-out-inconsistency.json \

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

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