1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2025-01-03 05:35:58 +00:00

Merge pull request #7577 from ThomasWaldmann/fix-test-extract-continue

fix test_extract_continue
This commit is contained in:
TW 2023-05-16 19:57:23 +02:00 committed by GitHub
commit 7e0221d3a2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -635,9 +635,13 @@ def test_extract_continue(self):
file1_st = os.stat("input/file1")
# simulate a partially extracted file2 (smaller size, archived mtime not yet set)
file2_st = os.stat("input/file2")
# make a hardlink, so it does not free the inode when unlinking input/file2
os.link("input/file2", "hardlink-to-keep-inode-f2")
os.truncate("input/file2", 123) # -> incorrect size, incorrect mtime
# simulate file3 has not yet been extracted
file3_st = os.stat("input/file3")
# make a hardlink, so it does not free the inode when unlinking input/file3
os.link("input/file3", "hardlink-to-keep-inode-f3")
os.remove("input/file3")
with changedir("output"):
# now try to continue extracting, using the same archive, same output dir: