diff options
Diffstat (limited to '')
-rw-r--r-- | test/test_python_isolation.py | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/test_python_isolation.py b/test/test_python_isolation.py index e1a42c98..680f2c03 100644 --- a/test/test_python_isolation.py +++ b/test/test_python_isolation.py @@ -88,3 +88,26 @@ class TestPythonIsolation(TestApplicationPython): self.conf({"listeners": {}, "applications": {}}) assert waitforunmount(temp_dir), 'language_deps unmount' + + def test_python_isolation_procfs(self, is_su, temp_dir): + isolation_features = option.available['features']['isolation'].keys() + + if not is_su: + pytest.skip('requires root') + + isolation = {'rootfs': temp_dir, 'automount': {'procfs': False}} + + self.load('ns_inspect', isolation=isolation) + + assert ( + self.getjson(url='/?path=/proc/self')['body']['FileExists'] + == False + ), 'no /proc/self' + + isolation['automount']['procfs'] = True + + self.load('ns_inspect', isolation=isolation) + + assert ( + self.getjson(url='/?path=/proc/self')['body']['FileExists'] == True + ), '/proc/self' |