forked from autotest/autotest-client-tests
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfsstress.py
28 lines (20 loc) · 906 Bytes
/
fsstress.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import os
from autotest.client import test, utils
class fsstress(test.test):
version = 1
def initialize(self):
self.job.require_gcc()
# http://www.zip.com.au/~akpm/linux/patches/stuff/ext3-tools.tar.gz
def setup(self, tarball='ext3-tools.tar.gz'):
self.tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir)
utils.extract_tarball_to_dir(self.tarball, self.srcdir)
os.chdir(self.srcdir)
utils.system('patch -p1 < %s/fsstress-ltp.patch' % self.bindir)
utils.system('patch -p1 < %s/makefile.patch' % self.bindir)
utils.make('fsstress')
def run_once(self, testdir=None, extra_args='', nproc='1000', nops='1000'):
if not testdir:
testdir = self.tmpdir
args = '-d %s -p %s -n %s %s' % (testdir, nproc, nops, extra_args)
cmd = self.srcdir + '/fsstress ' + args
utils.system(cmd)