未验证 提交 b81690cb 编写于 作者: A Amador Pahim

Merge branch 'clebergnu-remove_trinity_v2'

Signed-off-by: NAmador Pahim <apahim@redhat.com>
...@@ -270,7 +270,6 @@ The output might look like this:: ...@@ -270,7 +270,6 @@ The output might look like this::
INSTRUMENTED /usr/share/avocado/tests/sleeptest.py INSTRUMENTED /usr/share/avocado/tests/sleeptest.py
INSTRUMENTED /usr/share/avocado/tests/synctest.py INSTRUMENTED /usr/share/avocado/tests/synctest.py
INSTRUMENTED /usr/share/avocado/tests/timeouttest.py INSTRUMENTED /usr/share/avocado/tests/timeouttest.py
INSTRUMENTED /usr/share/avocado/tests/trinity.py
INSTRUMENTED /usr/share/avocado/tests/warntest.py INSTRUMENTED /usr/share/avocado/tests/warntest.py
INSTRUMENTED /usr/share/avocado/tests/whiteboard.py INSTRUMENTED /usr/share/avocado/tests/whiteboard.py
... ...
......
#!/usr/bin/env python
import os
from avocado import Test
from avocado import main
from avocado.utils import archive
from avocado.utils import build
from avocado.utils import process
from avocado.utils import data_factory
class TrinityTest(Test):
"""
Trinity syscall fuzzer wrapper.
:see: http://codemonkey.org.uk/projects/trinity/
:src: http://codemonkey.org.uk/projects/trinity/trinity-1.5.tar.xz (repackaged)
:param tarball: Path to the trinity tarball relative to deps dir.
:param stress: Name of the syscall you want to stress.
:param victims_path: Path to victim files (must exist and have some bogus
files inside).
"""
def setUp(self):
"""
Build trinity.
"""
tarball = self.params.get('tarball', default='trinity-1.5.tar.bz2')
tarball_path = self.get_data(tarball)
if tarball_path is None:
self.cancel('Test is missing data file %s' % tarball_path)
archive.extract(tarball_path, self.srcdir)
srcdir = os.path.join(self.srcdir, 'trinity-1.5')
os.chdir(srcdir)
process.run('./configure.sh')
build.make(srcdir)
self.victims_path = data_factory.make_dir_and_populate(self.workdir)
def test(self):
"""
Execute the trinity syscall fuzzer with the appropriate params.
"""
cmd = './trinity -m -I'
process.run(cmd)
cmd = './trinity -m'
if self.params.get('stress'):
cmd += " " + self.params.get('stress')
if self.params.get('victims_path'):
cmd += " -V " + self.params.get('victims_path')
else:
cmd += " -V " + self.victims_path
process.run(cmd)
if __name__ == "__main__":
main()
...@@ -581,7 +581,6 @@ The output looks like:: ...@@ -581,7 +581,6 @@ The output looks like::
INSTRUMENTED /usr/share/avocado/tests/sleeptest.py INSTRUMENTED /usr/share/avocado/tests/sleeptest.py
INSTRUMENTED /usr/share/avocado/tests/synctest.py INSTRUMENTED /usr/share/avocado/tests/synctest.py
INSTRUMENTED /usr/share/avocado/tests/timeouttest.py INSTRUMENTED /usr/share/avocado/tests/timeouttest.py
INSTRUMENTED /usr/share/avocado/tests/trinity.py
INSTRUMENTED /usr/share/avocado/tests/warntest.py INSTRUMENTED /usr/share/avocado/tests/warntest.py
INSTRUMENTED /usr/share/avocado/tests/whiteboard.py INSTRUMENTED /usr/share/avocado/tests/whiteboard.py
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册