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

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

Issue 3554003: Merge remote branch 'cros/upstream' into tempbranch3 (Closed) Base URL: http://git.chromium.org/git/autotest.git
Patch Set: Created 10 years, 2 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/tests/aio_dio_bugs/aio_dio_bugs.py ('k') | client/tests/bonnie/bonnie.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('make bash-shared-mapping usemem') 13 utils.make('bash-shared-mapping usemem')
14 14
15 15
16 def initialize(self): 16 def initialize(self):
17 self.job.require_gcc() 17 self.job.require_gcc()
18 18
19 19
20 def execute(self, testdir = None, iterations = 10000): 20 def execute(self, testdir = None, iterations = 10000):
21 if not testdir: 21 if not testdir:
22 testdir = self.tmpdir 22 testdir = self.tmpdir
23 os.chdir(testdir) 23 os.chdir(testdir)
(...skipping 10 matching lines...) Expand all
34 for i in (0,1): 34 for i in (0,1):
35 pid[i] = os.spawnv(os.P_NOWAIT, usemem, args) 35 pid[i] = os.spawnv(os.P_NOWAIT, usemem, args)
36 36
37 cmd = "%s/bash-shared-mapping %s %d -t %d -n %d" % \ 37 cmd = "%s/bash-shared-mapping %s %d -t %d -n %d" % \
38 (self.srcdir, file, kilobytes, 38 (self.srcdir, file, kilobytes,
39 utils.count_cpus(), iterations) 39 utils.count_cpus(), iterations)
40 os.system(cmd) 40 os.system(cmd)
41 41
42 for i in (0, 1): 42 for i in (0, 1):
43 os.kill(pid[i], signal.SIGKILL) 43 os.kill(pid[i], signal.SIGKILL)
OLDNEW
« no previous file with comments | « client/tests/aio_dio_bugs/aio_dio_bugs.py ('k') | client/tests/bonnie/bonnie.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698