From patchwork Thu May 18 00:07:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Rzeszutek Wilk X-Patchwork-Id: 9731823 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 70C7F601BC for ; Wed, 17 May 2017 19:59:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3745928793 for ; Wed, 17 May 2017 19:59:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2C035287D0; Wed, 17 May 2017 19:59:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=2.0 tests=BAYES_00, DATE_IN_FUTURE_03_06, DKIM_SIGNED, RCVD_IN_DNSWL_MED, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=no version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A954C28793 for ; Wed, 17 May 2017 19:59:38 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dB54d-0002gL-Vy; Wed, 17 May 2017 19:57:31 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dB54d-0002gF-AS for xen-devel@lists.xenproject.org; Wed, 17 May 2017 19:57:31 +0000 Received: from [85.158.143.35] by server-8.bemta-6.messagelabs.com id EE/8D-03696-A2BAC195; Wed, 17 May 2017 19:57:30 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmplleJIrShJLcpLzFFi42K5GHrjkK7mapl Ig+lbrS2+b5nM5MDocfjDFZYAxijWzLyk/IoE1ow3j56zF3QrVmxc0cTSwPhHsouRi0NIYAaj xK2mB+wgDovAMlaJ9xN6mUEcCYFDrBJnj78EcjiBnDiJL+2bGCHsComra86wg9hCAkoSWyY/Z oSwNzFJ7H0RCGILC+hJTP52GyzOIqAq8frfG7B6NgF9iadrr4HNFBHQlnixah0byDJmgR5GiY WbvwE5HEDNHhJ/TieC1PAKWEoc+fKRGeLUnYwS+2ZtY4NICEqcnPmEBcRmFtCSuPHvJRNIL7O AtMTyfxwgYU4BB4ntb4+wgtiiAioSVya8ZZ/AKDILSfcsJN2zELoXMDKvYtQoTi0qSy3SNbLQ SyrKTM8oyU3MzNE1NDDTy00tLk5MT81JTCrWS87P3cQIjAAGINjBeH5t4CFGSQ4mJVHe/Q+kI 4X4kvJTKjMSizPii0pzUosPMcpwcChJ8GqukokUEixKTU+tSMvMAcYiTFqCg0dJhDcUJM1bXJ CYW5yZDpE6xWjP8eLy+/dMHO+WfgCST1b+AJKHnv98zyTEkpeflyolzpsH0iYA0pZRmgc3FJY 6LjHKSgnzMgKdKcRTkFqUm1mCKv+KUZyDUUmYNx5kCk9mXgnc7ldAZzEBndUM8hFvcUkiQkqq gVFOwunnpab9m1YJsH/iq7/x66Guu3C9rpCMyAvlzY2scuub9p8vbN++dlqVYP/mEy9vVP08b KNeO82xVGSR9/e173bzNux8X9ou7SLOJvNhveJtJiUbXcMtrq6hTjJf32/9kpt263i+Z9Dm3P 7WrOsfPbfG1y9qvynqWrvX6tSnRb5CqXlBQUosxRmJhlrMRcWJAKmd4xYYAwAA X-Env-Sender: ketuzsezr@gmail.com X-Msg-Ref: server-5.tower-21.messagelabs.com!1495051049!61203357!1 X-Originating-IP: [209.85.216.194] X-SpamReason: No, hits=2.1 required=7.0 tests=DATE_IN_FUTURE_03_06 X-StarScan-Received: X-StarScan-Version: 9.4.12; banners=-,-,- X-VirusChecked: Checked Received: (qmail 42561 invoked from network); 17 May 2017 19:57:29 -0000 Received: from mail-qt0-f194.google.com (HELO mail-qt0-f194.google.com) (209.85.216.194) by server-5.tower-21.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 17 May 2017 19:57:29 -0000 Received: by mail-qt0-f194.google.com with SMTP id r58so3011579qtb.2 for ; Wed, 17 May 2017 12:57:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=r/BRwtvWWN5bftl+hExEhiIJ/PLe0p7k54E1ltGHyPc=; b=ld0qZPVjmGATBfpLhdjw3iC9JiMBnebIaLAUT2CCn/jafMFM/p8o6UK5yKhAvfZhXe lZxH34oBci9ILNaQfEHxiZQuoIne17jFq31nQeIAJuUp7Y96Ug//RUD8D3djoFDvJCUQ UwFgPI2JyOXbJuAxy2zJ4OW0f/c5pkMILW0dNKWQnk1kFqjvCXgHswK+xsg7/zKVjIMw baXvJnLXvjB+aTUPY2haWN27QYCzIQeNxdZGFMiHOdEImoYt5dVYuLMmn0r2VfKZWUrI pgHzEmy/5SoJqzK/YuL8088ury2d9xcNtby3mH8kz7uiKohNbZHbUpHtOExzpkfpoe3E t16Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=r/BRwtvWWN5bftl+hExEhiIJ/PLe0p7k54E1ltGHyPc=; b=tDPlkqB7ZM8t8lhBnY36N8QGE/Hk9uieUDTp2sDrf8O5YPFdgEt/RJ+zl5u5TNWi+l zFbkGuTvF0roLOORkTZFlc6BE1ELZ7CCJM6GKaDcahRR7OoZWZ+MZlIATjZ7MQ9FTiSR 0froQdgrVsnzdzk4UORP8aKdK2G6pNalcZXP4liYxljQhFzkhup//WM3taRaHwF0iljC vW33qb/QxI0EiU4HxMq5HVN4cvmT9sDkwN2jQCM0hUtw7+AIbnFU530QGqxMbT22KqdZ j0BEZrvnj1DxkI/ZK9vlNqO6IdEJSxyqFdQ40+93zVUB98N2um5p6yPFAInTxjTQBbLs H1lQ== X-Gm-Message-State: AODbwcApPR3DxfU/n+W9CbN9Fxoru6Pq3miKOfYRi31ls7YAkQV6ivFv gWqecsOLe60UHA== X-Received: by 10.200.8.169 with SMTP id v38mr558542qth.276.1495051048946; Wed, 17 May 2017 12:57:28 -0700 (PDT) Received: from osstest.dumpdata.com (209-6-200-48.c3-0.smr-ubr2.sbo-smr.ma.cable.rcn.com. [209.6.200.48]) by smtp.gmail.com with ESMTPSA id n31sm2028080qte.41.2017.05.17.12.57.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 May 2017 12:57:28 -0700 (PDT) Date: Wed, 17 May 2017 20:07:58 -0400 From: Konrad Rzeszutek Wilk To: Ian Jackson Message-ID: <20170518000757.GB18719@osstest.dumpdata.com> References: <1481611195-105372-1-git-send-email-konrad.wilk@oracle.com> <1481611195-105372-7-git-send-email-konrad.wilk@oracle.com> <22608.9877.805751.831868@mariner.uk.xensource.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <22608.9877.805751.831868@mariner.uk.xensource.com> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: xen-devel@lists.xenproject.org, Marcos.Matsunaga@oracle.com, ross.lagerwall@citrix.com Subject: Re: [Xen-devel] [PATCH v2 6/9] ts-xen-build: Build the livepatch test-cases X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP On Tue, Dec 13, 2016 at 04:49:25PM +0000, Ian Jackson wrote: > Konrad Rzeszutek Wilk writes ("[PATCH v2 6/9] ts-xen-build: Build the livepatch test-cases"): > > + buildcmd_stamped_logged(600, 'xen', 'xenlpt-build', '',< > + if test -d xen/test; then > > + $make_prefix make -C xen tests > > + fi > > Is $dokconfig really the right test for whether the livepatch build > should be attempted ? It seems like a rather arbitrary connection. The earlier patch (ts-xen-build: Enable livepatch.) enables the correct .config option to make this work. Without that you wouldn't be able to enable livepatching. And it looks like dokconfig gets changed to zero if --no-kconfig is supplied which I presume happens to older Xen versions. > > > + buildcmd_stamped_logged(600, 'xen', 'xenlpt-install', '',< > + if test -d xen/test; then > > + mkdir -p dist/xenlptinstall/usr/lib/debug > > + livepatch_files=`find xen/test/livepatch -name '*.livepatch' -print` > > + cp \$livepatch_files dist/xenlptinstall/usr/lib/debug > > + fi > > As I say, I don't much like this. There's a conversation ongoing > about it. [tries to recall it] It was about the make install stanza in the top root Makefile. And Jan was not too thrilled about 'make install' installing the test-cases. But I wonder, what if we had 'make -C xen/tests install' or such? That _may_ work? (Depending on whether the xen/tests Makefile can pick up the proper variables and such from the 'xen', this may require also an -f Rules.mk or such?) Something like this invocation: DESTDIR=`pwd`/dist/xenlptinstall/usr/lib/debug mkdir -p $DESTDIR BASEDIR=`pwd`/xen XEN_ROOT=`pwd` make -C xen/test -f `pwd`/xen/Rules.mk install And this diff to Xen: seems to work. > > > sub stash () { > > - foreach my $part ('', 'xen') { > > + foreach my $part ('', 'xen', 'xenlpt') { > > if (target_dir_exists($ho, "$builddir/xen/dist/${part}install")) { > > built_stash($ho, $builddir, > > I don't much like this approach. It might result in deferring certain > failures undesirably. > > Also, I don't know why it is necessary to look on the build box for > this information. ts-xen-build ought to know whether it has run `make > xenlpt-tests-install' (or whatever it is), so it ought to simply know > whether to do the build_stash. And when you say 'xenlpt-tests-install' you mean 'xenlpt-install' (see above). So .. the one thing I am having a hard time is that certain versions of Xen would not be able to build livepatches. So how I determine that? If I do 'make -C xen tests' on older versions it would return a failure. But I don't see how buildcmd_stamped_logged reports that? Oh wait, it gives 'echo ok' so I should just do something like: my $ok = buildcmd_stamped_logged(600, 'xen', 'xenlpt-build', '',< > You could instead do something like > > our %skip_stash_part; > ... > if (some condition) { > make xenlpt-install > } else { > $skip_stash_part{xenlpttest}= 1; > } > ... > next if $skip_stash_part{$part} Or have an $stash_livepatch=0 And set it to 1 if the built worked? > > or an ad-hoc variable, giving > > next if $part eq $xenlpttest && !$do_xenlpt; > > or something ? > > Thanks > Ian. diff --git a/xen/test/Makefile b/xen/test/Makefile index d91b319..f9d90da 100644 --- a/xen/test/Makefile +++ b/xen/test/Makefile @@ -5,3 +5,8 @@ tests: .PHONY: clean clean:: $(MAKE) -f $(BASEDIR)/Rules.mk -C livepatch clean + +.PHONY: install +install: + $(MAKE) -f $(BASEDIR)/Rules.mk -C livepatch install