From 2828bc260a073c05bb394e39b548554e3fead08f Mon Sep 17 00:00:00 2001 From: Tiago Gomes Date: Fri, 30 Sep 2016 13:00:24 +0100 Subject: Change some tests to pass as non-root Change some tests to pass if they are run as non-root. The linux-user-chroot tool seems to require that the absolute location of the binary to execute in the sandbox is given if called as non-root. --- tests/test_all.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/test_all.py b/tests/test_all.py index a4b5f81..2b8a31a 100644 --- a/tests/test_all.py +++ b/tests/test_all.py @@ -83,7 +83,7 @@ class TestMounts(object): def test_mount_proc(self, sandboxlib_executor, mounts_test_sandbox): exit, out, err = sandboxlib_executor.run_sandbox( - ['test-file-or-directory-exists', '/proc'], + ['/bin/test-file-or-directory-exists', '/proc'], filesystem_root=str(mounts_test_sandbox), extra_mounts=[(None, '/proc', 'proc')]) @@ -93,7 +93,7 @@ class TestMounts(object): def test_mount_tmpfs(self, sandboxlib_executor, mounts_test_sandbox): exit, out, err = sandboxlib_executor.run_sandbox( - ['test-file-or-directory-exists', '/dev/shm'], + ['/bin/test-file-or-directory-exists', '/dev/shm'], filesystem_root=str(mounts_test_sandbox), extra_mounts=[(None, '/dev/shm', 'tmpfs')]) @@ -125,7 +125,7 @@ class TestWriteablePaths(object): pytest.xfail("chroot backend doesn't support read-only paths.") exit, out, err = sandboxlib_executor.run_sandbox( - ['test-file-is-writable', '/data/1/canary'], + ['/bin/test-file-is-writable', '/data/1/canary'], filesystem_root=str(writable_paths_test_sandbox), filesystem_writable_paths='none') @@ -140,7 +140,7 @@ class TestWriteablePaths(object): pytest.xfail("chroot backend doesn't support read-only paths.") exit, out, err = sandboxlib_executor.run_sandbox( - ['test-file-is-writable', '/data/1/canary'], + ['/bin/test-file-is-writable', '/data/1/canary'], filesystem_root=str(writable_paths_test_sandbox), filesystem_writable_paths=['/data/1']) @@ -152,7 +152,7 @@ class TestWriteablePaths(object): def test_all_writable(self, sandboxlib_executor, writable_paths_test_sandbox): exit, out, err = sandboxlib_executor.run_sandbox( - ['test-file-is-writable', '/data/1/canary'], + ['/bin/test-file-is-writable', '/data/1/canary'], filesystem_root=str(writable_paths_test_sandbox), filesystem_writable_paths='all') @@ -167,7 +167,7 @@ class TestWriteablePaths(object): pytest.xfail("chroot backend doesn't support read-only paths.") exit, out, err = sandboxlib_executor.run_sandbox( - ['test-file-is-writable', '/data/1/canary'], + ['/bin/test-file-is-writable', '/data/1/canary'], filesystem_root=str(writable_paths_test_sandbox), filesystem_writable_paths='none' ) @@ -183,7 +183,7 @@ class TestWriteablePaths(object): pytest.xfail("chroot backend doesn't support read-only paths.") exit, out, err = sandboxlib_executor.run_sandbox( - ['test-file-is-writable', '/data/1/canary'], + ['/bin/test-file-is-writable', '/data/1/canary'], filesystem_root=str(writable_paths_test_sandbox), filesystem_writable_paths=['/data'] ) -- cgit v1.2.1