[pulseaudio-commits] [Git][pulseaudio/pulseaudio][master] 2 commits: build-sys: Build atomic-test only if pthread_setaffinity_np() is available
Arun Raghavan
gitlab at gitlab.freedesktop.org
Tue Aug 4 12:38:45 UTC 2020
Arun Raghavan pushed to branch master at PulseAudio / pulseaudio
Commits:
99db8038 by Tanu Kaskinen at 2020-08-04T15:09:33+03:00
build-sys: Build atomic-test only if pthread_setaffinity_np() is available
The function seems to be essential to the test, so the test has to be
disabled entirely if pthread_setaffinity_np() is not available.
Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/850
- - - - -
7742c9aa by Tanu Kaskinen at 2020-08-04T15:09:36+03:00
meson: Build atomic-test
The test was missing from the build system.
- - - - -
3 changed files:
- configure.ac
- src/Makefile.am
- src/tests/meson.build
Changes:
=====================================
configure.ac
=====================================
@@ -561,10 +561,12 @@ AC_FUNC_GETGROUPS
AC_CHECK_FUNCS_ONCE([chmod chown fstat fchown fchmod clock_gettime getaddrinfo getgrgid_r getgrnam_r \
getpwnam_r getpwuid_r gettimeofday getuid mlock nanosleep \
pipe posix_fadvise posix_madvise posix_memalign setpgid setsid shm_open \
- sigaction sleep symlink sysconf uname pthread_setaffinity_np pthread_getname_np pthread_setname_np])
+ sigaction sleep symlink sysconf uname pthread_getname_np pthread_setname_np])
AC_CHECK_FUNCS([mkfifo], [HAVE_MKFIFO=1], [HAVE_MKFIFO=0])
AC_SUBST(HAVE_MKFIFO)
AM_CONDITIONAL(HAVE_MKFIFO, test "x$HAVE_MKFIFO" = "x1")
+AC_CHECK_FUNCS([pthread_setaffinity_np], [HAVE_PTHREAD_SETAFFINITY_NP=1], [HAVE_PTHREAD_SETAFFINITY_NP=0])
+AM_CONDITIONAL(HAVE_PTHREAD_SETAFFINITY_NP, test "x$HAVE_PTHREAD_SETAFFINITY_NP" = "x1")
# X/OPEN
AC_CHECK_FUNCS_ONCE([readlink])
=====================================
src/Makefile.am
=====================================
@@ -296,8 +296,7 @@ TESTS_norun = \
sig2str-test \
stripnul \
echo-cancel-test \
- lo-latency-test \
- atomic-test
+ lo-latency-test
# These tests need a running pulseaudio daemon
TESTS_daemon = \
@@ -316,6 +315,11 @@ TESTS_default += \
usergroup-test
endif
+if HAVE_PTHREAD_SETAFFINITY_NP
+TESTS_norun += \
+ atomic-test
+endif
+
if HAVE_SYS_EVENTFD_H
TESTS_default += \
srbchannel-test
=====================================
src/tests/meson.build
=====================================
@@ -160,6 +160,13 @@ if cc.has_header_symbol('signal.h', 'SIGXCPU')
]
endif
+if cc.has_function('pthread_setaffinity_np', dependencies : thread_dep)
+ norun_tests += [
+ [ 'atomic-test', 'atomic-test.c',
+ [ check_dep, libpulsecommon_dep ] ]
+ ]
+endif
+
if alsa_dep.found()
norun_tests += [
[ 'alsa-time-test', 'alsa-time-test.c', [ alsa_dep ] ]
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/compare/4d1e5686194d5c6671e3023b5e55a4043d6e1824...7742c9aa50f5435873dda0118c5ce90398633082
--
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/compare/4d1e5686194d5c6671e3023b5e55a4043d6e1824...7742c9aa50f5435873dda0118c5ce90398633082
You're receiving this email because of your account on gitlab.freedesktop.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-commits/attachments/20200804/2b8703da/attachment-0001.htm>
More information about the pulseaudio-commits
mailing list