summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-09-08 07:01:39 +0000
committerZac Medico <zmedico@gentoo.org>2007-09-08 07:01:39 +0000
commitef3d4aa1eefd0798a49372903415f7aa779bf718 (patch)
treef6d84e1c8f13def1362e55d7784a7b04cb7667eb /tests
parentFor bug #190268, filter SANDBOX_* from the calling environment so that they (diff)
downloadportage-multirepo-ef3d4aa1eefd0798a49372903415f7aa779bf718.tar.gz
portage-multirepo-ef3d4aa1eefd0798a49372903415f7aa779bf718.tar.bz2
portage-multirepo-ef3d4aa1eefd0798a49372903415f7aa779bf718.zip
Bug #190268 - Avoid unwanted sandbox violations in src_test().
- Allow SANDBOX_* variables to pass through. - Don't try to create an sandbox instance inside a test case in order to interaction with SANDBOX_* variables in src_test(). (trunk r7759) svn path=/main/branches/2.1.2/; revision=7760
Diffstat (limited to 'tests')
-rw-r--r--tests/portage/test_spawn.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/portage/test_spawn.py b/tests/portage/test_spawn.py
index a2a2571c..5a801062 100644
--- a/tests/portage/test_spawn.py
+++ b/tests/portage/test_spawn.py
@@ -16,8 +16,16 @@ class SpawnTestCase(TestCase):
os.close(fd)
null_fd = os.open('/dev/null', os.O_RDWR)
test_string = 2 * "blah blah blah\n"
+ # Test cases are unique because they run inside src_test() which
+ # may or may not already be running within a sandbox. Interaction
+ # with SANDBOX_* variables may trigger unwanted sandbox violations
+ # that are only reproducible with certain combinations of sandbox,
+ # usersandbox, and userpriv FEATURES. Attempts to filter SANDBOX_*
+ # variables can interfere with a currently running sandbox
+ # instance. Therefore, use free=1 here to avoid potential
+ # interactions (see bug #190268).
spawn("echo -n '%s'" % test_string, settings, logfile=logfile,
- fd_pipes={0:sys.stdin.fileno(), 1:null_fd, 2:null_fd})
+ free=1, fd_pipes={0:sys.stdin.fileno(), 1:null_fd, 2:null_fd})
os.close(null_fd)
f = open(logfile, 'r')
log_content = f.read()