diff --git a/attic/fuse.py b/attic/fuse.py index a5b8e8da3..cb9849827 100644 --- a/attic/fuse.py +++ b/attic/fuse.py @@ -54,6 +54,18 @@ class AtticOperations(llfuse.Operations): self._inode_count += 1 return self._inode_count + def statfs(self): + stat_ = llfuse.StatvfsData() + stat_.f_bsize = 512 + stat_.f_frsize = 512 + stat_.f_blocks = 0 + stat_.f_bfree = 0 + stat_.f_bavail = 0 + stat_.f_files = 0 + stat_.f_ffree = 0 + stat_.f_favail = 0 + return stat_ + def _find_inode(self, path): segments = os.fsencode(os.path.normpath(path)).split(b'/') inode = 1 @@ -142,7 +154,7 @@ class AtticOperations(llfuse.Operations): return os.fsencode(self.items[inode][b'source']) def mount(self, mountpoint): - llfuse.init(self, mountpoint, ['fsname=atticfs', 'nonempty', 'ro']) + llfuse.init(self, mountpoint, ['fsname=atticfs', 'ro']) try: llfuse.main(single=True) except: diff --git a/attic/testsuite/archiver.py b/attic/testsuite/archiver.py index 52e4a8e7d..f3bb5a511 100644 --- a/attic/testsuite/archiver.py +++ b/attic/testsuite/archiver.py @@ -111,7 +111,7 @@ class ArchiverTestCase(AtticTestCase): os.chown('input/file1', 100, 200) # File mode os.chmod('input/file1', 0o7755) - os.chmod('input/dir2', 0o700) + os.chmod('input/dir2', 0o555) # Block device os.mknod('input/bdev', 0o600 | stat.S_IFBLK, os.makedev(10, 20)) # Char device @@ -226,7 +226,10 @@ class ArchiverTestCase(AtticTestCase): self.wait_for_mount(mountpoint) self.assert_dirs_equal(self.input_path, os.path.join(mountpoint, 'input'), fuse=True) finally: - os.system('fusermount -u ' + mountpoint) + if sys.platform.startswith('linux'): + os.system('fusermount -u ' + mountpoint) + else: + os.system('umount ' + mountpoint) os.rmdir(mountpoint) # Give the daemon some time to exit time.sleep(.2)