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: test_fcntl_64_bit from test_fcntl.py fails in Python 2.6.4
Type: behavior Stage: resolved
Components: Library (Lib), Tests Versions: Python 3.4, Python 3.5, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: gregory.p.smith Nosy List: Arfrever, Chainsaw, geoffreyspear, gregory.p.smith, iritkatriel, pipping, pitrou, spatz
Priority: normal Keywords: patch

Created on 2009-11-01 19:20 by Chainsaw, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
issue7247.patch geoffreyspear, 2014-02-18 00:03 review
Messages (12)
msg94801 - (view) Author: Tony Vroon (Chainsaw) Date: 2009-11-01 19:20
chainsaw@prometheus ~ $ python2.6 
/usr/lib64/python2.6/test/test_fcntl.py
struct.pack: 
'\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0
0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
test_fcntl_64_bit (__main__.TestFcntl) ... ERROR
test_fcntl_file_descriptor (__main__.TestFcntl) ... ok
test_fcntl_fileno (__main__.TestFcntl) ... Status from fcntl with 
O_NONBLOCK: 
0
String from fcntl with F_SETLKW: 
'\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0
0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
ok

======================================================================
ERROR: test_fcntl_64_bit (__main__.TestFcntl)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python2.6/test/test_fcntl.py", line 96, in 
test_fcntl_64_bit
    fcntl.fcntl(fd, cmd, flags)
IOError: [Errno 22] Invalid argument

----------------------------------------------------------------------
Ran 3 tests in 0.000s

FAILED (errors=1)
Traceback (most recent call last):
  File "/usr/lib64/python2.6/test/test_fcntl.py", line 105, in <module>
    test_main()
  File "/usr/lib64/python2.6/test/test_fcntl.py", line 102, in test_main
    run_unittest(TestFcntl)
  File "/usr/lib64/python2.6/test/test_support.py", line 724, in 
run_unittest
    _run_suite(suite)
  File "/usr/lib64/python2.6/test/test_support.py", line 707, in 
_run_suite
    raise TestFailed(err)
test.test_support.TestFailed: Traceback (most recent call last):
  File "/usr/lib64/python2.6/test/test_fcntl.py", line 96, in 
test_fcntl_64_bit
    fcntl.fcntl(fd, cmd, flags)
IOError: [Errno 22] Invalid argument
msg94828 - (view) Author: Skip Montanaro (skip.montanaro) * (Python triager) Date: 2009-11-02 13:50
On what platform did you encounter this failure?  I can't reproduce it
on Mac OSX (Leopard - 10.5.8) or Solaris 10 (update 5) running from
up-to-date release26-maint branches or on Ubuntu (8.10) running the 2.6.4
release code.
msg94829 - (view) Author: Tony Vroon (Chainsaw) Date: 2009-11-02 14:46
This is AMD64 Linux, to be specific a 2.6.32-rc5-00336-g8d5eb43 kernel 
running on a dual Opteron 2435 system. The distribution is Gentoo linux, 
with a glibc version of 2.10.1-r0, compiled with GCC 4.4.2
msg94872 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2009-11-03 23:33
That test was added as part of #1309352, to check that fcntl accepted
64-bit arguments on 64-bit systems. Previously it would raise an
OverflowError. Perhaps we should silent the IOError, since it only shows
that the OS refuses that particular case, not that the Python wrapper is
at fault.

(seeing you have problems, I don't know how to make the test pass
reliably on all systems; it does pass on my x86-64 system)
msg119693 - (view) Author: Dirkjan Ochtman (djc) * (Python committer) Date: 2010-10-27 11:37
I'm also unable to reproduce this.
msg141632 - (view) Author: Elias Pipping (pipping) Date: 2011-08-04 19:11
I had this problem as well. Recompiling my kernel with CONFIG_DNOTIFY=y fixed it (Thanks to David Leverton for pointing this out to me).
msg211118 - (view) Author: Geoffrey Spear (geoffreyspear) * Date: 2014-02-12 23:25
Reproduced this on a Cr-48 Chromebook running ChrUbuntu 3.4.0 in Python 3.3.4 and 3.4.0RC1. The kernel does appear to have been compiled with CONFIG_DNOTIFY=y, so that's not a complete solution.
msg211460 - (view) Author: Geoffrey Spear (geoffreyspear) * Date: 2014-02-18 00:03
Attached patch to ignore OSError attempting to F_NOTIFY on a machine without dnotify but with sys/fcntl.h including #defines for F_NOTIFY and DN_MULTISHOT. The test as written attempts to skip the test, but fails when the header doesn't match the actual capabilities of fcntl(2).
msg223330 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2014-07-17 11:58
The patch LGTM at a quick glance so can we have a formal review please.
msg391456 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2021-04-20 17:23
The test was disabled for ARM Linux here: https://github.com/python/cpython/commit/e5aefa452b2e3a5a834610cefa1656f36673f686

Does that resolve this issue?
msg391470 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2021-04-20 19:35
given how old this is and how i added that test skip presumably when i setup my first arm buildbot... closing.
msg391478 - (view) Author: Arfrever Frehtes Taifersar Arahesis (Arfrever) * (Python triager) Date: 2021-04-20 21:08
ARM != AMD64 (alternative name of x86_64)
History
Date User Action Args
2022-04-11 14:56:54adminsetgithub: 51496
2021-04-20 21:08:09Arfreversetmessages: + msg391478
2021-04-20 19:35:34gregory.p.smithsetstatus: open -> closed
messages: + msg391470

assignee: gregory.p.smith
resolution: fixed
stage: patch review -> resolved
2021-04-20 17:23:40iritkatrielsetnosy: + iritkatriel, gregory.p.smith
messages: + msg391456
2019-09-03 08:53:14djcsetnosy: - djc
2019-04-26 19:52:28BreamoreBoysetnosy: - BreamoreBoy
2014-07-17 11:58:42BreamoreBoysetnosy: + BreamoreBoy

messages: + msg223330
versions: + Python 3.5, - Python 3.3
2014-02-18 02:50:10berker.peksagsetstage: needs patch -> patch review
versions: - Python 2.6, Python 3.1, Python 3.2
2014-02-18 00:03:48geoffreyspearsetfiles: + issue7247.patch
keywords: + patch
messages: + msg211460
2014-02-12 23:25:20geoffreyspearsetnosy: + geoffreyspear

messages: + msg211118
versions: + Python 3.3, Python 3.4
2011-08-04 19:11:08pippingsetmessages: + msg141632
2011-08-04 04:31:43pippingsetnosy: + pipping
2010-10-27 11:37:24djcsetnosy: + djc
messages: + msg119693
2010-05-20 20:32:48skip.montanarosetnosy: - skip.montanaro
2009-12-12 21:36:02spatzsetnosy: + spatz
2009-11-03 23:47:23pitrousetpriority: normal
nosy: skip.montanaro, pitrou, Arfrever, Chainsaw
versions: + Python 3.1, Python 2.7, Python 3.2
components: + Library (Lib)
stage: needs patch
2009-11-03 23:33:54pitrousetnosy: + pitrou
messages: + msg94872
2009-11-02 14:46:24Chainsawsetmessages: + msg94829
2009-11-02 13:50:18skip.montanarosetnosy: + skip.montanaro
messages: + msg94828
2009-11-01 22:34:17Arfreversettitle: 2.6.4 fnctl test failure -> test_fcntl_64_bit from test_fcntl.py fails in Python 2.6.4
2009-11-01 22:30:14Arfreversetnosy: + Arfrever
2009-11-01 19:20:04Chainsawcreate