Larry Hastings <la...@hastings.org> added the comment:

The analysis I wrote on 2009/4/6 is correct, but I just discovered
another important detail: it only happens on my ZFS partition.  I'm
using ZFS on Linux, via FUSE.  No wonder I'm the only person it's
happening to!  I don't know whether it's because of FUSE or because of
ZFS; if it's because of ZFS, then more people will see this once the
next rev of OS X hits the streets.

To reproduce:
% mkdir foo
% touch foo/a
% chmod 400 foo
% python -c 'import os ; print(os.listdir("foo"))'

On my ext4 root partition this works, printing
  ['a']
On my ZFS home partition this fails, printing
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
  OSError: [Errno 13] Permission denied: 'foo'

I observe this behavior in Python 2.6.1 and in py3k/trunk.

The attached patch fixes test_shutil so it passes on both partitions. 
The fix: allow the first failure to be *either* os.listdir (in which
case arg must be TESTFN) or os.remove (in which case arg must be
self.childpath).  Patch was written against r71404.

----------
title: Fix "make clean" in py3k/trunk -> shutils test fails on ZFS (on FUSE, on 
Linux)
versions: +Python 2.6
Added file: http://bugs.python.org/file13660/lch.test_shutil.r71404.diff

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue5676>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to