[pulseaudio-discuss] Test failure on musl libc and slower builders (thread-test timeout)

A. Wilcox awilfox at adelielinux.org
Mon Jan 16 22:37:42 UTC 2017


Hello,

While packaging PulseAudio for our distribution, I noticed the test
suite failing in two different ways; both of these failures are in
thread-test.

The first failure is related to pulseaudio's usage of rand().
According to POSIX[1], calls to rand() without first calling srand()
result in proceeding as if you had called srand(1) first.  On the musl
libc, seeding with 1 gives 0 as the first number (which is valid;
numbers can be within 0 and RAND_MAX).  Unfortunately, that means the
test instantly deadlocks due to seeing 0 as the random number.

I would personally suggest that the test should spin if rand() returns
0, since that is perfectly acceptable behaviour and you really can't
control expectations for what a random number generator will provide you.

The second failure is that after I resolved the above issue (even just
calling srand with '2' to avoid spinning too long), our PowerPC
builder - a dual 1.8GHz 970fx - timed out.  Running it outside of
'make check' allows me to see it completes somewhere between 84 and 89
iterations before the timeout hits.  I found a thread from 2014 on
this list discussing that very issue for Debian's packaging[2], but
saw no answer as to how to prolong the timeout.  For now, I'm going to
ship the package on PowerPC with the failure since all other tests
pass.  I would however be very grateful to integrate a more permanent
solution so that the test suite may pass.

Best,
--arw

[1]: http://pubs.opengroup.org/onlinepubs/9699919799/functions/rand.html

[2]:
https://lists.freedesktop.org/archives/pulseaudio-discuss/2014-July/021027.html
-- 
A. Wilcox (awilfox)
Project Lead, Adélie Linux
http://adelielinux.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20170116/8bb754a8/attachment.sig>


More information about the pulseaudio-discuss mailing list