New submission from Nick Coghlan:
On current Fedora systems, test_ossaudiodev is implicitly skipped even when the
audio resource is enabled due to the absence of the `/test/dsp` device:
```
$ ./python -m test -v -uaudio test_ossaudiodev
[...]
0:00:00 load avg: 0.33 [1/1] test_ossaudiodev
test_ossaudiodev skipped -- [Errno 2] No such file or directory: '/dev/dsp'
test_ossaudiodev skipped
1 test skipped:
test_ossaudiodev
Total duration: 31 ms
Tests result: SUCCESS
```
And while PulseAudio does provide an OpenSoundSystem emulation mode, it
apparently isn't sufficient for the Python extension module's needs:
```
$ padsp ./python -m test -v -uaudio test_ossaudiodev
[...]
0:00:00 load avg: 0.41 [1/1] test_ossaudiodev
test_mixer_methods (test.test_ossaudiodev.OSSAudioDevTests) ... ok
test_on_closed (test.test_ossaudiodev.OSSAudioDevTests) ... ok
test_playback (test.test_ossaudiodev.OSSAudioDevTests) ... ERROR
test_set_parameters (test.test_ossaudiodev.OSSAudioDevTests) ... ERROR
test_with (test.test_ossaudiodev.OSSAudioDevTests) ... ok
======================================================================
ERROR: test_playback (test.test_ossaudiodev.OSSAudioDevTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/ncoghlan/devel/cpython/Lib/test/test_ossaudiodev.py", line 148,
in test_playback
self.play_sound_file(*sound_info)
File "/home/ncoghlan/devel/cpython/Lib/test/test_ossaudiodev.py", line 54, in
play_sound_file
dsp.bufsize()
OSError: [Errno 22] Invalid argument
======================================================================
ERROR: test_set_parameters (test.test_ossaudiodev.OSSAudioDevTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/ncoghlan/devel/cpython/Lib/test/test_ossaudiodev.py", line 153,
in test_set_parameters
self.set_parameters(dsp)
File "/home/ncoghlan/devel/cpython/Lib/test/test_ossaudiodev.py", line 103,
in set_parameters
if (dsp.setfmt(fmt) == fmt and
OSError: [Errno 22] Invalid argument
----------------------------------------------------------------------
Ran 5 tests in 0.016s
FAILED (errors=2)
test test_ossaudiodev failed
test_ossaudiodev failed
1 test failed:
test_ossaudiodev
Total duration: 55 ms
Tests result: FAILURE
[ncoghlan@thechalk cpython]$ padsp ./python -m test -uaudio test_ossaudiodev
Run tests sequentially
0:00:00 load avg: 0.42 [1/1] test_ossaudiodev
test test_ossaudiodev failed -- multiple errors occurred; run in verbose mode
for details
test_ossaudiodev failed
1 test failed:
test_ossaudiodev
Total duration: 35 ms
Tests result: FAILURE
```
The reason I'm filing this here rather than downstream in Fedora is because I'm
uncertain whether or not we actually need to worry about it: the module's
presumably been broken in practice on Linux for years, and I only noticed it
today due to a discussion about Python easter eggs that got me wondering why it
had been so long since I'd heard the audio file of Guido speaking when running
the tests with `-uall`.
----------
messages: 299369
nosy: barry, encukou, ncoghlan
priority: normal
severity: normal
status: open
title: test_ossaudiodev fails under padsp (Linux PulseAudio OSS emulation)
type: behavior
versions: Python 3.6, Python 3.7
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue31064>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com