aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_bindfs.rb
diff options
context:
space:
mode:
authorMartin Pärtel <martin.partel@gmail.com>2021-02-13 15:56:57 +0200
committerMartin Pärtel <martin.partel@gmail.com>2021-02-13 15:56:57 +0200
commitbc5313dc583cad9a3949bd798995ab1ee398ecf6 (patch)
tree3eef96d1b7cbb7a4e05a3ea954b1bc75231c1fd8 /tests/test_bindfs.rb
parent2cf41a75c11472bd6737b48c61f0a3d30cd6f242 (diff)
downloadbindfs-bc5313dc583cad9a3949bd798995ab1ee398ecf6.tar.gz
Refactored and unit-tested filter_special_opts. Shaved a bunch of yaks on the way.
Diffstat (limited to 'tests/test_bindfs.rb')
-rwxr-xr-xtests/test_bindfs.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/test_bindfs.rb b/tests/test_bindfs.rb
index 49f2332..29210b7 100755
--- a/tests/test_bindfs.rb
+++ b/tests/test_bindfs.rb
@@ -296,7 +296,9 @@ testenv("--chmod-deny --chmod-allow-x") do
assert_exception(EPERM) { chmod(0777, 'mnt/file') }
assert_exception(EPERM) { chmod(0000, 'mnt/file') }
- assert_exception(EPERM) { chmod(01700, 'mnt/file') } # sticky bit
+ if `uname`.strip != 'FreeBSD' # FreeBSD doesn't let us set the sticky bit on files
+ assert_exception(EPERM) { chmod(01700, 'mnt/file') } # sticky bit
+ end
chmod(0611, 'mnt/file') # chmod that only changes x-bits should work
assert { File.stat('src/file').mode & 07777 == 00611 }
@@ -895,7 +897,7 @@ if `uname`.strip != 'FreeBSD' # -o dev is not supported on FreeBSD
end
# PR #95
-testenv("-ouser -onofail,nouser,delete-deny -o users -o auto,rename-deny,noauto -o chmod-deny,_netdev", :title => "filtering special options") do
+testenv("-ouser -onofail,nouser,,,delete-deny -o users -o auto,rename-deny,noauto -o chmod-deny,_netdev,,", :title => "filtering special options") do
touch('src/file')
assert_exception(EPERM) { rm('mnt/file') }
assert_exception(EPERM) { File.rename('mnt/file', 'mnt/file2') }