xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Ian Jackson <ian.jackson@eu.citrix.com>
To: xen-devel@lists.xenproject.org
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>
Subject: [OSSTEST PATCH 05/11] ts-xen-build: Build livepatches test-cases
Date: Wed, 7 Jun 2017 18:48:56 +0100	[thread overview]
Message-ID: <1496857742-20191-6-git-send-email-ian.jackson@eu.citrix.com> (raw)
In-Reply-To: <1496857742-20191-1-git-send-email-ian.jackson@eu.citrix.com>

From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>

Livepatch compiles and works on x86/ARM{32|64} so we can enable it
in the Xen config when requested by the enable_livepatch runvar.

When we are trying to build with enable_livepatch, run `make
dist-tests' as well, to ship the test cases.  This depends on a
corresponding change to xen.git.

Finally, split the livepatch tests into their own stashed deliverable
from this job.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>

---
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.
v4: Call `make dist-tests' rather than calling directly deep
     into the xen.git build system.
    Split the output ourselves in `divide' (since make dist-tests
     puts things into dist/install/.)
    Expect the livepath output in DESTDIR/usr/lib/debug/xen-livepatch
     rather than directly in DESTDIR/usr/lib/debug.
    Minor style fix.
    Rewrote the commit message.
---
 ts-xen-build | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/ts-xen-build b/ts-xen-build
index 31acb9d..eaf44b1 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= <<END;
     export XEN_CONFIG_EXPERT=y
@@ -95,6 +96,12 @@ sub checkout () {
 	echo >>.config LIBLEAFDIR_x86_64=lib
 	echo >>.config KERNELS=''
 END
+               (${enable_livepatch} ? <<END : '').
+	if test -f xen/Kconfig; then
+		echo >>xen/.config CONFIG_LIVEPATCH=y
+		echo >>xen/.config CONFIG_FAST_SYMBOL_LOOKUP=y
+    fi
+END
                (nonempty($r{enable_xsm}) ? <<END : '').
 	if test -f xen/Kconfig; then
 		echo >>xen/.config CONFIG_XSM='${build_xsm}'
@@ -164,6 +171,12 @@ END
 END
 	store_runvar("flaskpolicy", "xenpolicy-" . $xen_version);
     }
+
+    if ($enable_livepatch) {
+        buildcmd_stamped_logged(600, 'xen', 'xenlpt', '',<<END,'')
+            $make_prefix make $makeflags dist-tests
+END
+    }
 }
 
 sub divide () {
@@ -193,6 +206,12 @@ sub divide () {
                 mv \$mvfiles xeninstall/boot/.
             fi
         fi
+        lp=usr/lib/debug/xen-livepatch
+        mkdir -p xenlpt/\$lp
+        if test -d install/\$lp; then
+            mvfiles=`find install/\$lp '(' -name 'xen-syms*' -o -name '*.map' -o -name '*.livepatch' ')' -print`
+            mv \$mvfiles xenlpt/\$lp/.
+        fi
 	if test -d install/usr/lib64/efi/; then
             if test -f install/usr/lib64/efi/xen.efi; then
                 mkdir -p xeninstall/usr/lib64/efi
@@ -209,6 +228,8 @@ sub stash () {
                     "xen/dist/${part}install",
                     "${part}dist");
     }
+    built_stash($ho, $builddir, "xen/dist/xenlpt", "xenlptdist")
+	if $enable_livepatch;
     built_stash_file($ho, $builddir, "xen-syms", "xen/xen/xen-syms", 1);
     built_stash_file($ho, $builddir, "xen-config", "xen/.config", 1);
     built_stash_file($ho, $builddir, "xen-hv-config", "xen/xen/.config", 1);
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  parent reply	other threads:[~2017-06-07 17:49 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-07 17:48 [OSSTEST PATCH v4 00/11] livepatch test support Ian Jackson
2017-06-07 17:48 ` [OSSTEST PATCH 01/11] TestSupport: target_cmd_root_status: New sub which returns return code Ian Jackson
2017-06-07 17:48 ` [OSSTEST PATCH 02/11] TestSupport: target_cmd_*: Add some doc comments Ian Jackson
2017-06-07 17:48 ` [OSSTEST PATCH 03/11] TestSupport: target_cmd_output_root_status: New sub Ian Jackson
2017-06-07 17:48 ` [OSSTEST PATCH 04/11] mfi-common: Add an enable_livepatch runvar to the Xen build jobs Ian Jackson
2017-06-07 17:48 ` Ian Jackson [this message]
2017-06-07 17:48 ` [OSSTEST PATCH 06/11] ts-livepatch: Initial test-cases Ian Jackson
2017-06-07 17:48 ` [OSSTEST PATCH 07/11] sg-run-job: Add the test-livepatch Ian Jackson
2017-06-07 17:48 ` [OSSTEST PATCH 08/11] make-flight: Add livepatch build/test target in the matrix Ian Jackson
2017-06-07 17:49 ` [OSSTEST PATCH 09/11] PDU/lab: Similar to xenuse Ian Jackson
2017-06-07 17:49 ` [OSSTEST PATCH 10/11] cs-adjust-flight: Rework runvar-build-set new value handling Ian Jackson
2017-06-07 17:49 ` [OSSTEST PATCH 11/11] sg-check-tested: Provide --flight option Ian Jackson
2017-06-07 18:54 ` [OSSTEST PATCH v4 00/11] livepatch test support Ian Jackson
2017-06-08  0:50 ` Konrad Rzeszutek Wilk
2017-06-09 11:01   ` Ian Jackson
2017-06-11  0:19     ` Konrad Rzeszutek Wilk
2017-06-09 14:35   ` Ian Jackson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1496857742-20191-6-git-send-email-ian.jackson@eu.citrix.com \
    --to=ian.jackson@eu.citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).