Skip to contentSkip to conversation

OSSTEST: introduce a raisin build test

PATCH Superseded Stefano Stabellini 2 participants 6 messages May 6, 2015 – May 7, 2015

v2 of 8 Superseded Latest is v8 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 OSSTEST: introduce a raisin build test

---
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
ap-common +5 -0
index 64749e3..985eeec 100644
@@ -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}
mfi-common +25 -0
index 16fc8c5..57bbf1c 100644
@@ -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
sg-run-job +5 -0
index eae159d..449118d 100755
@@ -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
ts-raisin-build new file +161 -0

161 lines not on this page · raw message

Signature · 1 line
1.7.10.4
#1 lore raw

On Wed, 2015-05-06 at 15:43 +0100, Stefano Stabellini wrote:
[...]

Quoted 1 line

+ echo >>config ENABLED_COMPONENTS=\\"seabios ovmf xen qemu qemu_traditional libvirt\\"

[...]

ts-raisin-build line 49

Quoted 6 lines
ts-raisin-build new file +6 -0
+    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?

ts-raisin-build line 97

Quoted 6 lines
ts-raisin-build new file +6 -0
+    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).

Quoted 8 lines
ts-raisin-build new file +8 -0
+}
+
+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

ts-raisin-build line 115

Quoted 10 lines
ts-raisin-build new file +10 -0
+    # 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.

#2 lore raw
Quoted 11 lines · Ian Campbell

On Wed, 2015-05-06 at 15:43 +0100, Stefano Stabellini wrote:
[...]

Quoted 1 line

+ echo >>config ENABLED_COMPONENTS=\\"seabios ovmf xen qemu qemu_traditional libvirt\\"

[...]

ts-raisin-build line 49

Quoted 6 lines
ts-raisin-build new file +6 -0
+    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}\\"
Quoted 2 lines

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

Quoted 9 lines

ts-raisin-build line 97

Quoted 6 lines
ts-raisin-build new file +6 -0
+    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 :-)

Quoted 12 lines
Quoted 12 lines
ts-raisin-build new file +12 -0
+}
+
+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
Quoted 8 lines

ts-raisin-build line 115

Quoted 6 lines
ts-raisin-build new file +6 -0
+    # 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

#3 lore raw
Quoted 12 lines · Stefano Stabellini
Quoted 11 lines · Ian Campbell

On Wed, 2015-05-06 at 15:43 +0100, Stefano Stabellini wrote:
[...]

Quoted 1 line

+ echo >>config ENABLED_COMPONENTS=\\"seabios ovmf xen qemu qemu_traditional libvirt\\"

[...]

Quoted 6 lines
ts-raisin-build new file +6 -0
+    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}\\"
Quoted 4 lines
Quoted 2 lines

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).

Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
ts-raisin-build new file +6 -0
+    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);
Quoted 5 lines
Quoted 2 lines

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.

#4 lore raw
Quoted 23 lines · Ian Campbell
Quoted 12 lines · Stefano Stabellini
Quoted 11 lines · Ian Campbell

On Wed, 2015-05-06 at 15:43 +0100, Stefano Stabellini wrote:
[...]

Quoted 1 line

+ echo >>config ENABLED_COMPONENTS=\\"seabios ovmf xen qemu qemu_traditional libvirt\\"

[...]

Quoted 6 lines
ts-raisin-build new file +6 -0
+    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}\\"
Quoted 4 lines
Quoted 2 lines

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).

Quoted 8 lines

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.

Quoted 3 lines

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.

#5 lore raw
Quoted 33 lines · Stefano Stabellini
Quoted 23 lines · Ian Campbell
Quoted 12 lines · Stefano Stabellini
Quoted 11 lines · Ian Campbell

On Wed, 2015-05-06 at 15:43 +0100, Stefano Stabellini wrote:
[...]

Quoted 1 line

+ echo >>config ENABLED_COMPONENTS=\\"seabios ovmf xen qemu qemu_traditional libvirt\\"

[...]

Quoted 6 lines
ts-raisin-build new file +6 -0
+    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}\\"
Quoted 4 lines
Quoted 2 lines

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).

Quoted 8 lines

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.

Quoted 4 lines

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.

Quoted 6 lines
Quoted 3 lines

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.