[v4,1/2] support: Add FAIL test failure helper

Message ID alpine.DEB.2.21.2407041321030.38148@angie.orcam.me.uk
State Superseded
Series stdio-common: Add test for vfscanf with matches longer than INT_MAX [BZ #27650] |


Context Check Description
redhat-pt-bot/TryBot-apply_patch success Patch applied to master at the time it was sent
linaro-tcwg-bot/tcwg_glibc_build--master-arm success Build passed
linaro-tcwg-bot/tcwg_glibc_build--master-aarch64 success Build passed
linaro-tcwg-bot/tcwg_glibc_check--master-arm fail Test failed
linaro-tcwg-bot/tcwg_glibc_check--master-aarch64 fail Test failed

Commit Message

Maciej W. Rozycki July 4, 2024, 12:59 p.m. UTC
  From: Maciej W. Rozycki <macro@redhat.com>

Add a FAIL test failure helper analogous to FAIL_RET, that does not 
cause the current function to return, providing a standardized way to 
report a test failure with a message supplied while permitting the 
caller to continue executing, for further reporting, cleaning up, etc.
No change from v3.

New change in v3.
 support/check.h |    5 +++++
 1 file changed, 5 insertions(+)



Index: glibc/support/check.h
--- glibc.orig/support/check.h
+++ glibc/support/check.h
@@ -25,6 +25,11 @@ 
 /* Record a test failure, print the failure message to standard output
+   and pass the result of 1 through.  */
+#define FAIL(...) \
+  support_print_failure_impl (__FILE__, __LINE__, __VA_ARGS__)
+/* Record a test failure, print the failure message to standard output
    and return 1.  */
 #define FAIL_RET(...) \
   return support_print_failure_impl (__FILE__, __LINE__, __VA_ARGS__)