This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ncoghlan
Recipients barry, ncoghlan, petr.viktorin
Date 2017-07-28.06:44:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1501224244.81.0.688971970175.issue31064@psf.upfronthosting.co.za>
In-reply-to
Content
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`.
History
Date User Action Args
2017-07-28 06:44:04ncoghlansetrecipients: + ncoghlan, barry, petr.viktorin
2017-07-28 06:44:04ncoghlansetmessageid: <1501224244.81.0.688971970175.issue31064@psf.upfronthosting.co.za>
2017-07-28 06:44:04ncoghlanlinkissue31064 messages
2017-07-28 06:44:03ncoghlancreate