diff options
author | Sergei Shilovsky <sshilovsky@gmail.com> | 2022-06-23 17:19:01 +0300 |
---|---|---|
committer | Sergei Shilovsky <sshilovsky@gmail.com> | 2022-06-23 17:22:17 +0300 |
commit | 3a1d2a1e265c43971f78ed1845920539ed00fd35 (patch) | |
tree | debb5a74c7ddf8805ec8f773093e6780e8771e68 | |
parent | 02047f5f334548151e0dfc280cc1fccbbab02cd9 (diff) | |
download | bindfs-3a1d2a1e265c43971f78ed1845920539ed00fd35.tar.gz |
Skip test if unshare was not possible
For some reason, unshare fails with "Operation not permitted" for me.
I'm testing in a chrooted system, that might be a reason.
-rwxr-xr-x | tests/test_bindfs.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/test_bindfs.rb b/tests/test_bindfs.rb index 9eef27d..95467a3 100755 --- a/tests/test_bindfs.rb +++ b/tests/test_bindfs.rb @@ -839,9 +839,10 @@ if `uname`.strip == 'Linux' && `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 mkdir mnt/dir") - assert { File.stat("src/dir").gid == 0 } - assert { File.stat("mnt/dir").gid == 10000 } + if system("unshare --map-root-user --user mkdir mnt/dir") + assert { File.stat("src/dir").gid == 0 } + assert { File.stat("mnt/dir").gid == 10000 } + end end end |