From patchwork Thu May 27 09:32:03 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Cao, Chen" X-Patchwork-Id: 102587 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o4R9Wi2u022868 for ; Thu, 27 May 2010 09:32:44 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933894Ab0E0Jcc (ORCPT ); Thu, 27 May 2010 05:32:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:11050 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933709Ab0E0Jcb (ORCPT ); Thu, 27 May 2010 05:32:31 -0400 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o4R9WU30028918 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 27 May 2010 05:32:30 -0400 Received: from dhcp-91-198.nay.redhat.com (dhcp-91-198.nay.redhat.com [10.66.91.198]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o4R9WSUL018976; Thu, 27 May 2010 05:32:28 -0400 Subject: [Autotest PATCH] client test - perfmon: Patch the source code of perfmon to remove the -Werror switch To: lmr@redhat.com, autotest@test.kernel.org From: Chen Cao Cc: kvm@vger.kernel.org Date: Thu, 27 May 2010 17:32:03 +0800 Message-ID: <20100527093028.7588.38561.stgit@dhcp-91-198.nay.redhat.com> User-Agent: StGit/0.15-83-g972d5 MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.67 on 10.5.11.16 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Thu, 27 May 2010 09:32:44 +0000 (UTC) diff --git a/client/tests/perfmon/perfmon.py b/client/tests/perfmon/perfmon.py index ec1145f..39c6fb2 100644 --- a/client/tests/perfmon/perfmon.py +++ b/client/tests/perfmon/perfmon.py @@ -10,6 +10,14 @@ class perfmon(test.test): tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir) utils.extract_tarball_to_dir(tarball, self.srcdir) os.chdir(self.srcdir) + # Apply the patch to remove the -Werror switch, + # because there are warnings while compiling, + # if the compiler sticks to the rules, the source building + # will fail, although it seems that fedora and rhel ignore + # these warnings. + p1 = 'patch -p1 < ../remove-werror-switch.patch' + utils.system(p1) + utils.system('make') diff --git a/client/tests/perfmon/remove-werror-switch.patch b/client/tests/perfmon/remove-werror-switch.patch new file mode 100644 index 0000000..6a5062c --- /dev/null +++ b/client/tests/perfmon/remove-werror-switch.patch @@ -0,0 +1,55 @@ +diff --git a/Makefile b/Makefile +index 6ba6fba..884274d 100644 +--- a/Makefile ++++ b/Makefile +@@ -28,6 +28,7 @@ TOPDIR := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi) + include config.mk + + DIRS=tests ++PATCHNAME=remove-libpfm-werror.patch + + all: libpfm + @echo Compiling for \'$(ARCH)\' target +@@ -36,6 +37,7 @@ all: libpfm + libpfm: + @echo Compiling $(LIBPFM) + @tar zxf $(LIBPFM).tar.gz ++ @(cd $(LIBPFM) && patch -p1 < ../$(PATCHNAME) && cd ..) + @ln -sf $(LIBPFM) libpfm + @$(MAKE) -C $(LIBPFM) lib + clean: +diff --git a/config.mk b/config.mk +index a110111..7321f2d 100644 +--- a/config.mk ++++ b/config.mk +@@ -163,7 +163,7 @@ INSTALL=install + LN=ln -sf + PFMINCDIR=$(TOPDIR)/libpfm/include + PFMLIBDIR=$(TOPDIR)/libpfm/lib +-DBG?=-g -Wall -Werror ++DBG?=-g -Wall + # gcc/mips64 bug + ifeq ($(CONFIG_PFMLIB_ARCH_SICORTEX),y) + OPTIM?=-O +diff --git a/remove-libpfm-werror.patch b/remove-libpfm-werror.patch +new file mode 100644 +index 0000000..252aaa0 +--- /dev/null ++++ b/remove-libpfm-werror.patch +@@ -0,0 +1,13 @@ ++diff --git a/config.mk b/config.mk ++index 8c76f59..bbf1fc0 100644 ++--- a/config.mk +++++ b/config.mk ++@@ -164,7 +164,7 @@ INSTALL=install ++ LN=ln -sf ++ PFMINCDIR=$(TOPDIR)/include ++ PFMLIBDIR=$(TOPDIR)/lib ++-DBG?=-g -Wall -Werror +++DBG?=-g -Wall ++ # gcc/mips64 bug ++ ifeq ($(CONFIG_PFMLIB_ARCH_SICORTEX),y) ++ OPTIM?=-O +-- +1.7.0.4 +