OLD | NEW |
1 import os | 1 import os |
2 from autotest_lib.client.bin import test, utils | 2 from autotest_lib.client.bin import test, utils |
3 | 3 |
4 | 4 |
5 class fsstress(test.test): | 5 class fsstress(test.test): |
6 version = 1 | 6 version = 1 |
7 | 7 |
8 def initialize(self): | 8 def initialize(self): |
9 self.job.require_gcc() | 9 self.job.require_gcc() |
10 | 10 |
11 | 11 |
12 # http://www.zip.com.au/~akpm/linux/patches/stuff/ext3-tools.tar.gz | 12 # http://www.zip.com.au/~akpm/linux/patches/stuff/ext3-tools.tar.gz |
13 def setup(self, tarball = 'ext3-tools.tar.gz'): | 13 def setup(self, tarball = 'ext3-tools.tar.gz'): |
14 self.tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir) | 14 self.tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir) |
15 utils.extract_tarball_to_dir(self.tarball, self.srcdir) | 15 utils.extract_tarball_to_dir(self.tarball, self.srcdir) |
16 | 16 |
17 os.chdir(self.srcdir) | 17 os.chdir(self.srcdir) |
18 utils.system('patch -p1 < ../fsstress-ltp.patch') | 18 utils.system('patch -p1 < ../fsstress-ltp.patch') |
19 utils.make('fsstress') | 19 utils.system('make fsstress') |
20 | 20 |
21 | 21 |
22 def run_once(self, testdir = None, extra_args = '', nproc = '1000', nops = '
1000'): | 22 def run_once(self, testdir = None, extra_args = '', nproc = '1000', nops = '
1000'): |
23 if not testdir: | 23 if not testdir: |
24 testdir = self.tmpdir | 24 testdir = self.tmpdir |
25 | 25 |
26 args = '-d %s -p %s -n %s %s' % (testdir, nproc, nops, extra_args) | 26 args = '-d %s -p %s -n %s %s' % (testdir, nproc, nops, extra_args) |
27 cmd = self.srcdir + '/fsstress ' + args | 27 cmd = self.srcdir + '/fsstress ' + args |
28 utils.system(cmd) | 28 utils.system(cmd) |
OLD | NEW |