mirror of https://github.com/borgbackup/borg.git
Merge pull request #4177 from ThomasWaldmann/eisdir-fix-1.1
fix EISDIR issues (1.1-maint)
This commit is contained in:
commit
09fc630877
|
@ -13,11 +13,6 @@ if [[ "$(uname -s)" == "Darwin" ]]; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
source ~/.venv/bin/activate
|
# do not use fakeroot, but run as root on travis.
|
||||||
|
# avoids the dreaded EISDIR sporadic failures. see #2482.
|
||||||
if [[ "$(uname -s)" == "Darwin" ]]; then
|
sudo bash -c "source ~/.venv/bin/activate ; tox -e $TOXENV -r"
|
||||||
# no fakeroot on OS X
|
|
||||||
sudo tox -e $TOXENV -r
|
|
||||||
else
|
|
||||||
fakeroot -u tox -r
|
|
||||||
fi
|
|
||||||
|
|
|
@ -1256,14 +1256,14 @@ class ArchiverTestCase(ArchiverTestCaseBase):
|
||||||
raise OSError(errno.EACCES, 'EACCES')
|
raise OSError(errno.EACCES, 'EACCES')
|
||||||
|
|
||||||
self.create_regular_file('file')
|
self.create_regular_file('file')
|
||||||
xattr.setxattr('input/file', 'attribute', 'value')
|
xattr.setxattr('input/file', 'user.attribute', 'value')
|
||||||
self.cmd('init', self.repository_location, '-e' 'none')
|
self.cmd('init', self.repository_location, '-e' 'none')
|
||||||
self.cmd('create', self.repository_location + '::test', 'input')
|
self.cmd('create', self.repository_location + '::test', 'input')
|
||||||
with changedir('output'):
|
with changedir('output'):
|
||||||
input_abspath = os.path.abspath('input/file')
|
input_abspath = os.path.abspath('input/file')
|
||||||
with patch.object(xattr, 'setxattr', patched_setxattr_E2BIG):
|
with patch.object(xattr, 'setxattr', patched_setxattr_E2BIG):
|
||||||
out = self.cmd('extract', self.repository_location + '::test', exit_code=EXIT_WARNING)
|
out = self.cmd('extract', self.repository_location + '::test', exit_code=EXIT_WARNING)
|
||||||
assert out == (input_abspath + ': Value or key of extended attribute attribute is too big for this '
|
assert out == (input_abspath + ': Value or key of extended attribute user.attribute is too big for this '
|
||||||
'filesystem\n')
|
'filesystem\n')
|
||||||
os.remove(input_abspath)
|
os.remove(input_abspath)
|
||||||
with patch.object(xattr, 'setxattr', patched_setxattr_ENOTSUP):
|
with patch.object(xattr, 'setxattr', patched_setxattr_ENOTSUP):
|
||||||
|
@ -1272,7 +1272,7 @@ class ArchiverTestCase(ArchiverTestCaseBase):
|
||||||
os.remove(input_abspath)
|
os.remove(input_abspath)
|
||||||
with patch.object(xattr, 'setxattr', patched_setxattr_EACCES):
|
with patch.object(xattr, 'setxattr', patched_setxattr_EACCES):
|
||||||
out = self.cmd('extract', self.repository_location + '::test', exit_code=EXIT_WARNING)
|
out = self.cmd('extract', self.repository_location + '::test', exit_code=EXIT_WARNING)
|
||||||
assert out == (input_abspath + ': Permission denied when setting extended attribute attribute\n')
|
assert out == (input_abspath + ': Permission denied when setting extended attribute user.attribute\n')
|
||||||
assert os.path.isfile(input_abspath)
|
assert os.path.isfile(input_abspath)
|
||||||
|
|
||||||
def test_path_normalization(self):
|
def test_path_normalization(self):
|
||||||
|
|
Loading…
Reference in New Issue