once-test fails
Submitted by than
Assigned to pul..@..op.org
Description
The once-test fails for 8.99 versions
Version-Release number of selected component (if applicable): pulseaudio-8.99.2-1.fc25
FAIL: once-test
Running suite(s): Once 0%: Checks: 1, Failures: 1, Errors: 0 tests/once-test.c:74:F:once:once_test:0: Assertion 'pthread_setaffinity_np(pthread_self(), sizeof(mask), &mask) == 0' failed FAIL once-test (exit status: 1)
imo it's a bug in the check which just run the threads on all CPUs even some CPUS are on active, for example on ppc64/ppc64le in koji (fedora build enviroment)
i did a patch which resolves this issue for me.
diff -up pulseaudio-8.99.2/src/tests/once-test.c.than pulseaudio-8.99.2/src/tests/once-test.c
--- pulseaudio-8.99.2/src/tests/once-test.c.than 2016-06-22 10:20:57.127583628 -0400
+++ pulseaudio-8.99.2/src/tests/once-test.c 2016-06-22 10:59:38.905573634 -0400
@@ -70,7 +70,7 @@ static void thread_func(void *data) {
#endif
CPU_ZERO(&mask);
- CPU_SET((size_t) (pa_atomic_inc(&i_cpu) % n_cpu), &mask);
+ CPU_SET(pthread_getaffinity_np(pthread_self(), sizeof(mask), &mask), &mask);
fail_unless(pthread_setaffinity_np(pthread_self(), sizeof(mask), &mask) == 0);
#endif