aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMartin Pärtel <martin.partel@gmail.com>2019-03-31 13:49:52 +0300
committerMartin Pärtel <martin.partel@gmail.com>2019-03-31 13:49:52 +0300
commitfe8b3117fbc1aae4a8e44b74ebd616b9a3e28760 (patch)
tree935bb0fa98570b01edeba5c9d5e41deee9cd5262 /tests
parentf2e8538eae03a6652d3fd5ed4defd33384237240 (diff)
downloadbindfs-fe8b3117fbc1aae4a8e44b74ebd616b9a3e28760.tar.gz
Tests: check that `unshare` supports the required options.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/test_bindfs.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/test_bindfs.rb b/tests/test_bindfs.rb
index 69ca6e0..c5d41f6 100755
--- a/tests/test_bindfs.rb
+++ b/tests/test_bindfs.rb
@@ -763,7 +763,10 @@ testenv("", :title => "mntdir with newline", :mntdir_name => "a\nb") do
end
# Pull Request #73
-if `uname`.strip == 'Linux' && `which unshare` != ''
+if `uname`.strip == 'Linux' &&
+ `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")