From 7cba015c855a699d7390f8cb252d3d2804416fd7 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Mon, 5 Feb 2024 16:23:32 +0100 Subject: [PATCH] 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. --- src/debug.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/debug.c b/src/debug.c index 040c23a55..e69a82743 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; }