From: Paul Floyd Date: Sat, 25 Jan 2025 18:24:00 +0000 (+0100) Subject: regtest macOS: macOS has no timer fds, so not timer_create etc. X-Git-Tag: VALGRIND_3_25_0~167 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8eda2ae3e7dba6f0d94c3cbfc12821f2cff40018;p=thirdparty%2Fvalgrind.git regtest macOS: macOS has no timer fds, so not timer_create etc. Add a feature test for timer_delete. --- diff --git a/configure.ac b/configure.ac index c595de28b..2a95597aa 100755 --- a/configure.ac +++ b/configure.ac @@ -4892,6 +4892,7 @@ AC_FUNC_MMAP AC_CHECK_LIB([pthread], [pthread_create]) AC_CHECK_LIB([rt], [clock_gettime]) +AC_CHECK_LIB([rt], [timer_delete]) AC_CHECK_FUNCS([ \ aligned_alloc \ @@ -5011,6 +5012,8 @@ AM_CONDITIONAL([HAVE_GETRANDOM], [test x$ac_cv_func_getrandom = xyes]) AM_CONDITIONAL([HAVE_GETRLIMITUSAGE], [test x$ac_cv_func_getrlimitusage = xyes]) +AM_CONDITIONAL([HAVE_TIMER_DELETE], + [test x$ac_cv_func_timer_delete = xyes]) if test x$VGCONF_PLATFORM_PRI_CAPS = xMIPS32_LINUX \ -o x$VGCONF_PLATFORM_PRI_CAPS = xMIPS64_LINUX \ diff --git a/none/tests/Makefile.am b/none/tests/Makefile.am index 2fa43587e..7ceb0052b 100644 --- a/none/tests/Makefile.am +++ b/none/tests/Makefile.am @@ -302,7 +302,6 @@ check_PROGRAMS = \ thread-exits \ threaded-fork \ threadederrno \ - timer_delete \ timestamp \ tls \ tls.so \ @@ -359,6 +358,10 @@ if BUILD_IFUNC_TESTS check_PROGRAMS += ifunc endif +if HAVE_TIMER_DELETE + check_PROGRAMS += timer_delete +endif + AM_CFLAGS += $(AM_FLAG_M3264_PRI) AM_CXXFLAGS += $(AM_FLAG_M3264_PRI) @@ -442,7 +445,9 @@ thread_exits_LDADD = -lpthread threaded_fork_LDADD = -lpthread threadederrno_CFLAGS = $(AM_CFLAGS) threadederrno_LDADD = -lpthread -timer_delete_LDADD = -lrt +if HAVE_TIMER_DELETE + timer_delete_LDADD = -lrt +endif timestamp_CFLAGS = ${AM_CFLAGS} @FLAG_W_NO_USE_AFTER_FREE@ tls_SOURCES = tls.c tls2.c tls_DEPENDENCIES = tls.so tls2.so diff --git a/none/tests/timer_delete.vgtest b/none/tests/timer_delete.vgtest index 389293a69..b12d4c6ff 100644 --- a/none/tests/timer_delete.vgtest +++ b/none/tests/timer_delete.vgtest @@ -1,3 +1,4 @@ +prereq: test -e timer_delete prog: timer_delete vgopts: -q