From patchwork Mon Jul 13 06:08:41 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: sudhir kumar X-Patchwork-Id: 35323 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n6D68iUx029465 for ; Mon, 13 Jul 2009 06:08:44 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752940AbZGMGIn (ORCPT ); Mon, 13 Jul 2009 02:08:43 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752932AbZGMGIm (ORCPT ); Mon, 13 Jul 2009 02:08:42 -0400 Received: from mail-pz0-f197.google.com ([209.85.222.197]:48116 "EHLO mail-pz0-f197.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752227AbZGMGIm (ORCPT ); Mon, 13 Jul 2009 02:08:42 -0400 Received: by pzk35 with SMTP id 35so668739pzk.33 for ; Sun, 12 Jul 2009 23:08:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=4vuRTd2C0xEI9BjTiqKwrQBpRvpFDBy+yxDG161lvl4=; b=Eg+ljqdKGR+UM6fh4/rt1HxeWC5iHFi9+GHbltTUVxTONEdj17s4vAurT32QXbHdDF Q7G0M7IlCH/5lvSqXKG10CzTn3GvPuvqA/6WE5nsKvwIp9bZdUkdbPjmuKMt7pJeHRQS 0Tno3b0SpAHRye2RTlvlotSEWFiwdN2vaNkLI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=G2ycebEVdP6SuPuADj/d9LeUzyIZQFfg++Jn3ritORW12rZJJdUgoCHs+6wTngC8Jm vLSdq4OkbiDKsWp2oHnvNXASTND32D0JxPir2fZe+eXbaqSS042d5LAuhVLA3WPMVIwz 4M4sZ2tyHTbJjRP4iDZ6yb07TeTGdYfAZSK9w= MIME-Version: 1.0 Received: by 10.142.140.6 with SMTP id n6mr1234486wfd.69.1247465321763; Sun, 12 Jul 2009 23:08:41 -0700 (PDT) Date: Mon, 13 Jul 2009 11:38:41 +0530 Message-ID: Subject: [AUTOTEST] [PATCH 4/5] update ltp wrapper in autotest From: sudhir kumar To: Autotest mailing list Cc: kvm-devel , Lucas Meneghel Rodrigues , Martin Bligh , smalikphy@gmail.com Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org This patch updates the ltp wrapper in autotest to execute the latest ltp. At present autotest contains ltp which is more than 1 year old. There have been added lots of testcases in ltp within this period. So this patch updates the wrapper to run the June2009 release of ltp. http://prdownloads.sourceforge.net/ltp/ltp-full-20090630.tgz I have added an option which generates a fancy html results file. Also the run is left to be a default run as expected. This patch also adds the facility to apply kvm_ltp.patch which can customize the test execution under kvm guests. For autotest users, please untar the results file I am sending, run cd results/default; firefox results.html, click ltp_results.html This is a symlink to the ltp_results.html which is generated by ltp. Please provide your comments, concerns and issues. Signed-off-by: Sudhir Kumar cmd = os.path.join(self.srcdir, script) + ' ' + args Index: autotest/client/tests/ltp/ltp.py =================================================================== --- autotest.orig/client/tests/ltp/ltp.py +++ autotest/client/tests/ltp/ltp.py @@ -23,13 +23,17 @@ class ltp(test.test): self.job.require_gcc() - # http://prdownloads.sourceforge.net/ltp/ltp-full-20080229.tgz - def setup(self, tarball = 'ltp-full-20080229.tar.bz2'): + # http://prdownloads.sourceforge.net/ltp/ltp-full-20090630.tgz + def setup(self, tarball = 'ltp-full-20090630.tgz', guest=None): tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir) utils.extract_tarball_to_dir(tarball, self.srcdir) os.chdir(self.srcdir) - utils.system('patch -p1 < ../ltp.patch') + try: + utils.system('patch -p1 < ../ltp.patch') + print "Patch ltp.patch applied successfully" + except : + print "Patch ltp.patch failed to apply" # comment the capability tests if we fail to load the capability module try: @@ -37,6 +41,14 @@ class ltp(test.test): except error.CmdError, detail: utils.system('patch -p1 < ../ltp_capability.patch') + # if we are running under kvm guests apply kvm_ltp.patch + if guest == "kvm" : + try: + utils.system('patch -p1 < ../kvm_ltp.patch') + print "Patch kvm_ltp.patch applied successfully" + except : + print "Patch kvm_ltp.patch failed to apply" + utils.system('cp ../scan.c pan/') # saves having lex installed utils.system('make -j %d' % utils.count_cpus()) utils.system('yes n | make install') @@ -52,8 +64,9 @@ class ltp(test.test): # In case the user wants to run another test script if script == 'runltp': logfile = os.path.join(self.resultsdir, 'ltp.log') + htmlfile = os.path.join(self.resultsdir, 'ltp_results.html') failcmdfile = os.path.join(self.debugdir, 'failcmdfile') - args2 = '-q -l %s -C %s -d %s' % (logfile, failcmdfile, self.tmpdir) + args2 = '-l %s -g %s -C %s -d %s' % (logfile, htmlfile, failcmdfile, self.tmpdir) args = args + ' ' + args2