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 Jason.Vas.Dias
Recipients Jason.Vas.Dias
Date 2011-04-29.16:47:30
SpamBayes Score 1.1097012e-11
Marked as misclassified No
Message-id <1304095651.33.0.951186187761.issue11956@psf.upfronthosting.co.za>
In-reply-to
Content
oops, no sorry it was this bit from the strace log :

umask(0222)                             = 022
stat("./@test_9634_tmp", 0x7fff7ef64130) = -1 ENOENT (No such file or directory)
open("./@test_9634_tmp.cpython-33m.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("./@test_9634_tmpmodule.cpython-33m.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("./@test_9634_tmp.abi3.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("./@test_9634_tmpmodule.abi3.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("./@test_9634_tmp.so", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("./@test_9634_tmpmodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("./@test_9634_tmp.py", O_RDONLY)   = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=48, ...}) = 0
open("./__pycache__/@test_9634_tmp.cpython-32.pyc", O_RDONLY) = -1 ENOENT (No such file or directory)
fstat(3, {st_mode=S_IFREG|0644, st_size=48, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fd261c4a000
read(3, "# This is a test file written by test_import.py\n", 4096) = 48
read(3, "", 4096)                       = 0
mkdir("./__pycache__", 0100777)         = 0
unlink("./__pycache__/@test_9634_tmp.cpython-32.pyc") = -1 ENOENT (No such file or directory)
open("./__pycache__/@test_9634_tmp.cpython-32.pyc", O_WRONLY|O_CREAT|O_EXCL|O_TRUNC, 0100644) = 4
fcntl(4, F_GETFL)                       = 0x8001 (flags O_WRONLY|O_LARGEFILE)
fstat(4, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fd261c49000
lseek(4, 0, SEEK_CUR)                   = 0
write(4, "l\f\r\n\0\0\0\0c\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0@\0\0\0s\4\0\0\0d\0\0S(\1\0\0\0N(\0\0\0\0(\0\0\0\0(\0\0\0\0(\0\0\0\0u\23\0\0\0./@test_9634_tmp.pyu\10\0\0\0<module>\1\0\0\0s\0\0\0\0", 110) = 110
lseek(4, 4, SEEK_SET)                   = 4
write(4, "?\342\272M", 4)               = 4
close(4)                                = 0
munmap(0x7fd261c49000, 4096)            = 0
close(3)                                = 0
munmap(0x7fd261c4a000, 4096)            = 0
umask(022)                              = 0222
stat("__pycache__", {st_mode=S_IFDIR|S_ISGID|0555, st_size=4096, ...}) = 0
stat("__pycache__/@test_9634_tmp.cpython-32.pyc", {st_mode=S_IFREG|0444, st_size=110, ...}) = 0


So the test succeeds ; ie. is correctly detecting being able to
create a file in a directory with umask 0222 ; I think if you
are the super-user (root) - and I am - w bits on directories
owned by root are ignored - double-checking this now.

So I think the fix is simply to say : if I am root user, skip this test,
because it will always fail.
History
Date User Action Args
2011-04-29 16:47:31Jason.Vas.Diassetrecipients: + Jason.Vas.Dias
2011-04-29 16:47:31Jason.Vas.Diassetmessageid: <1304095651.33.0.951186187761.issue11956@psf.upfronthosting.co.za>
2011-04-29 16:47:30Jason.Vas.Diaslinkissue11956 messages
2011-04-29 16:47:30Jason.Vas.Diascreate