All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] OSSTEST: introduce a raisin build test
@ 2015-05-06 14:43 Stefano Stabellini
  2015-05-06 15:15 ` Ian Campbell
  0 siblings, 1 reply; 6+ messages in thread
From: Stefano Stabellini @ 2015-05-06 14:43 UTC (permalink / raw)
  To: xen-devel; +Cc: wei.liu2, ian.jackson, ian.campbell, stefano.stabellini

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>

---
Changes in v2:
- set revision_* variables in mfi-common;
- in ts-raisin-build set the *_REVISION config options based on the
  revision_* variables;
- in ts-raisin-build, call store_revision appropriately;
- divide the output in an hypervisor and a tools tarball.
---
 ap-common       |    5 ++
 mfi-common      |   25 +++++++++
 sg-run-job      |    5 ++
 ts-raisin-build |  161 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 196 insertions(+)
 create mode 100755 ts-raisin-build

diff --git a/ap-common b/ap-common
index 64749e3..985eeec 100644
--- a/ap-common
+++ b/ap-common
@@ -47,13 +47,18 @@
 # rumpsrc-related runvars needed only for old rumpuser-xen
 # (ie ones which need $bodges=1 in ts-rumpuserxen-build)
 
+: ${TREE_RAISIN:=git://xenbits.xen.org/people/sstabellini/raisin.git}
+: ${DEFAULT_REVISION_RAISIN:=master}
+
 : ${TREE_SEABIOS_UPSTREAM:=git://git.seabios.org/seabios.git}
 : ${PUSH_TREE_SEABIOS:=$XENBITS:/home/xen/git/osstest/seabios.git}
 : ${BASE_TREE_SEABIOS:=git://xenbits.xen.org/osstest/seabios.git}
+: ${TREE_SEABIOS:=$TREE_SEABIOS_UPSTREAM}
 
 : ${TREE_OVMF_UPSTREAM:=https://github.com/tianocore/edk2.git}
 : ${PUSH_TREE_OVMF:=$XENBITS:/home/xen/git/osstest/ovmf.git}
 : ${BASE_TREE_OVMF:=git://xenbits.xen.org/osstest/ovmf.git}
+: ${TREE_OVMF:=$TREE_OVMF_UPSTREAM}
 
 : ${TREE_LINUXFIRMWARE:=git://xenbits.xen.org/osstest/linux-firmware.git}
 : ${PUSH_TREE_LINUXFIRMWARE:=$XENBITS:/home/osstest/ext/linux-firmware.git}
diff --git a/mfi-common b/mfi-common
index 16fc8c5..57bbf1c 100644
--- a/mfi-common
+++ b/mfi-common
@@ -215,6 +215,31 @@ create_build_jobs () {
 
     fi
 
+    if [ "x$REVISION_RAISIN" != xdisable ]; then
+
+    ./cs-job-create $flight build-$arch-raisin build-raisin                  \
+                arch=$arch                                                   \
+        tree_xen=$TREE_XEN                                                   \
+                $RUNVARS $BUILD_RUNVARS $BUILD_RAISIN_RUNVARS $arch_runvars \
+                $suite_runvars                                               \
+                host_hostflags=$build_hostflags                              \
+                buildjob=${bfi}build-$arch                                   \
+                tree_raisin=$TREE_RAISIN                                     \
+                tree_qemuu=$TREE_QEMU_UPSTREAM                               \
+                tree_qemu=$TREE_QEMU                                         \
+                tree_seabios=$TREE_SEABIOS                                   \
+                tree_libvirt=$TREE_LIBVIRT                                   \
+                tree_ovmf=$TREE_OVMF                                         \
+                revision_xen=${REVISION_XEN:-master}                         \
+                revision_qemu=${REVISION_QEMU:-master}                       \
+                revision_qemuu=${REVISION_QEMU_UPSTREAM:-master}             \
+                revision_seabios=${REVISION_SEABIOS:-master}                 \
+                revision_ovmf=${REVISION_OVMF:-master}                       \
+                revision_libvirt=${REVISION_LIBVIRT:-master}                 \
+                revision_raisin=${REVISION_RAISIN:-${DEFAULT_REVISION_RAISIN}}\
+
+    fi
+
     if branch_wants_rumpkernel_tests; then
 
     case $arch in
diff --git a/sg-run-job b/sg-run-job
index eae159d..449118d 100755
--- a/sg-run-job
+++ b/sg-run-job
@@ -346,6 +346,7 @@ proc need-hosts/build {} { return BUILD }
 proc need-hosts/build-kern {} { return BUILD }
 proc need-hosts/build-libvirt {} { return BUILD }
 proc need-hosts/build-rumpuserxen {} { return BUILD }
+proc need-hosts/build-raisin {} { return BUILD }
 
 proc run-job/build {} {
     run-ts . = ts-xen-build
@@ -364,6 +365,10 @@ proc run-job/build-rumpuserxen {} {
     run-ts . = ts-xen-build + host tools
 }
 
+proc run-job/build-raisin {} {
+    run-ts . = ts-raisin-build
+}
+
 proc prepare-build-host {} {
     global jobinfo
     run-ts broken = ts-hosts-allocate + host
diff --git a/ts-raisin-build b/ts-raisin-build
new file mode 100755
index 0000000..bf393c5
--- /dev/null
+++ b/ts-raisin-build
@@ -0,0 +1,161 @@
+#!/usr/bin/perl -w
+# This is part of "osstest", an automated testing framework for Xen.
+# Copyright (C) 2009-2013 Citrix Inc.
+# 
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Affero General Public License for more details.
+# 
+# You should have received a copy of the GNU Affero General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+use strict qw(vars);
+use DBI;
+use Osstest;
+use File::Path;
+use POSIX;
+use Osstest::TestSupport;
+use Osstest::BuildSupport;
+
+tsreadconfig();
+selectbuildhost(\@ARGV);
+# remaining arguments are passed as targets to "make"
+builddirsprops();
+
+sub checkout () {
+    prepbuilddirs();
+    build_clone($ho, 'raisin', $builddir, 'raisin');
+
+    target_cmd_build($ho, 100, $builddir, <<END);
+        cd $builddir/raisin
+	>config
+
+    echo >>config ENABLED_COMPONENTS=\\"seabios ovmf xen qemu qemu_traditional libvirt\\"
+    echo >>config MAKE=\\"make $makeflags\\"
+    echo >>config PREFIX=\\"/usr\\"
+    echo >>config DESTDIR=dist
+
+    echo >>config XEN_URL=\\"$r{tree_xen}\\"
+    echo >>config QEMU_URL=\\"$r{tree_qemuu}\\"
+    echo >>config QEMU_TRADITIONAL_URL=\\"$r{tree_qemu}\\"
+    echo >>config SEABIOS_URL=\\"$r{tree_seabios}\\"
+    echo >>config LIBVIRT_URL=\\"$r{tree_libvirt}\\"
+    echo >>config OVMF_URL=\\"$r{tree_ovmf}\\"
+
+    echo >>config XEN_REVISION=\\"$r{revision_xen}\\"
+    echo >>config QEMU_REVISION=\\"$r{revision_qemuu}\\"
+    echo >>config QEMU_TRADITIONAL_REVISION=\\"$r{revision_qemu}\\"
+    echo >>config SEABIOS_REVISION=\\"$r{revision_seabios}\\"
+    echo >>config LIBVIRT_REVISION=\\"$r{revision_libvirt}\\"
+    echo >>config OVMF_REVISION=\\"$r{revision_ovmf}\\"
+END
+#/;
+}
+
+sub build () {
+    target_cmd_root($ho, <<END);
+	    cd $builddir/raisin
+        ./raise -y install-builddep
+END
+#/;
+    target_cmd_build($ho, 9000, $builddir, <<END);
+	    cd $builddir/raisin
+        ./raise -n build
+END
+#/;
+}
+
+sub checkoutput () {
+    target_cmd_build($ho, 100, $builddir, <<END);
+            cd $builddir/raisin/dist
+            ls boot/xen.gz
+            ls usr/sbin/xenstored
+            ls usr/sbin/xenconsoled
+            ls usr/lib/libxenlight.so
+            ls usr/sbin/xl
+            ls usr/lib/xen/boot/hvmloader
+            ls usr/lib/xen/bin/qemu-dm
+            ls usr/lib/xen/bin/qemu-system-i386
+            ls usr/sbin/libvirtd
+END
+#/;
+}
+
+sub collectversions () {
+    my $raisindir="$builddir/raisin";
+    store_revision($ho, 'xen', "$raisindir/xen-dir", 1);
+    store_revision($ho, 'qemu', "$raisindir/qemu-traditional-dir", 1);
+    store_revision($ho, 'qemuu', "$raisindir/qemu-dir", 1);
+    store_revision($ho, 'seabios', "$raisindir/seabios-dir", 1);
+    store_revision($ho, 'ovmf', "$raisindir/ovmf-dir", 1);
+    store_revision($ho, 'libvirt', "$raisindir/libvirt-dir", 1);
+}
+
+sub divide () {
+    # Only move hv to xeninstall, so that we can have
+    # xenpolicy in tools tarball.
+    #
+    # The files inside boot/ after `make dist' are
+    # xen-$XEN_VERSION: Xen binary
+    # xen.gz/xen: symlink to xen-$XEN_VERSION
+    # xen-$MAJOR: symlink to xen-$XEN_VERSION
+    # xen-$MAJOR.$MINOR: symlink to xen-$XEN_VERSION
+    # xen-sym-$XEN_VERSION: Xen symbol
+    # xenpolicy-$XEN_VERSION: flask policy binary if xsm is enabled
+    #
+    # So the following snippet will leave xenpolicy* in
+    # install/boot and get packaged to tools tarball.
+    target_cmd_build($ho, 100, $builddir, <<END);
+        cd raisin
+        mkdir xendist
+        for f in *dist; do
+            mkdir -p \$f/lib
+        done
+        if test -d dist/boot; then
+            if test -f dist/boot/xen.gz || test -f dist/boot/xen; then
+                mkdir xendist/boot
+                mvfiles=`find dist/boot -name 'xen[a-z]*' -prune -o -name 'xen*' -print`
+                mv \$mvfiles xendist/boot/.
+            fi
+        fi
+END
+}
+
+sub stash () {
+    foreach my $part ('', 'xen') {
+        built_stash($ho, $builddir,
+                    "raisin/${part}dist",
+                    "${part}dist");
+    }
+    built_stash_file($ho, $builddir, "xen-syms", "raisin/xen-dir/xen/xen-syms", 1);
+    built_stash_file($ho, $builddir, "raisin-config", "raisin/config", 1);
+    built_stash_file($ho, $builddir, "seabios-config",
+             "raisin/seabios-dir/.config", 1);
+    built_compress_stashed("xen-syms");
+}
+
+
+our @probs;
+
+sub trapping ($) {
+    my ($sub) = @_;
+    my $tok= eval { $sub->(); 1; };
+    if (!$tok) { push @probs, $@; print STDERR "failure (trapped): $@\n"; }
+}
+
+checkout();
+trapping(\&build);
+trapping(\&checkoutput);
+trapping(\&collectversions);
+divide();
+stash();
+
+die "*** something failed:\n\n".(join "\n\n",@probs)."\n** something failed"
+    if @probs;
+
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] OSSTEST: introduce a raisin build test
  2015-05-06 14:43 [PATCH v2] OSSTEST: introduce a raisin build test Stefano Stabellini
@ 2015-05-06 15:15 ` Ian Campbell
  2015-05-06 16:02   ` Stefano Stabellini
  0 siblings, 1 reply; 6+ messages in thread
From: Ian Campbell @ 2015-05-06 15:15 UTC (permalink / raw)
  To: Stefano Stabellini; +Cc: wei.liu2, ian.jackson, xen-devel

On Wed, 2015-05-06 at 15:43 +0100, Stefano Stabellini wrote:
[...]
> +    echo >>config ENABLED_COMPONENTS=\\"seabios ovmf xen qemu qemu_traditional libvirt\\"
[...]
> +    echo >>config XEN_URL=\\"$r{tree_xen}\\"
> +    echo >>config QEMU_URL=\\"$r{tree_qemuu}\\"
> +    echo >>config QEMU_TRADITIONAL_URL=\\"$r{tree_qemu}\\"
> +    echo >>config SEABIOS_URL=\\"$r{tree_seabios}\\"
> +    echo >>config LIBVIRT_URL=\\"$r{tree_libvirt}\\"
> +    echo >>config OVMF_URL=\\"$r{tree_ovmf}\\"

What will raisin do if one or more of these runvars is not set for some
reason yet the thing is listed in ENABLED_COMPONENTS?

> +    store_revision($ho, 'xen', "$raisindir/xen-dir", 1);
> +    store_revision($ho, 'qemu', "$raisindir/qemu-traditional-dir", 1);
> +    store_revision($ho, 'qemuu', "$raisindir/qemu-dir", 1);
> +    store_revision($ho, 'seabios', "$raisindir/seabios-dir", 1);
> +    store_revision($ho, 'ovmf', "$raisindir/ovmf-dir", 1);
> +    store_revision($ho, 'libvirt', "$raisindir/libvirt-dir", 1);

Is $component-dir considered a stable path in raisin (i.e. will you
promise not to change it).

> +}
> +
> +sub divide () {
> +    # Only move hv to xeninstall, so that we can have
> +    # xenpolicy in tools tarball.
> +    #
> +    # The files inside boot/ after `make dist' are
> +    # xen-$XEN_VERSION: Xen binary
> +    # xen.gz/xen: symlink to xen-$XEN_VERSION
> +    # xen-$MAJOR: symlink to xen-$XEN_VERSION
> +    # xen-$MAJOR.$MINOR: symlink to xen-$XEN_VERSION
> +    # xen-sym-$XEN_VERSION: Xen symbol
> +    # xenpolicy-$XEN_VERSION: flask policy binary if xsm is enabled
> +    #
> +    # So the following snippet will leave xenpolicy* in
> +    # install/boot and get packaged to tools tarball.
> +    target_cmd_build($ho, 100, $builddir, <<END);
> +        cd raisin

$raisindir? (here and in various places further down)

Ian.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] OSSTEST: introduce a raisin build test
  2015-05-06 15:15 ` Ian Campbell
@ 2015-05-06 16:02   ` Stefano Stabellini
  2015-05-07  9:13     ` Ian Campbell
  0 siblings, 1 reply; 6+ messages in thread
From: Stefano Stabellini @ 2015-05-06 16:02 UTC (permalink / raw)
  To: Ian Campbell; +Cc: wei.liu2, xen-devel, ian.jackson, Stefano Stabellini

On Wed, 6 May 2015, Ian Campbell wrote:
> On Wed, 2015-05-06 at 15:43 +0100, Stefano Stabellini wrote:
> [...]
> > +    echo >>config ENABLED_COMPONENTS=\\"seabios ovmf xen qemu qemu_traditional libvirt\\"
> [...]
> > +    echo >>config XEN_URL=\\"$r{tree_xen}\\"
> > +    echo >>config QEMU_URL=\\"$r{tree_qemuu}\\"
> > +    echo >>config QEMU_TRADITIONAL_URL=\\"$r{tree_qemu}\\"
> > +    echo >>config SEABIOS_URL=\\"$r{tree_seabios}\\"
> > +    echo >>config LIBVIRT_URL=\\"$r{tree_libvirt}\\"
> > +    echo >>config OVMF_URL=\\"$r{tree_ovmf}\\"
> 
> What will raisin do if one or more of these runvars is not set for some
> reason yet the thing is listed in ENABLED_COMPONENTS?

It will fail with an error and quit


> > +    store_revision($ho, 'xen', "$raisindir/xen-dir", 1);
> > +    store_revision($ho, 'qemu', "$raisindir/qemu-traditional-dir", 1);
> > +    store_revision($ho, 'qemuu', "$raisindir/qemu-dir", 1);
> > +    store_revision($ho, 'seabios', "$raisindir/seabios-dir", 1);
> > +    store_revision($ho, 'ovmf', "$raisindir/ovmf-dir", 1);
> > +    store_revision($ho, 'libvirt', "$raisindir/libvirt-dir", 1);
> 
> Is $component-dir considered a stable path in raisin (i.e. will you
> promise not to change it).

This is a good point. If it is not stable now, it will have to be stable
by the time this patch is accepted :-)


> > +}
> > +
> > +sub divide () {
> > +    # Only move hv to xeninstall, so that we can have
> > +    # xenpolicy in tools tarball.
> > +    #
> > +    # The files inside boot/ after `make dist' are
> > +    # xen-$XEN_VERSION: Xen binary
> > +    # xen.gz/xen: symlink to xen-$XEN_VERSION
> > +    # xen-$MAJOR: symlink to xen-$XEN_VERSION
> > +    # xen-$MAJOR.$MINOR: symlink to xen-$XEN_VERSION
> > +    # xen-sym-$XEN_VERSION: Xen symbol
> > +    # xenpolicy-$XEN_VERSION: flask policy binary if xsm is enabled
> > +    #
> > +    # So the following snippet will leave xenpolicy* in
> > +    # install/boot and get packaged to tools tarball.
> > +    target_cmd_build($ho, 100, $builddir, <<END);
> > +        cd raisin
> 
> $raisindir? (here and in various places further down)

OK

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] OSSTEST: introduce a raisin build test
  2015-05-06 16:02   ` Stefano Stabellini
@ 2015-05-07  9:13     ` Ian Campbell
  2015-05-07  9:31       ` Stefano Stabellini
  0 siblings, 1 reply; 6+ messages in thread
From: Ian Campbell @ 2015-05-07  9:13 UTC (permalink / raw)
  To: Stefano Stabellini; +Cc: wei.liu2, ian.jackson, xen-devel

On Wed, 2015-05-06 at 17:02 +0100, Stefano Stabellini wrote:
> On Wed, 6 May 2015, Ian Campbell wrote:
> > On Wed, 2015-05-06 at 15:43 +0100, Stefano Stabellini wrote:
> > [...]
> > > +    echo >>config ENABLED_COMPONENTS=\\"seabios ovmf xen qemu qemu_traditional libvirt\\"
> > [...]
> > > +    echo >>config XEN_URL=\\"$r{tree_xen}\\"
> > > +    echo >>config QEMU_URL=\\"$r{tree_qemuu}\\"
> > > +    echo >>config QEMU_TRADITIONAL_URL=\\"$r{tree_qemu}\\"
> > > +    echo >>config SEABIOS_URL=\\"$r{tree_seabios}\\"
> > > +    echo >>config LIBVIRT_URL=\\"$r{tree_libvirt}\\"
> > > +    echo >>config OVMF_URL=\\"$r{tree_ovmf}\\"
> > 
> > What will raisin do if one or more of these runvars is not set for some
> > reason yet the thing is listed in ENABLED_COMPONENTS?
> 
> It will fail with an error and quit

Imagine a future version of this test script which has been extended to
support some new component, something which we cannot (or don't way to)
test with an older version of Xen (perhaps it doesn't build, or relies
on some newer Xen version somehow).

In that case we would want osstest to instruct raisin to not build that
component, which we would likely do by omitting the component from the
runvars I think.

So ENABLED_COMPONENTS needs to be generated too, not just hardcoded. I
suppose we could do it in an ad-hoc way every time we add a new
component to this base set, but that seems like it would get even uglier
than just doing it now.

The converse is also worth consideration -- what if osstest asks raisin
to build something it doesn't know about (imagine e.g. a bisection over
a raisin change to add a component).

> > > +    store_revision($ho, 'xen', "$raisindir/xen-dir", 1);
> > > +    store_revision($ho, 'qemu', "$raisindir/qemu-traditional-dir", 1);
> > > +    store_revision($ho, 'qemuu', "$raisindir/qemu-dir", 1);
> > > +    store_revision($ho, 'seabios', "$raisindir/seabios-dir", 1);
> > > +    store_revision($ho, 'ovmf', "$raisindir/ovmf-dir", 1);
> > > +    store_revision($ho, 'libvirt', "$raisindir/libvirt-dir", 1);
> > 
> > Is $component-dir considered a stable path in raisin (i.e. will you
> > promise not to change it).
> 
> This is a good point. If it is not stable now, it will have to be stable
> by the time this patch is accepted :-)

Right, I just wanted to give you the chance to change it now before we
rely on it ;-)

Ian.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] OSSTEST: introduce a raisin build test
  2015-05-07  9:13     ` Ian Campbell
@ 2015-05-07  9:31       ` Stefano Stabellini
  2015-05-07  9:40         ` Ian Campbell
  0 siblings, 1 reply; 6+ messages in thread
From: Stefano Stabellini @ 2015-05-07  9:31 UTC (permalink / raw)
  To: Ian Campbell; +Cc: wei.liu2, xen-devel, ian.jackson, Stefano Stabellini

On Thu, 7 May 2015, Ian Campbell wrote:
> On Wed, 2015-05-06 at 17:02 +0100, Stefano Stabellini wrote:
> > On Wed, 6 May 2015, Ian Campbell wrote:
> > > On Wed, 2015-05-06 at 15:43 +0100, Stefano Stabellini wrote:
> > > [...]
> > > > +    echo >>config ENABLED_COMPONENTS=\\"seabios ovmf xen qemu qemu_traditional libvirt\\"
> > > [...]
> > > > +    echo >>config XEN_URL=\\"$r{tree_xen}\\"
> > > > +    echo >>config QEMU_URL=\\"$r{tree_qemuu}\\"
> > > > +    echo >>config QEMU_TRADITIONAL_URL=\\"$r{tree_qemu}\\"
> > > > +    echo >>config SEABIOS_URL=\\"$r{tree_seabios}\\"
> > > > +    echo >>config LIBVIRT_URL=\\"$r{tree_libvirt}\\"
> > > > +    echo >>config OVMF_URL=\\"$r{tree_ovmf}\\"
> > > 
> > > What will raisin do if one or more of these runvars is not set for some
> > > reason yet the thing is listed in ENABLED_COMPONENTS?
> > 
> > It will fail with an error and quit
> 
> Imagine a future version of this test script which has been extended to
> support some new component, something which we cannot (or don't way to)
> test with an older version of Xen (perhaps it doesn't build, or relies
> on some newer Xen version somehow).
> 
> In that case we would want osstest to instruct raisin to not build that
> component, which we would likely do by omitting the component from the
> runvars I think.
> 
> So ENABLED_COMPONENTS needs to be generated too, not just hardcoded. I
> suppose we could do it in an ad-hoc way every time we add a new
> component to this base set, but that seems like it would get even uglier
> than just doing it now.

I think you have a point there. we could get rid of ENABLED_COMPONENTS
from the raisin config file and rely on the revision_ variables: raisin
will not try to build something with a blank revision, when
ENABLED_COMPONENTS is not missing.


> The converse is also worth consideration -- what if osstest asks raisin
> to build something it doesn't know about (imagine e.g. a bisection over
> a raisin change to add a component).

That should return an error from raisin. Osstest ought to know that it
cannot ask raisin to build something is not capable of.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] OSSTEST: introduce a raisin build test
  2015-05-07  9:31       ` Stefano Stabellini
@ 2015-05-07  9:40         ` Ian Campbell
  0 siblings, 0 replies; 6+ messages in thread
From: Ian Campbell @ 2015-05-07  9:40 UTC (permalink / raw)
  To: Stefano Stabellini; +Cc: wei.liu2, ian.jackson, xen-devel

On Thu, 2015-05-07 at 10:31 +0100, Stefano Stabellini wrote:
> On Thu, 7 May 2015, Ian Campbell wrote:
> > On Wed, 2015-05-06 at 17:02 +0100, Stefano Stabellini wrote:
> > > On Wed, 6 May 2015, Ian Campbell wrote:
> > > > On Wed, 2015-05-06 at 15:43 +0100, Stefano Stabellini wrote:
> > > > [...]
> > > > > +    echo >>config ENABLED_COMPONENTS=\\"seabios ovmf xen qemu qemu_traditional libvirt\\"
> > > > [...]
> > > > > +    echo >>config XEN_URL=\\"$r{tree_xen}\\"
> > > > > +    echo >>config QEMU_URL=\\"$r{tree_qemuu}\\"
> > > > > +    echo >>config QEMU_TRADITIONAL_URL=\\"$r{tree_qemu}\\"
> > > > > +    echo >>config SEABIOS_URL=\\"$r{tree_seabios}\\"
> > > > > +    echo >>config LIBVIRT_URL=\\"$r{tree_libvirt}\\"
> > > > > +    echo >>config OVMF_URL=\\"$r{tree_ovmf}\\"
> > > > 
> > > > What will raisin do if one or more of these runvars is not set for some
> > > > reason yet the thing is listed in ENABLED_COMPONENTS?
> > > 
> > > It will fail with an error and quit
> > 
> > Imagine a future version of this test script which has been extended to
> > support some new component, something which we cannot (or don't way to)
> > test with an older version of Xen (perhaps it doesn't build, or relies
> > on some newer Xen version somehow).
> > 
> > In that case we would want osstest to instruct raisin to not build that
> > component, which we would likely do by omitting the component from the
> > runvars I think.
> > 
> > So ENABLED_COMPONENTS needs to be generated too, not just hardcoded. I
> > suppose we could do it in an ad-hoc way every time we add a new
> > component to this base set, but that seems like it would get even uglier
> > than just doing it now.
> 
> I think you have a point there. we could get rid of ENABLED_COMPONENTS
> from the raisin config file and rely on the revision_ variables: raisin
> will not try to build something with a blank revision, when
> ENABLED_COMPONENTS is not missing.

That would work too, yes.

> > The converse is also worth consideration -- what if osstest asks raisin
> > to build something it doesn't know about (imagine e.g. a bisection over
> > a raisin change to add a component).
> 
> That should return an error from raisin. Osstest ought to know that it
> cannot ask raisin to build something is not capable of.

True, I'm not sure if the osstest bisector will currently cope with the
set of trees supported by a component changing, but I suppose it would
have to learn to do so...

Ian.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-05-07  9:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-06 14:43 [PATCH v2] OSSTEST: introduce a raisin build test Stefano Stabellini
2015-05-06 15:15 ` Ian Campbell
2015-05-06 16:02   ` Stefano Stabellini
2015-05-07  9:13     ` Ian Campbell
2015-05-07  9:31       ` Stefano Stabellini
2015-05-07  9:40         ` Ian Campbell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.