]> git.ipfire.org Git - thirdparty/haproxy.git/commit
DEBUG: extend DEBUG_STRESS to ease testing and turn on extra checks
authorWilly Tarreau <w@1wt.eu>
Fri, 14 Nov 2025 14:58:06 +0000 (15:58 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 14 Nov 2025 15:38:04 +0000 (16:38 +0100)
commit3d441e78e50f6de953c5656a5c8e443b7bc2f16e
tree78336157bdae72d06e86108287280ca73a7f025a
parent9481cef94882b7bdf3dfab24951649465bc3f5d0
DEBUG: extend DEBUG_STRESS to ease testing and turn on extra checks

DEBUG_STRESS is currently used only to expose "stress-level". With this
patch, we go a bit further, by automatically forcing DEBUG_STRICT and
DEBUG_STRICT_ACTION to their highest values in order to enable all
BUG_ON levels, and make all of them result in a crash. In addition,
care is taken to always only have 0 or 1 in the macro, so that it can be
tested using "#if DEBUG_STRESS > 0" as well as "if (DEBUG_STRESS) { }"
everywhere.

The goal will be to ease insertion of extra tests for builds dedicated
to stress-testing that enable possibly expensive extra checks on certain
code paths that cannot reasonably be compiled in for production code
right now.
include/haproxy/bug.h
include/haproxy/stress.h