瀏覽代碼

Merge pull request #1150 from enkore/fix/solaris

Fix test_sparse_file for solaris
TW 9 年之前
父節點
當前提交
34d07d1526
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. 3 2
      src/borg/testsuite/archiver.py

+ 3 - 2
src/borg/testsuite/archiver.py

@@ -408,8 +408,9 @@ class ArchiverTestCase(ArchiverTestCaseBase):
             return repository.id
 
     def test_sparse_file(self):
-        # no sparse file support on Mac OS X
-        sparse_support = sys.platform != 'darwin'
+        # Mac OS X has no sparse file support
+        # Solaris (ZFS) has sparse file support, but is less predictable about it
+        sparse_support = sys.platform not in ['darwin', 'sunos5']
         filename = os.path.join(self.input_path, 'sparse')
         content = b'foobar'
         hole_size = 5 * (1 << CHUNK_MAX_EXP)  # 5 full chunker buffers