mirror of
https://sourceware.org/git/glibc.git
synced 2025-12-24 17:51:17 +03:00
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).
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user