classification
Title: test_fcntl_64_bit from test_fcntl.py fails in Python 2.6.4
Type: behavior Stage: needs patch
Components: Library (Lib), Tests Versions: Python 3.2, Python 3.1, Python 2.7, Python 2.6
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: Arfrever, Chainsaw, pitrou, skip.montanaro (4)
Priority: normal Keywords

Created on 2009-11-01 19:20 by Chainsaw, last changed 2009-11-03 23:47 by pitrou.

Messages (4)
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) 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) 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)
History
Date User Action Args
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