aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_bindfs.rb
diff options
context:
space:
mode:
authorMartin Pärtel <martin.partel@gmail.com>2019-03-31 13:31:39 +0300
committerMartin Pärtel <martin.partel@gmail.com>2019-03-31 13:35:33 +0300
commit510f89fa636b551a8406d7cfbf1a636411e7724e (patch)
tree779a209b9f216a8ecd117be9281f3050fdfcfdf3 /tests/test_bindfs.rb
parentaaf17074677635a6ef8e91a6cc3264ee803962e5 (diff)
downloadbindfs-510f89fa636b551a8406d7cfbf1a636411e7724e.tar.gz
Test case for #73
Diffstat (limited to 'tests/test_bindfs.rb')
-rwxr-xr-xtests/test_bindfs.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test_bindfs.rb b/tests/test_bindfs.rb
index 01327b5..69ca6e0 100755
--- a/tests/test_bindfs.rb
+++ b/tests/test_bindfs.rb
@@ -762,6 +762,16 @@ testenv("", :title => "mntdir with newline", :mntdir_name => "a\nb") do
assert { File.exist?("a\nb/f") }
end
+# Pull Request #73
+if `uname`.strip == 'Linux' && `which unshare` != ''
+ root_testenv("--gid-offset=10000", :title => "setgid and gid-offset") do
+ system("chmod g+s src")
+ system("unshare --map-root-user --user #{$nobody} mkdir mnt/dir")
+ assert { File.stat("src/dir").gid == 0 }
+ assert { File.stat("mnt/dir").gid == 10000 }
+ end
+end
+
if `uname`.strip != 'FreeBSD' # -o dev is not supported on FreeBSD
root_testenv("-odev") do
system("mknod mnt/zero c 1 5")