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

Side by Side Diff: client/tests/bash_shared_mapping/bash_shared_mapping.py

Issue 6539001: Merge remote branch 'cros/upstream' into master. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/autotest.git@master
Patch Set: patch Created 9 years, 10 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/common_lib/hosts/base_classes.py ('k') | client/tests/fsfuzzer/fsfuzzer.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 import signal, os 1 import signal, os
2 from autotest_lib.client.bin import utils, test 2 from autotest_lib.client.bin import utils, test
3 3
4 class bash_shared_mapping(test.test): 4 class bash_shared_mapping(test.test):
5 version = 3 5 version = 3
6 6
7 # http://www.zip.com.au/~akpm/linux/patches/stuff/ext3-tools.tar.gz 7 # http://www.zip.com.au/~akpm/linux/patches/stuff/ext3-tools.tar.gz
8 def setup(self, tarball = 'ext3-tools.tar.gz'): 8 def setup(self, tarball = 'ext3-tools.tar.gz'):
9 self.tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir) 9 self.tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir)
10 utils.extract_tarball_to_dir(self.tarball, self.srcdir) 10 utils.extract_tarball_to_dir(self.tarball, self.srcdir)
11 11
12 os.chdir(self.srcdir) 12 os.chdir(self.srcdir)
13 utils.system('patch -p1 < ../makefile.patch')
13 utils.make('bash-shared-mapping usemem') 14 utils.make('bash-shared-mapping usemem')
14 15
15 16
16 def initialize(self): 17 def initialize(self):
17 self.job.require_gcc() 18 self.job.require_gcc()
18 19
19 20
20 def execute(self, testdir = None, iterations = 10000): 21 def execute(self, testdir = None, iterations = 10000):
21 if not testdir: 22 if not testdir:
22 testdir = self.tmpdir 23 testdir = self.tmpdir
(...skipping 11 matching lines...) Expand all
34 for i in (0,1): 35 for i in (0,1):
35 pid[i] = os.spawnv(os.P_NOWAIT, usemem, args) 36 pid[i] = os.spawnv(os.P_NOWAIT, usemem, args)
36 37
37 cmd = "%s/bash-shared-mapping %s %d -t %d -n %d" % \ 38 cmd = "%s/bash-shared-mapping %s %d -t %d -n %d" % \
38 (self.srcdir, file, kilobytes, 39 (self.srcdir, file, kilobytes,
39 utils.count_cpus(), iterations) 40 utils.count_cpus(), iterations)
40 os.system(cmd) 41 os.system(cmd)
41 42
42 for i in (0, 1): 43 for i in (0, 1):
43 os.kill(pid[i], signal.SIGKILL) 44 os.kill(pid[i], signal.SIGKILL)
OLDNEW
« no previous file with comments | « client/common_lib/hosts/base_classes.py ('k') | client/tests/fsfuzzer/fsfuzzer.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698