From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: [PATCH v2 6/9] ts-xen-build: Build the livepatch test-cases Date: Thu, 18 May 2017 02:49:28 -0400 Message-ID: <20170518064925.GA28013@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-Type: multipart/mixed; boundary="VS++wcV0S1rZb1Fb" Return-path: Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dBBLB-0004i5-E6 for xen-devel@lists.xenproject.org; Thu, 18 May 2017 02:39:01 +0000 Received: by mail-qk0-f182.google.com with SMTP id k74so25701440qke.1 for ; Wed, 17 May 2017 19:38:59 -0700 (PDT) Content-Disposition: inline In-Reply-To: <22608.9877.805751.831868@mariner.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: Ian Jackson Cc: xen-devel@lists.xenproject.org, Marcos.Matsunaga@oracle.com, ross.lagerwall@citrix.com List-Id: xen-devel@lists.xenproject.org --VS++wcV0S1rZb1Fb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline > or something ? I ended up doing two patches - one to create an enable_livepatch (in mfi-common) to seed the jobs. And then another to piggyback on that. I am attaching them here (as attachment), and I think it makes it simpler? --VS++wcV0S1rZb1Fb Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0003-mfi-common-Add-an-livepatch-test-and-also-add-job_cr.patch" >>From 1a303fe8acb3949eb556673744bc5bc89a842b54 Mon Sep 17 00:00:00 2001 From: Konrad Rzeszutek Wilk Date: Wed, 17 May 2017 20:54:07 -0400 Subject: [PATCH v3 3/7] mfi-common: Add an livepatch test and also add job_create_build var. The enable_livepatch=[true|false] is added to the jobs. It should only be enabled for certain Xen versions (4.9) and higher. Signed-off-by: Konrad Rzeszutek Wilk --- v3: New patch --- mfi-common | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/mfi-common b/mfi-common index ec31e2e..8cc9e5f 100644 --- a/mfi-common +++ b/mfi-common @@ -76,6 +76,24 @@ branch_wants_xtf_tests () { esac } +branch_wants_livepatch () { + echo $branch + case "$branch" in + osstest*) return 0;; + xen-3.*) return 0;; + xen-4.0*) return 0;; + xen-4.1*) return 0;; + xen-4.2*) return 0;; + xen-4.3*) return 0;; + xen-4.4*) return 0;; + xen-4.5*) return 0;; + xen-4.6*) return 0;; + xen-4.7*) return 0;; + livepatch*) return 0;; + *) return 1;; + esac +} + job_create_build () { job_create_build_filter_callback "$@" || return 0 @@ -104,6 +122,7 @@ create_build_jobs () { local want_xend build_defxend build_extraxend local enable_ovmf local build_hostflags + local enable_livepatch if [ "x$BUILD_LVEXTEND_MAX" != x ]; then BUILD_RUNVARS+=" build_lvextend_max=$BUILD_LVEXTEND_MAX " @@ -196,7 +215,10 @@ create_build_jobs () { want_prevxen=y fi fi - + enable_livepatch=false + if ! branch_wants_livepatch; then + enable_livepatch=true + fi eval " arch_runvars=\"\$ARCH_RUNVARS_$arch\" " @@ -211,7 +233,7 @@ create_build_jobs () { fi job_create_build build-$arch$xsm_suffix build \ arch=$arch enable_xend=$build_defxend enable_ovmf=$enable_ovmf\ - enable_xsm=$enable_xsm \ + enable_xsm=$enable_xsm enable_livepatch=$enable_livepatch \ tree_qemu=$TREE_QEMU \ tree_qemuu=$TREE_QEMU_UPSTREAM \ tree_xen=$TREE_XEN \ @@ -239,7 +261,7 @@ create_build_jobs () { # $REVISION_PREVXEN. job_create_build build-$arch-prev build \ arch=$arch enable_xend=false enable_ovmf=$enable_prevovmf\ - enable_xsm=false \ + enable_xsm=false enable_livepatch=$enable_livepatch \ tree_xen=$TREE_XEN \ $RUNVARS $BUILD_RUNVARS $BUILD_XEN_RUNVARS $arch_runvars \ $hostos_runvars \ -- 2.1.4 --VS++wcV0S1rZb1Fb Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0004-ts-xen-build-Build-livepatches-test-cases.patch" >>From e7d697d4812ea22171fc738435c640adb5df1363 Mon Sep 17 00:00:00 2001 From: Konrad Rzeszutek Wilk Date: Mon, 21 Nov 2016 17:11:13 -0500 Subject: [PATCH v3 4/7] ts-xen-build: Build livepatches test-cases Livepatch compiles and works on x86/ARM{32|64} so we can enable it. It only gets built and put in xentlpdist.tar.gz if enable_livepatch is set to true. Signed-off-by: Konrad Rzeszutek Wilk --- v1: New posting v2: Put the livepatch test-cases in xentlpdist.tar.gz file v3: Use enable_livepatch to gate the build and tarring the test-cases. --- ts-xen-build | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/ts-xen-build b/ts-xen-build index 31acb9d..92f467b 100755 --- a/ts-xen-build +++ b/ts-xen-build @@ -51,6 +51,7 @@ $dashdashdash //= -1; builddirsprops(); my $enable_xsm = ($r{enable_xsm}//'false') =~ m/true/ ? 1 : 0; +my $enable_livepatch = ($r{enable_livepatch}//'false') =~ m/true/ ? 1 : 0; $buildcmd_global_prefix= <>.config LIBLEAFDIR_x86_64=lib echo >>.config KERNELS='' END + (${enable_livepatch} ? <>xen/.config CONFIG_LIVEPATCH=y + echo >>xen/.config CONFIG_FAST_SYMBOL_LOOKUP=y + fi +END (nonempty($r{enable_xsm}) ? <>xen/.config CONFIG_XSM='${build_xsm}' @@ -164,6 +171,18 @@ END END store_runvar("flaskpolicy", "xenpolicy-" . $xen_version); } + + if ($enable_livepatch) { + buildcmd_stamped_logged(600, 'xen', 'xenlpt', <