mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-03 18:13:01 +00:00
Added regression test pth_create_glibc_2_0.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9633
This commit is contained in:
parent
e9d7ba9595
commit
ca8a77d31b
@ -98,6 +98,8 @@ EXTRA_DIST = \
|
||||
pth_create_chain.stderr.exp \
|
||||
pth_create_chain.stderr.exp-ppc \
|
||||
pth_create_chain.vgtest \
|
||||
pth_create_glibc_2_0.stderr.exp \
|
||||
pth_create_glibc_2_0.vgtest \
|
||||
pth_detached.stderr.exp \
|
||||
pth_detached.stdout.exp \
|
||||
pth_detached.vgtest \
|
||||
@ -234,6 +236,10 @@ if HAVE_PTHREAD_BARRIER
|
||||
check_PROGRAMS += matinv pth_barrier pth_barrier_race pth_barrier_reinit
|
||||
endif
|
||||
|
||||
if HAVE_PTHREAD_CREATE_GLIBC_2_0
|
||||
check_PROGRAMS += pth_create_glibc_2_0
|
||||
endif
|
||||
|
||||
if HAVE_PTHREAD_SPINLOCK
|
||||
check_PROGRAMS += pth_spinlock
|
||||
endif
|
||||
|
||||
34
drd/tests/pth_create_glibc_2_0.c
Normal file
34
drd/tests/pth_create_glibc_2_0.c
Normal file
@ -0,0 +1,34 @@
|
||||
/* Test program that invokes pthread_create@GLIBC_2.0(). */
|
||||
|
||||
|
||||
#include <pthread.h>
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
extern int pthread_create_glibc_2_0(pthread_t*, const pthread_attr_t*,
|
||||
void *(*)(void*), void*);
|
||||
|
||||
__asm__(".symver pthread_create_glibc_2_0, pthread_create@GLIBC_2.0");
|
||||
|
||||
|
||||
static void* thread_func(void *arg)
|
||||
{
|
||||
fprintf(stderr, "The thread.\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
int result;
|
||||
pthread_t thr;
|
||||
|
||||
result = (*pthread_create_glibc_2_0)(&thr, 0, thread_func, 0);
|
||||
if (result != 0)
|
||||
{
|
||||
fprintf(stderr, "pthread_create() failed.\n");
|
||||
return 1;
|
||||
}
|
||||
pthread_join(thr, 0);
|
||||
fprintf(stderr, "Finished.\n");
|
||||
return 0;
|
||||
}
|
||||
5
drd/tests/pth_create_glibc_2_0.stderr.exp
Normal file
5
drd/tests/pth_create_glibc_2_0.stderr.exp
Normal file
@ -0,0 +1,5 @@
|
||||
|
||||
The thread.
|
||||
Finished.
|
||||
|
||||
ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
|
||||
3
drd/tests/pth_create_glibc_2_0.vgtest
Normal file
3
drd/tests/pth_create_glibc_2_0.vgtest
Normal file
@ -0,0 +1,3 @@
|
||||
prereq: ./supported_libpthread
|
||||
vgopts: --var-info=yes --check-stack-var=yes
|
||||
prog: pth_create_glibc_2_0
|
||||
Loading…
x
Reference in New Issue
Block a user