From: Willy Tarreau Date: Mon, 5 Feb 2024 15:23:32 +0000 (+0100) Subject: DEBUG: make the "debug dev {debug|warn|check}" command print a message X-Git-Tag: v3.0-dev3~78 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7cba015c855a699d7390f8cb252d3d2804416fd7;p=thirdparty%2Fhaproxy.git DEBUG: make the "debug dev {debug|warn|check}" command print a message In order to test the new message output capability, these commands will now explicitly mention that the bug was triggered from the CLI. --- diff --git a/src/debug.c b/src/debug.c index 040c23a551..e69a827436 100644 --- a/src/debug.c +++ b/src/debug.c @@ -658,7 +658,7 @@ int debug_parse_cli_bug(char **args, char *payload, struct appctx *appctx, void return 1; _HA_ATOMIC_INC(&debug_commands_issued); - BUG_ON(one > zero); + BUG_ON(one > zero, "This was triggered on purpose from the CLI 'debug dev bug' command."); return 1; } @@ -671,7 +671,7 @@ int debug_parse_cli_warn(char **args, char *payload, struct appctx *appctx, void return 1; _HA_ATOMIC_INC(&debug_commands_issued); - WARN_ON(one > zero); + WARN_ON(one > zero, "This was triggered on purpose from the CLI 'debug dev warn' command."); return 1; } @@ -684,7 +684,7 @@ int debug_parse_cli_check(char **args, char *payload, struct appctx *appctx, voi return 1; _HA_ATOMIC_INC(&debug_commands_issued); - CHECK_IF(one > zero); + CHECK_IF(one > zero, "This was triggered on purpose from the CLI 'debug dev check' command."); return 1; }