memcheck/tests/linux/stack_changes: Only run this test if setcontext() is available

See also https://bugs.kde.org/show_bug.cgi?id=434775 .
This commit is contained in:
Bart Van Assche 2021-03-28 20:29:42 -07:00
parent 7b32db280e
commit 7cd4d78163
3 changed files with 7 additions and 1 deletions

View File

@ -4403,6 +4403,7 @@ AC_CHECK_FUNCS([ \
pwritev2 \
readlinkat \
semtimedop \
setcontext \
signalfd \
sigwaitinfo \
strchr \
@ -4434,6 +4435,7 @@ AM_CONDITIONAL([HAVE_PREADV_PWRITEV],
[test x$ac_cv_func_preadv = xyes && test x$ac_cv_func_pwritev = xyes])
AM_CONDITIONAL([HAVE_PREADV2_PWRITEV2],
[test x$ac_cv_func_preadv2 = xyes && test x$ac_cv_func_pwritev2 = xyes])
AM_CONDITIONAL([HAVE_SETCONTEXT], [test x$ac_cv_func_setcontext = xyes])
AM_CONDITIONAL([HAVE_SWAPCONTEXT], [test x$ac_cv_func_swapcontext = xyes])
AM_CONDITIONAL([HAVE_MEMFD_CREATE],
[test x$ac_cv_func_memfd_create = xyes])

View File

@ -47,7 +47,6 @@ check_PROGRAMS = \
lsframe2 \
rfcomm \
sigqueue \
stack_changes \
stack_switch \
syscalls-2007 \
syslog-syscall \
@ -78,6 +77,10 @@ if HAVE_PREADV2_PWRITEV2
check_PROGRAMS += sys-preadv2_pwritev2
endif
if HAVE_SETCONTEXT
check_PROGRAMS += stack_changes
endif
AM_CFLAGS += $(AM_FLAG_M3264_PRI)
AM_CXXFLAGS += $(AM_FLAG_M3264_PRI)

View File

@ -1,2 +1,3 @@
prereq: test -e stack_changes
prog: stack_changes
vgopts: -q