[issue5676] shutils test fails on ZFS (on FUSE, on Linux)
report at bugs.python.org
Thu Apr 9 10:37:00 CEST 2009
Larry Hastings <larry at 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.
% mkdir foo
% touch foo/a
% chmod 400 foo
% python -c 'import os ; print(os.listdir("foo"))'
On my ext4 root partition this works, printing
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 <report at bugs.python.org>
More information about the Python-bugs-list