diff options
author | Martin Pärtel <martin.partel@gmail.com> | 2019-03-31 13:49:52 +0300 |
---|---|---|
committer | Martin Pärtel <martin.partel@gmail.com> | 2019-03-31 13:49:52 +0300 |
commit | fe8b3117fbc1aae4a8e44b74ebd616b9a3e28760 (patch) | |
tree | 935bb0fa98570b01edeba5c9d5e41deee9cd5262 /tests | |
parent | f2e8538eae03a6652d3fd5ed4defd33384237240 (diff) | |
download | bindfs-fe8b3117fbc1aae4a8e44b74ebd616b9a3e28760.tar.gz |
Tests: check that `unshare` supports the required options.
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/test_bindfs.rb | 5 |
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") |