aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_bindfs.rb
diff options
context:
space:
mode:
authorMartin Pärtel <martin.partel@gmail.com>2019-04-28 23:37:47 +0300
committerMartin Pärtel <martin.partel@gmail.com>2019-04-28 23:58:40 +0300
commit1310ba87c0f9045b9ddb96b73816e82a811d4f1b (patch)
tree044aee0fc0be3b9b46a2cf54eb2494f12d710d6b /tests/test_bindfs.rb
parent65b17173bda92a5e03f931244eca3f8afa127328 (diff)
downloadbindfs-1310ba87c0f9045b9ddb96b73816e82a811d4f1b.tar.gz
Fixed vagrant tests. Removed Vagrant test for Ubuntu 12.04, added 18.04.
Diffstat (limited to 'tests/test_bindfs.rb')
-rwxr-xr-xtests/test_bindfs.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/test_bindfs.rb b/tests/test_bindfs.rb
index 9e5d381..a6ecf2c 100755
--- a/tests/test_bindfs.rb
+++ b/tests/test_bindfs.rb
@@ -764,12 +764,13 @@ end
# Pull Request #73
if `uname`.strip == 'Linux' &&
+ `uname -r`.strip =~ /^[456789]/ && # 3.x kernels used by CentOS 7 and older don't support all `unshare` options despite the userspace binary supporting them
`which unshare` != '' &&
`unshare --help`.include?("--map-root-user") &&
`unshare --help`.include?("--user")
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")
+ system("unshare --map-root-user --user mkdir mnt/dir")
assert { File.stat("src/dir").gid == 0 }
assert { File.stat("mnt/dir").gid == 10000 }
end