Skip to content

Commit b6dfcc9

Browse files
mount: add test for dev/ino being different
1 parent 45171ac commit b6dfcc9

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/borg/testsuite/archiver.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2908,6 +2908,20 @@ def has_noatime(some_file):
29082908
else:
29092909
raise
29102910

2911+
@unittest.skipUnless(llfuse, 'llfuse not installed')
2912+
def test_fuse_dev_ino(self):
2913+
self.cmd('init', '--encryption=repokey', self.repository_location)
2914+
self.create_regular_file('testfile', contents=b'test content')
2915+
original_stat = os.stat('input/testfile')
2916+
self.cmd('create', self.repository_location + '::archive', 'input')
2917+
mountpoint = os.path.join(self.tmpdir, 'mountpoint')
2918+
with self.fuse_mount(self.repository_location + '::archive', mountpoint):
2919+
mounted_file = os.path.join(mountpoint, 'input', 'testfile')
2920+
mounted_stat = os.stat(mounted_file)
2921+
# we must not use the same dev/ino in the FUSE fs
2922+
assert original_stat.st_ino != mounted_stat.st_ino
2923+
assert original_stat.st_dev != mounted_stat.st_dev
2924+
29112925
@unittest.skipUnless(llfuse, 'llfuse not installed')
29122926
def test_fuse_versions_view(self):
29132927
self.cmd('init', '--encryption=repokey', self.repository_location)

0 commit comments

Comments
 (0)