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.
This commit is contained in:
Willy Tarreau 2024-02-05 16:23:32 +01:00
parent 25968c186a
commit 7cba015c85

View File

@ -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;
}