From 4766d66875b577ebe60aaad9fd24e697064b2b1c Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Thu, 8 Jun 2017 02:23:57 +0200 Subject: [PATCH] enable remote tests on cygwin the cygwin issue that caused these tests to break was fixed in cygwin at least since cygwin 2.8.0 (maybe even since 2.7.0). also added a comment to our workaround (os_write wrapper, that is needed still for people running older cygwin versions) that it can be removed when cygwin 2.8.0 is considered ancient (and everybody has upgraded to some fixed version). --- src/borg/remote.py | 2 ++ src/borg/testsuite/archiver.py | 1 - src/borg/testsuite/repository.py | 2 -- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/borg/remote.py b/src/borg/remote.py index 5dc2a495a..6ce6c3d0d 100644 --- a/src/borg/remote.py +++ b/src/borg/remote.py @@ -42,6 +42,8 @@ RATELIMIT_PERIOD = 0.1 def os_write(fd, data): """os.write wrapper so we do not lose data for partial writes.""" + # TODO: this issue is fixed in cygwin since at least 2.8.0, remove this + # wrapper / workaround when this version is considered ancient. # This is happening frequently on cygwin due to its small pipe buffer size of only 64kiB # and also due to its different blocking pipe behaviour compared to Linux/*BSD. # Neither Linux nor *BSD ever do partial writes on blocking pipes, unless interrupted by a diff --git a/src/borg/testsuite/archiver.py b/src/borg/testsuite/archiver.py index 8ae235f20..c1ec2b188 100644 --- a/src/borg/testsuite/archiver.py +++ b/src/borg/testsuite/archiver.py @@ -2835,7 +2835,6 @@ class ManifestAuthenticationTest(ArchiverTestCaseBase): assert not self.cmd('list', self.repository_location) -@pytest.mark.skipif(sys.platform == 'cygwin', reason='remote is broken on cygwin and hangs') class RemoteArchiverTestCase(ArchiverTestCase): prefix = '__testsuite__:' diff --git a/src/borg/testsuite/repository.py b/src/borg/testsuite/repository.py index 25e112bda..e29c7d532 100644 --- a/src/borg/testsuite/repository.py +++ b/src/borg/testsuite/repository.py @@ -774,7 +774,6 @@ class RepositoryCheckTestCase(RepositoryTestCaseBase): self.assert_equal(self.repository.get(H(0)), b'data2') -@pytest.mark.skipif(sys.platform == 'cygwin', reason='remote is broken on cygwin and hangs') class RemoteRepositoryTestCase(RepositoryTestCase): repository = None # type: RemoteRepository @@ -901,7 +900,6 @@ class RemoteLegacyFree(RepositoryTestCaseBase): self.repository.commit() -@pytest.mark.skipif(sys.platform == 'cygwin', reason='remote is broken on cygwin and hangs') class RemoteRepositoryCheckTestCase(RepositoryCheckTestCase): def open(self, create=False):