summaryrefslogtreecommitdiff
path: root/tests/test-rofiles-fuse.sh
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2016-06-26 10:25:03 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2016-06-27 13:08:46 +0000
commit439069b2bbe268fae7010e2fcb67c57d914cc22f (patch)
tree898400f7ae337a2712ed61ae75970ab3c41eda04 /tests/test-rofiles-fuse.sh
parentda989b473dc6b812646b65437f96ff5b9e3af3a4 (diff)
downloadostree-439069b2bbe268fae7010e2fcb67c57d914cc22f.tar.gz
checkout: Add an option to require hardlinks
I've seen a few people hit this and wonder why checkouts are slow/take space. Really, ensuring this happens is the *point* of OSTree. Physical copies should be a last resort fallback for very unusual situations (one of those is rpm-ostree checking out the db since librpm doesn't know how to read from libostree). Even I hit the fact that `/var` is a mountpoint disallowing hardlinks with `/ostree` once and was confused. =) Add this to the rofiles-fuse test case because it creates a mount point. Closes: #368 Approved by: jlebon
Diffstat (limited to 'tests/test-rofiles-fuse.sh')
-rwxr-xr-xtests/test-rofiles-fuse.sh12
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/test-rofiles-fuse.sh b/tests/test-rofiles-fuse.sh
index d021df09..736747f7 100755
--- a/tests/test-rofiles-fuse.sh
+++ b/tests/test-rofiles-fuse.sh
@@ -26,7 +26,7 @@ skip_without_user_xattrs
setup_test_repository "bare-user"
-echo "1..5"
+echo "1..6"
mkdir mnt
@@ -71,3 +71,13 @@ echo "ok deletion"
${CMD_PREFIX} ostree --repo=repo commit -b test2 -s fromfuse --link-checkout-speedup --tree=dir=checkout-test2
echo "ok commit"
+
+${CMD_PREFIX} ostree --repo=repo checkout -U test2 mnt/test2-checkout-copy-fallback
+assert_file_has_content mnt/test2-checkout-copy-fallback/anewfile-for-fuse anewfile-for-fuse
+
+if ${CMD_PREFIX} ostree --repo=repo checkout -UH test2 mnt/test2-checkout-copy-hardlinked 2>err.txt; then
+ assert_not_reached "Checking out via hardlinks across mountpoint unexpectedly succeeded!"
+fi
+assert_file_has_content err.txt "Invalid cross-device link"
+
+echo "ok checkout copy fallback"