From 0b46c0d19205ff98b6640bcf3557d3cddf0f885c 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). (cherry picked from commit 4766d66875b577ebe60aaad9fd24e697064b2b1c) --- borg/remote.py | 2 ++ borg/testsuite/archiver.py | 1 - borg/testsuite/repository.py | 2 -- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/borg/remote.py b/borg/remote.py index f0dbc9cf5..246ae0fca 100644 --- a/borg/remote.py +++ b/borg/remote.py @@ -31,6 +31,8 @@ MAX_INFLIGHT = 100 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/borg/testsuite/archiver.py b/borg/testsuite/archiver.py index 211b25efd..81974a8c0 100644 --- a/borg/testsuite/archiver.py +++ b/borg/testsuite/archiver.py @@ -1786,7 +1786,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/borg/testsuite/repository.py b/borg/testsuite/repository.py index 713b03cfd..a762b6b2c 100644 --- a/borg/testsuite/repository.py +++ b/borg/testsuite/repository.py @@ -416,7 +416,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): def open(self, create=False): @@ -449,7 +448,6 @@ class RemoteRepositoryTestCase(RepositoryTestCase): assert self.repository.borg_cmd(args, testing=False) == ['borg-0.28.2', 'serve', '--umask=077', '--info'] -@pytest.mark.skipif(sys.platform == 'cygwin', reason='remote is broken on cygwin and hangs') class RemoteRepositoryCheckTestCase(RepositoryCheckTestCase): def open(self, create=False):