Author rpointel
Recipients neologix, pitrou, rosslagerwall, rpointel, vstinner
Date 2011-09-02.05:36:44
SpamBayes Score 3.30677e-06
Marked as misclassified No
Message-id <1314941805.79.0.452688445055.issue12852@psf.upfronthosting.co.za>
In-reply-to
Content
> RĂ©mi : what happens if you manually add
> extern DIR *fdopendir(int fd);
> at the beginning of posixmodule.c?

Hello,

it seems to correctly work:
 ./python Lib/test/test_posix.py 
testNoArgFunctions (__main__.PosixTester) ... ok
test_access (__main__.PosixTester) ... ok
test_chdir (__main__.PosixTester) ... ok
test_chflags (__main__.PosixTester) ... ok
test_chown (__main__.PosixTester) ... ok
test_confstr (__main__.PosixTester) ... ok
test_cpu_set_basic (__main__.PosixTester) ... skipped "don't have sched affinity support"
test_cpu_set_bitwise (__main__.PosixTester) ... skipped "don't have sched affinity support"
test_cpu_set_cmp (__main__.PosixTester) ... skipped "don't have sched affinity support"
test_dup (__main__.PosixTester) ... ok
test_dup2 (__main__.PosixTester) ... ok
test_environ (__main__.PosixTester) ... ok
test_faccessat (__main__.PosixTester) ... ok
test_fchmodat (__main__.PosixTester) ... ok
test_fchown (__main__.PosixTester) ... ok
test_fchownat (__main__.PosixTester) ... ok
test_fdlistdir (__main__.PosixTester) ... ok
test_fexecve (__main__.PosixTester) ... skipped 'test needs posix.fexecve()'
test_fstat (__main__.PosixTester) ... ok
test_fstatat (__main__.PosixTester) ... ok
test_fstatvfs (__main__.PosixTester) ... ok
test_ftruncate (__main__.PosixTester) ... ok
test_futimens (__main__.PosixTester) ... ok
test_futimes (__main__.PosixTester) ... ok
test_futimesat (__main__.PosixTester) ... skipped 'test needs posix.futimesat()'
test_get_and_set_scheduler_and_param (__main__.PosixTester) ... skipped "can't change scheduler"
test_getcwd_long_pathnames (__main__.PosixTester) ... ok
test_getgrouplist (__main__.PosixTester) ... ok
test_getgroups (__main__.PosixTester) ... ok
test_getresgid (__main__.PosixTester) ... ok
test_getresuid (__main__.PosixTester) ... ok
test_initgroups (__main__.PosixTester) ... ok
test_lchflags_regular_file (__main__.PosixTester) ... skipped 'test needs os.lchflags()'
test_lchflags_symlink (__main__.PosixTester) ... skipped 'test needs os.lchflags()'
test_lchown (__main__.PosixTester) ... ok
test_linkat (__main__.PosixTester) ... ok
test_listdir (__main__.PosixTester) ... ok
test_listdir_default (__main__.PosixTester) ... ok
test_lockf (__main__.PosixTester) ... ok
test_lutimes (__main__.PosixTester) ... skipped 'test needs posix.lutimes()'
test_mkdirat (__main__.PosixTester) ... ok
test_mkfifo (__main__.PosixTester) ... ok
test_mkfifoat (__main__.PosixTester) ... ok
test_mknod (__main__.PosixTester) ... ok
test_mknodat (__main__.PosixTester) ... ok
test_openat (__main__.PosixTester) ... ok
test_oscloexec (__main__.PosixTester) ... ok
test_osexlock (__main__.PosixTester) ... ok
test_osshlock (__main__.PosixTester) ... ok
test_pipe (__main__.PosixTester) ... ok
test_pipe2 (__main__.PosixTester) ... skipped 'test needs os.pipe2()'
test_posix_fadvise (__main__.PosixTester) ... skipped 'test needs posix.posix_fadvise()'
test_posix_fallocate (__main__.PosixTester) ... skipped 'test needs posix.posix_fallocate()'
test_pread (__main__.PosixTester) ... ok
test_pwrite (__main__.PosixTester) ... ok
test_readlinkat (__main__.PosixTester) ... ok
test_readv (__main__.PosixTester) ... ok
test_renameat (__main__.PosixTester) ... ok
test_sched_affinity (__main__.PosixTester) ... skipped "don't have sched affinity support"
test_sched_priority (__main__.PosixTester) ... ok
test_sched_rr_get_interval (__main__.PosixTester) ... skipped 'no function'
test_sched_yield (__main__.PosixTester) ... ok
test_setresgid (__main__.PosixTester) ... ok
test_setresgid_exception (__main__.PosixTester) ... ok
test_setresuid (__main__.PosixTester) ... ok
test_setresuid_exception (__main__.PosixTester) ... ok
test_stat (__main__.PosixTester) ... ok
test_statvfs (__main__.PosixTester) ... ok
test_strerror (__main__.PosixTester) ... ok
test_symlinkat (__main__.PosixTester) ... ok
test_truncate (__main__.PosixTester) ... ok
test_umask (__main__.PosixTester) ... ok
test_unlinkat (__main__.PosixTester) ... ok
test_utime (__main__.PosixTester) ... ok
test_utimensat (__main__.PosixTester) ... ok
test_waitid (__main__.PosixTester) ... skipped 'test needs posix.waitid()'
test_writev (__main__.PosixTester) ... ok
test_initgroups (__main__.PosixGroupsTester) ... skipped 'not enough privileges'
test_setgroups (__main__.PosixGroupsTester) ... skipped 'not enough privileges'

----------------------------------------------------------------------
Ran 79 tests in 0.801s

OK (skipped=17)

And this command now works:

$ ./python -c 'import os; print(os.fdlistdir(os.open("/tmp", os.O_RDONLY)))'
['.X11-unix', '.ICE-unix', 'orbit-remi', '.X0-lock', 'dbus-WWfX2JhDtb']

Attached file patch-Modules_posixmodule_c is the patch to do this.

Thanks a lot,

Remi.
History
Date User Action Args
2011-09-02 05:36:45rpointelsetrecipients: + rpointel, pitrou, vstinner, neologix, rosslagerwall
2011-09-02 05:36:45rpointelsetmessageid: <1314941805.79.0.452688445055.issue12852@psf.upfronthosting.co.za>
2011-09-02 05:36:45rpointellinkissue12852 messages
2011-09-02 05:36:44rpointelcreate