mirror of
git://sourceware.org/git/glibc.git
synced 2024-12-09 04:11:27 +08:00
0035851c3c
These tests were skipped by the use-test-skeleton conversion done in
commit 29955b5d
because they were reused in other tests via the #include
directive, and so deemed worth an inspection before they were modified.
This has now been done.
ChangeLog:
2015-07-09 Arjun Shankar <arjun.is@lostca.se>
* elf/tst-leaks1.c (main): Converted to ...
(do_test): ... this.
(TEST_FUNCTION): New macro.
Include test-skeleton.c.
* localedata/tst-langinfo.c (main): Converted to ...
(do_test): ... this.
(TEST_FUNCTION): New macro.
Include test-skeleton.c.
* math/test-fpucw.c (main): Converted to ...
(do_test): ... this.
(TEST_FUNCTION): New macro.
Include test-skeleton.c.
* math/test-tgmath.c (main): Converted to ...
(do_test): ... this.
(TEST_FUNCTION): New macro.
Include test-skeleton.c.
* math/test-tgmath2.c (main): Converted to ...
(do_test): ... this.
(TEST_FUNCTION): New macro.
Include test-skeleton.c.
* setjmp/tst-setjmp.c (main): Converted to ...
(do_test): ... this.
(TEST_FUNCTION): New macro.
Include test-skeleton.c.
* stdio-common/tst-sscanf.c (main): Converted to ...
(do_test): ... this.
(TEST_FUNCTION): New macro.
Include test-skeleton.c.
* sysdeps/x86_64/tst-audit6.c (main): Converted to ...
(do_test): ... this.
(TEST_FUNCTION): New macro.
Include test-skeleton.c.
29 lines
454 B
C
29 lines
454 B
C
#include <stdio.h>
|
|
#include <dlfcn.h>
|
|
#include <mcheck.h>
|
|
#include <stdlib.h>
|
|
|
|
static int
|
|
do_test (void)
|
|
{
|
|
mtrace ();
|
|
|
|
int ret = 0;
|
|
for (int i = 0; i < 10; i++)
|
|
{
|
|
void *h = dlopen (i < 5 ? "./tst-leaks1.c"
|
|
: "$ORIGIN/tst-leaks1.o", RTLD_LAZY);
|
|
if (h != NULL)
|
|
{
|
|
puts ("dlopen unexpectedly succeeded");
|
|
ret = 1;
|
|
dlclose (h);
|
|
}
|
|
}
|
|
|
|
return ret;
|
|
}
|
|
|
|
#define TEST_FUNCTION do_test ()
|
|
#include "../test-skeleton.c"
|