diff options
author | Florian Weimer <fweimer@redhat.com> | 2016-12-31 12:20:49 +0100 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2016-12-31 18:51:15 +0100 |
commit | 039c5a05cc905e3d48392e7ea9f85e339b7c068b (patch) | |
tree | 2d69efafb74a99d94b13b98eaab09d9e1d0e505c /support/check.c | |
parent | 5707a64d9462001f9c7c2e02d3f52cf8b0181658 (diff) | |
download | glibc-039c5a05cc905e3d48392e7ea9f85e339b7c068b.tar.gz |
support: Use support_record_failure consistently
This causes more test programs to link in the support_record_failure
function, which triggers an early call to mmap from an ELF
constructor, but this should not have side effects intefering
with the functionality actually under test (unlike, say, a call
to malloc).
Diffstat (limited to 'support/check.c')
-rw-r--r-- | support/check.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/support/check.c b/support/check.c index 75fdf524b5..04d25037b0 100644 --- a/support/check.c +++ b/support/check.c @@ -21,6 +21,7 @@ #include <stdarg.h> #include <stdio.h> #include <stdlib.h> +#include <support/test-driver.h> static void print_failure (const char *file, int line, const char *format, va_list ap) @@ -34,6 +35,7 @@ int support_print_failure_impl (const char *file, int line, const char *format, ...) { + support_record_failure (); va_list ap; va_start (ap, format); print_failure (file, line, format, ap); @@ -45,6 +47,8 @@ void support_exit_failure_impl (int status, const char *file, int line, const char *format, ...) { + if (status != EXIT_SUCCESS && status != EXIT_UNSUPPORTED) + support_record_failure (); va_list ap; va_start (ap, format); print_failure (file, line, format, ap); |