Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(166)

Side by Side Diff: client/site_tests/security_RendererSandbox/security_RendererSandbox.py

Issue 5740004: Move site_chrome_test, site_logging, site_log_reader, site_crash_test into cros dir. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/autotest.git@master
Patch Set: patch Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « client/site_tests/security_NetworkListeners/security_NetworkListeners.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 5
6 import os, subprocess, time, re 6 import os, subprocess, time, re
7 from autotest_lib.client.bin import test, utils 7 from autotest_lib.client.bin import utils
8 from autotest_lib.client.common_lib import error 8 from autotest_lib.client.common_lib import error
9 from autotest_lib.client.cros import login, ui_test 9 from autotest_lib.client.cros import cros_ui_test, login
10 10
11 class security_RendererSandbox(ui_test.UITest): 11 class security_RendererSandbox(cros_ui_test.UITest):
12 version = 1 12 version = 1
13 render_pid = -1 13 render_pid = -1
14 14
15 15
16 def check_for_seccomp_sandbox(self): 16 def check_for_seccomp_sandbox(self):
17 # the seccomp sandbox has exactly one child process that has no 17 # the seccomp sandbox has exactly one child process that has no
18 # other threads, this is the trusted helper process. 18 # other threads, this is the trusted helper process.
19 seccomp = subprocess.Popen(['ps', 'h', '--format', 'pid', 19 seccomp = subprocess.Popen(['ps', 'h', '--format', 'pid',
20 '--ppid', '%s' % self.render_pid], 20 '--ppid', '%s' % self.render_pid],
21 stdout=subprocess.PIPE) 21 stdout=subprocess.PIPE)
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 # to true/false depending on whether a pid has been found 72 # to true/false depending on whether a pid has been found
73 def _get_renderer_pid(self): 73 def _get_renderer_pid(self):
74 pgrep = subprocess.Popen(['pgrep', '-f', '%s' % 'type=renderer'], 74 pgrep = subprocess.Popen(['pgrep', '-f', '%s' % 'type=renderer'],
75 stdout=subprocess.PIPE) 75 stdout=subprocess.PIPE)
76 pids = pgrep.communicate()[0].split() 76 pids = pgrep.communicate()[0].split()
77 if pids: 77 if pids:
78 self.render_pid = pids[0] 78 self.render_pid = pids[0]
79 return True 79 return True
80 else: 80 else:
81 return False 81 return False
OLDNEW
« no previous file with comments | « client/site_tests/security_NetworkListeners/security_NetworkListeners.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698