rofiles: Add --copyup option
Sadly https://sourceware.org/bugzilla/show_bug.cgi?id=22089 is I think going to actually force us to cave here. Even if we got the glibc patch in today, we need to support the RHEL glibc. See also discussion about fish as part of the general Fedora tracker. This is basically needed to unblock rpm-ostree unified core 🌐: https://github.com/projectatomic/rpm-ostree/issues/729 Closes: https://github.com/ostreedev/ostree/issues/1377 Closes: #1382 Approved by: jlebon
This commit is contained in:
1 parent
994cd66744
commit
46a841a062
3 files changed
+133
-38
No files matched your search
@@ -26,7 +26,7 @@ skip_without_user_xattrs
|
||||
|
||||
setup_test_repository "bare"
|
||||
|
||||
echo "1..8"
|
||||
echo "1..11"
|
||||
|
||||
cd ${test_tmpdir}
|
||||
mkdir mnt
|
||||
@@ -117,3 +117,23 @@ echo "ok checkout copy fallback"
|
||||
|
||||
# check that O_RDONLY|O_CREAT is handled correctly; used by flock(1) at least
|
||||
flock mnt/nonexistent-file echo "ok create file in ro mode"
|
||||
echo "ok flock"
|
||||
|
||||
# And now with --copyup enabled
|
||||
|
||||
fusermount -u ${test_tmpdir}/mnt
|
||||
assert_not_has_file mnt/firstfile
|
||||
rofiles-fuse --copyup checkout-test2 mnt
|
||||
assert_file_has_content mnt/firstfile first
|
||||
echo "ok copyup mount"
|
||||
|
||||
firstfile_orig_inode=$(stat -c %i checkout-test2/firstfile)
|
||||
for path in firstfile{,-link}; do
|
||||
echo truncating > mnt/${path}
|
||||
assert_file_has_content mnt/${path} truncating
|
||||
assert_not_file_has_content mnt/${path} first
|
||||
done
|
||||
firstfile_new_inode=$(stat -c %i checkout-test2/firstfile)
|
||||
assert_not_streq "${firstfile_orig_inode}" "${firstfile_new_inode}"
|
||||
|
||||
echo "ok copyup"
|
||||
Reference in new issue
Block a user