Skip to content

Commit

Permalink
Fix broken lmbench test tarball
Browse files Browse the repository at this point in the history
Current lmbench module shipped in autotest has the lmbench
tarball modified from original source with a halfway applied
patch, that was causing build issues. Fixed this by picking
up the original tarball shipped for lmbench (recompressed
using bzip2) and applying the lmbench3.diff patch at test
runtime, as it is standard practice in autotest.

After this change is made, lmbench builds and works just fine.

Signed-off-by: Lucas Meneghel Rodrigues <[email protected]>
  • Loading branch information
lmr committed Mar 31, 2010
1 parent 751e4c1 commit ec0933b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions lmbench/lmbench.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,30 @@


class lmbench(test.test):
version = 3
version = 4

def initialize(self):
self.job.require_gcc()


def setup(self, tarball = 'lmbench3.tar.bz2', fsdir=None, file=None):
"""
Uncompresses the original lmbench tarball, applies a patch to fix
some build issues, configures lmbench and then modifies the config
files to use appropriate directory and file locations.
@param tarball: Lmbench tarball.
@param fsdir: Directory where file system tests will run
(defaults to standard test temp dir).
@param file: Path to the file lmbench will use for status output
(defaults to a random named file inside standard test temp dir).
@see: http://www.bitmover.com/lm/lmbench/lmbench3.tar.gz
(original tarball, shipped as is in autotest).
"""
tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir)
# http://www.bitmover.com/lm/lmbench/lmbench3.tar.gz
# + lmbench3.diff
# - removes Makefile references to bitkeeper
# - default mail to no, fix job placement defaults (masouds)
# - adds "config" Makefile targets to perform configuration only
# - changes scripts/getlist to consider result files that do
# not start with "[lmbench 3.x..." (still requires such a line
# somewhere in the first 1000 bytes of the file)
utils.extract_tarball_to_dir(tarball, self.srcdir)
os.chdir(self.srcdir)
utils.system('patch -p1 < ../lmbench3.diff')

# build lmbench
utils.system('make')
Expand Down
Binary file modified lmbench/lmbench3.tar.bz2
Binary file not shown.

0 comments on commit ec0933b

Please sign in to comment.