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.

classification
Title: OpenBSD has no /dev/full device
Type: behavior Stage: resolved
Components: Tests Versions: Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: serhiy.storchaka Nosy List: BreamoreBoy, Daniel.Dickman, ezio.melotti, pitrou, python-dev, serhiy.storchaka, vstinner
Priority: normal Keywords: patch

Created on 2014-07-07 15:30 by Daniel.Dickman, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
python.dev.full.diff Daniel.Dickman, 2014-07-07 15:31 review
Messages (9)
msg222467 - (view) Author: Daniel Dickman (Daniel.Dickman) * Date: 2014-07-07 15:30
There is no /dev/full device on OpenBSD. If you run the 2.7 regress tests as root on OpenBSD, a /dev/full regular file will be created and the "test_write_full" test will fail. (because the subsequent write will succeed in writing to the /dev/full regular file).

To fix, change the test to check that /dev/full exists and is a character device.

Patch attached.
msg222468 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2014-07-07 15:48
I would prefer a decorator checking if a device exists, something like:

@requires_character_device('/dev/full')

It would always skip on Windows. Implement it in test_support.py.
msg222728 - (view) Author: Daniel Dickman (Daniel.Dickman) * Date: 2014-07-11 06:40
We will merge any fix decided by the python team when it's committed. In the meantime may commit our fix on OpenBSD to solve the problem in the short term as it seems no one has time to go further right now.
msg222858 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2014-07-12 17:31
If it's not needed in other places, I think the proposed patch might be OK (assuming it works fine on other platforms).
msg222873 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2014-07-12 19:23
The patch is against test_file2k.py which I can't find in my default cpython setup.  If this was removed from (say) Python 3.0 how do I check for that?
msg222875 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2014-07-12 19:34
I tried to grep on 3.x for this test but it looks like it's been removed there, so this issue only affects 2.7.
msg236033 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2015-02-15 11:26
New changeset 354c3b65e245 by Serhiy Storchaka in branch '2.7':
Issue #21934: test_file2k no longer create regular file /dev/full on OpenBSD
https://hg.python.org/cpython/rev/354c3b65e245
msg236042 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2015-02-15 14:35
Why the complication? You could just use open mode "r+".
msg236044 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2015-02-15 14:44
This was my first idea. But this would be different test. The behavior of files opened with "w" and "r+" modes can be different.
History
Date User Action Args
2022-04-11 14:58:05adminsetgithub: 66133
2015-02-20 23:22:21serhiy.storchakasetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2015-02-15 14:44:03serhiy.storchakasetmessages: + msg236044
2015-02-15 14:35:17pitrousetnosy: + pitrou
messages: + msg236042
2015-02-15 11:26:50python-devsetnosy: + python-dev
messages: + msg236033
2015-02-15 10:34:18serhiy.storchakasetassignee: serhiy.storchaka

nosy: + serhiy.storchaka
2014-07-12 19:34:56ezio.melottisetmessages: + msg222875
versions: - Python 3.4, Python 3.5
2014-07-12 19:23:59BreamoreBoysetnosy: + BreamoreBoy
messages: + msg222873
2014-07-12 17:31:19ezio.melottisetversions: + Python 3.4, Python 3.5
nosy: + ezio.melotti

messages: + msg222858

stage: patch review
2014-07-11 06:40:35Daniel.Dickmansetmessages: + msg222728
2014-07-07 15:48:11vstinnersetnosy: + vstinner
messages: + msg222468
2014-07-07 15:31:40Daniel.Dickmansetfiles: + python.dev.full.diff
keywords: + patch
2014-07-07 15:30:13Daniel.Dickmancreate