]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
print out error via RPEDEBUG when calculating a result
authorAlan T. DeKok <aland@freeradius.org>
Sat, 26 Apr 2025 13:11:38 +0000 (09:11 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Sat, 26 Apr 2025 13:11:38 +0000 (09:11 -0400)
src/lib/unlang/xlat_expr.c
src/tests/unit/xlat/cond_base.txt
src/tests/xlat/expr.txt

index 0828c3afc631c7e0e3854e0798334afdce78282e..d40d2b5b49e8f8c8477526b4bbe852c03040df20 100644 (file)
@@ -350,6 +350,7 @@ static xlat_action_t xlat_binary_op(TALLOC_CTX *ctx, fr_dcursor_t *out,
 
        rcode = fr_value_calc_binary_op(dst, dst, default_type, a, op, b);
        if (rcode < 0) {
+               RPEDEBUG("Failed calculating '%pV %s %pV'", a, fr_tokens[op], b);
                talloc_free(dst);
                return XLAT_ACTION_FAIL;
        }
index 01243d8cd87107cb33c91855177da67e28cc159f..e41ce2ee43fed94b045e2fb92ba3267a3a2f6834 100644 (file)
@@ -33,8 +33,11 @@ match ERROR offset 3: Unexpected text after return code
 #
 #  0 - 111 is smaller than zero, and Service-Type is uint32.
 #
+#  Except the error is printed out via RPEDEBUG, and is thus unavailable
+#  to the unit tests
+#
 xlat_purify (Service-Type == 000-111)
-match ERROR purifying node - Value underflows 'uint64' when calculating result.
+match ERROR purifying node - 
 
 #
 #  @todo - this should really be hoisted
index ead2644103e216ab3034e02ae29b4e9190e8f05f..45906b2195c2016423a223ea4151e6523fdecae5 100644 (file)
@@ -85,8 +85,12 @@ xlat_expr (uint8) 1 << 8
 match 256
 
 # Cannot perform any operations for destination type ether
+#
+#  Except the error is printed out via RPEDEBUG, and is thus unavailable
+#  to the unit tests
+#
 xlat_expr 00:01:02:03:04:05 ^ 11:22:33:44:55:66
-match ERROR expanding xlat: Invalid operation on data types - 'ether' ^ 'ether'
+match ERROR expanding xlat: no error provided
 
 #
 #  NAS-IP-Address doesn't exist.