]> xenbits.xensource.com Git - people/royger/osstest.git/commitdiff
ts-xen-build: Build livepatches test-cases
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Mon, 21 Nov 2016 22:11:13 +0000 (17:11 -0500)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Mon, 12 Jun 2017 13:29:46 +0000 (14:29 +0100)
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>
Reviewed-by: Konrad Rzeszutek Wilk <konrad@kernel.org>
ts-xen-build

index 31acb9dd72a2a1783482f7618bb3cceb06e64672..097ac0a51348e74d6359b4e27e25b8825085ca23 100755 (executable)
@@ -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
@@ -94,6 +95,12 @@ sub checkout () {
        echo >>.config GIT_HTTP=y
        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
@@ -164,6 +171,14 @@ END
 END
        store_runvar("flaskpolicy", "xenpolicy-" . $xen_version);
     }
+
+    if ($enable_livepatch) {
+       substep_eval('/dist-test', sub {
+           buildcmd_stamped_logged(600, 'xen', 'xenlpt', '',<<END,'');
+            $make_prefix make $makeflags dist-tests
+END
+       });
+    }
 }
 
 sub divide () {
@@ -193,6 +208,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 +230,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);