From 95aa1e77fdcdb7e6aee9f8c63a73efad9036dd0a Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Tue, 13 Nov 2018 23:03:45 +0100 Subject: [PATCH 1/2] stop using fakeroot on travis, avoids #2482 on osx, we already ran the tests w/o fakeroot, directly as root. do the same for linux. (cherry picked from commit 562cce1dee610b8c26a0d8d42a3f9df5adf96503) --- .travis/run.sh | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/.travis/run.sh b/.travis/run.sh index 7c1e847c1..91f6f7663 100755 --- a/.travis/run.sh +++ b/.travis/run.sh @@ -13,11 +13,6 @@ if [[ "$(uname -s)" == "Darwin" ]]; then fi fi -source ~/.venv/bin/activate - -if [[ "$(uname -s)" == "Darwin" ]]; then - # no fakeroot on OS X - sudo tox -e $TOXENV -r -else - fakeroot -u tox -r -fi +# do not use fakeroot, but run as root on travis. +# avoids the dreaded EISDIR sporadic failures. see #2482. +sudo bash -c "source ~/.venv/bin/activate ; tox -e $TOXENV -r" From 60347a4dd69600951921d51d6d8b2f7df0bbf697 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Wed, 14 Nov 2018 01:10:16 +0100 Subject: [PATCH 2/2] xattr key names must start with user. on linux ... or the call will just error with "operation not supported" (cherry picked from commit 53971e8e79c515e942eb4acdb9d19d002779e5e9) --- src/borg/testsuite/archiver.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/borg/testsuite/archiver.py b/src/borg/testsuite/archiver.py index 6afd95cc9..95d0f7b67 100644 --- a/src/borg/testsuite/archiver.py +++ b/src/borg/testsuite/archiver.py @@ -1256,14 +1256,14 @@ class ArchiverTestCase(ArchiverTestCaseBase): raise OSError(errno.EACCES, 'EACCES') 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('create', self.repository_location + '::test', 'input') with changedir('output'): input_abspath = os.path.abspath('input/file') with patch.object(xattr, 'setxattr', patched_setxattr_E2BIG): 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') os.remove(input_abspath) with patch.object(xattr, 'setxattr', patched_setxattr_ENOTSUP): @@ -1272,7 +1272,7 @@ class ArchiverTestCase(ArchiverTestCaseBase): os.remove(input_abspath) with patch.object(xattr, 'setxattr', patched_setxattr_EACCES): 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) def test_path_normalization(self):