]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
memcheck/tests/linux/stack_changes: Only run this test if setcontext() is available
authorBart Van Assche <bvanassche@acm.org>
Mon, 29 Mar 2021 03:29:42 +0000 (20:29 -0700)
committerBart Van Assche <bvanassche@acm.org>
Mon, 29 Mar 2021 03:48:22 +0000 (20:48 -0700)
See also https://bugs.kde.org/show_bug.cgi?id=434775 .

configure.ac
memcheck/tests/linux/Makefile.am
memcheck/tests/linux/stack_changes.vgtest

index 7262a98262342121d9beef6760219ea89419f3a3..14a01ab7b5785d24c543f91502ada4c1601b70f2 100755 (executable)
@@ -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])
index f7cf5a456cfdd348a2be9bcb3bbe53ec96d9f237..4f0d838434907cce60a38fd7ca80267d6a33472a 100644 (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)
 
index fa3c737066ecea59c69cbf9c89d8adc51c52bf4f..62e9f813554f0b4d8f6f8d4c3f0df611e63c548c 100644 (file)
@@ -1,2 +1,3 @@
+prereq: test -e stack_changes
 prog: stack_changes
 vgopts: -q