aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMartin Pärtel <martin.partel@gmail.com>2021-01-30 10:19:39 +0200
committerMartin Pärtel <martin.partel@gmail.com>2021-01-30 10:19:39 +0200
commitc3b53f641f3afa16abdd3793b198ab13a384d03e (patch)
tree3daf6fa554ea3b65283a37500d83e54c2f6992f3 /tests
parent5eb4e05fcef7dd8d32f7453821ab53bb1fe72b5e (diff)
downloadbindfs-c3b53f641f3afa16abdd3793b198ab13a384d03e.tar.gz
Make tests run on FUSE 3 (they still fail)
Diffstat (limited to 'tests')
-rwxr-xr-xtests/test_bindfs.rb11
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/test_bindfs.rb b/tests/test_bindfs.rb
index d9d616c..62f7bfd 100755
--- a/tests/test_bindfs.rb
+++ b/tests/test_bindfs.rb
@@ -27,7 +27,12 @@ require 'tempfile'
include Errno
-$have_fuse_29 = Proc.new do
+$have_fuse_3 = Proc.new do
+ system("pkg-config --exists fuse3")
+ $?.success?
+end.call
+
+$have_fuse_29 = !$have_fuse_3 && Proc.new do
v = `pkg-config --modversion fuse`.split('.')
raise "failed to get FUSE version with pkg-config" if v.size < 2
v = v.map(&:to_i)
@@ -701,7 +706,7 @@ testenv("", :title => "many files in a directory") do
assert { Dir.entries('mnt/dir').sort == expected_entries.sort }
end
-if $have_fuse_29
+if $have_fuse_29 || $have_fuse_3
testenv("--enable-lock-forwarding --multithreaded", :title => "lock forwarding") do
File.write('src/file', 'some contents for fcntl lockng')
# (this test passes with an empty file as well, but this way is clearer)
@@ -751,7 +756,7 @@ end # have_fuse_29
#
# This test is also disabled for old (FUSE < 2.9) systems.
# TODO: figure out why it doesn't work.
-if $have_fuse_29
+if $have_fuse_29 || $have_fuse_3
root_testenv("--enable-ioctl", :title => "append-only ioctl", :valgrind => false) do
touch('mnt/file')
system('chattr +a mnt/file')