All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/6] osstest: FreeBSD bugfixes and improvements
@ 2018-07-12 14:46 Roger Pau Monne
  2018-07-12 14:46 ` [PATCH v2 1/6] osstest: allow appending to existing runvars Roger Pau Monne
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Roger Pau Monne @ 2018-07-12 14:46 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson, Roger Pau Monne

Hello,

The first 4 patches in this patch series prevent FreeBSD jobs from
running on boxes booting from UEFI. This is needed due to osstest lack
of support for installing FreeBSD from UEFI at the moment.

Last two patches add support for creating Xen build jobs running on
FreeBSD. Such a job is added to the FreeBSD flight and also to the Xen
flights.

The patches can also be found at:

git://xenbits.xen.org/people/royger/osstest.git freebsd_improvement_v2

Thanks, Roger.

Ian Jackson (1):
  osstest: allow appending to existing runvars

Roger Pau Monne (5):
  osstest: remove duplicate set_freebsd_runvars
  osstest: abstract code to create a FreeBSD build job
  osstest: limit FreeBSD jobs to hardware booting in BIOS mode
  osstest: set the make command to use for xen-build
  osstest: add FreeBSD Xen build job

 cs-job-create         |  8 +++-
 make-flight           |  3 +-
 make-freebsd-flight   | 61 ++++++-----------------------
 mfi-common            | 90 ++++++++++++++++++++++++++++++++-----------
 sg-run-job            |  5 +++
 ts-build-prep-freebsd |  5 ++-
 ts-xen-build          | 11 +++---
 ts-xen-build-freebsd  | 19 +++++++++
 8 files changed, 121 insertions(+), 81 deletions(-)
 create mode 100755 ts-xen-build-freebsd

-- 
2.17.1


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

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

* [PATCH v2 1/6] osstest: allow appending to existing runvars
  2018-07-12 14:46 [PATCH v2 0/6] osstest: FreeBSD bugfixes and improvements Roger Pau Monne
@ 2018-07-12 14:46 ` Roger Pau Monne
  2018-07-12 14:46 ` [PATCH v2 2/6] osstest: remove duplicate set_freebsd_runvars Roger Pau Monne
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: Roger Pau Monne @ 2018-07-12 14:46 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson, Ian Jackson

From: Ian Jackson <ian.jackson@citrix.com>

So that the contents of the runvar can be expanded. There are
currently two ways to do this:

 - Using += will append to the end of the runvar.
 - Using ,= will append to the end of the runvar using ',' as the
   separator.

Note that if the runvar is empty {,|+}= just sets the runvar.

Signed-off-by: Ian Jackson <ian.jackson@citrix.com>
---
 cs-job-create | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/cs-job-create b/cs-job-create
index 064a9294..1980a625 100755
--- a/cs-job-create
+++ b/cs-job-create
@@ -53,8 +53,12 @@ foreach my $rv (@runvars) {
         $suppress{$1}= 1;
         next;
     }
-    $rv =~ m/^([a-z][0-9a-z_]*)(\~?)\=(.*)$/ or die "$rv ?";
-    my ($name,$synth,$val) = ($1,$2,$3);
+    $rv =~ m/^([a-z][0-9a-z_]*)(\~?)([+,]?)\=(.*)$/ or die "$rv ?";
+    my ($name,$synth,$add,$val) = ($1,$2,$3,$4);
+    if ($add && $runvars{$name}) {
+       die "$name synth mismatch" if !!$runvars{$name}[1] ne !!$synth;
+       $val = $runvars{$name}[0].($add ne '+' && $add).$val;
+    }
     $runvars{$name}= [$val,$synth];
 }
 
-- 
2.17.1


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

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

* [PATCH v2 2/6] osstest: remove duplicate set_freebsd_runvars
  2018-07-12 14:46 [PATCH v2 0/6] osstest: FreeBSD bugfixes and improvements Roger Pau Monne
  2018-07-12 14:46 ` [PATCH v2 1/6] osstest: allow appending to existing runvars Roger Pau Monne
@ 2018-07-12 14:46 ` Roger Pau Monne
  2018-07-12 14:46 ` [PATCH v2 3/6] osstest: abstract code to create a FreeBSD build job Roger Pau Monne
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: Roger Pau Monne @ 2018-07-12 14:46 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson, Roger Pau Monne

The set_freebsd_runvars helper in mfi-common is a superset of the
original function present in make-freebsd-flight, and will attempt to
fetch the last anointed FreeBSD build as a last resort option if no
FreeBSD build is signaled from the FreeBSD env vars. There's no reason
to have this duplication, since the set_freebsd_runvars in mfi-common
is perfectly suitable to be used by make-freebsd-flight.

This duplication was wrongly introduced by d36a7d892f by adding a
set_freebsd_runvars to mfi-common without removing the original
function in make-freebsd-flight.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
Changes since v1:
 - Add commit message.
---
 make-freebsd-flight | 31 -------------------------------
 1 file changed, 31 deletions(-)

diff --git a/make-freebsd-flight b/make-freebsd-flight
index 66d4b816..1a2b359c 100755
--- a/make-freebsd-flight
+++ b/make-freebsd-flight
@@ -36,37 +36,6 @@ job_create_build_filter_callback () {
     :
 }
 
-set_freebsd_runvars () {
-    # Caller should have done if required:
-    # local freebsd_runvars
-    #
-    # Figure out where are the installer binaries. The order is the
-    # following:
-    #
-    # 1. Env variable FREEBSD_<arch>_BUILDJOB: use the output from a
-    # previous build-<arch>-freebsd.
-    #
-    # 2. Env variables FREEBSD_DIST, FREEBSD_VERSION: set before calling
-    # into make-flight, provide the path to the installer image, the sets
-    # to install and the version being installed.
-    #
-    # 3. Config file FreeBSDDist, FreeBSDVersion: same as 2. except that
-    # they are set on the config file.
-    #
-    envvar="FREEBSD_${arch^^}_BUILDJOB"
-    if [ -n "${!envvar}" ]; then
-        freebsd_runvars="freebsdbuildjob=${!envvar}"
-    elif [ -n "$FREEBSD_DIST" ] && [ -n "$FREEBSD_VERSION" ]; then
-        freebsd_runvars="freebsd_distpath=$FREEBSD_DIST/$arch \
-                         freebsd_version=$FREEBSD_VERSION"
-    else
-        distpath=`getconfig "FreeBSDDist"`
-        version=`getconfig "FreeBSDVersion"`
-        freebsd_runvars="freebsd_distpath=$distpath/$arch \
-                         freebsd_version=$version"
-    fi
-}
-
 for arch in "$arches"; do
     set_freebsd_runvars
     job_create_build build-$arch-freebsd build-freebsd          \
-- 
2.17.1


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

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

* [PATCH v2 3/6] osstest: abstract code to create a FreeBSD build job
  2018-07-12 14:46 [PATCH v2 0/6] osstest: FreeBSD bugfixes and improvements Roger Pau Monne
  2018-07-12 14:46 ` [PATCH v2 1/6] osstest: allow appending to existing runvars Roger Pau Monne
  2018-07-12 14:46 ` [PATCH v2 2/6] osstest: remove duplicate set_freebsd_runvars Roger Pau Monne
@ 2018-07-12 14:46 ` Roger Pau Monne
  2018-07-12 14:46 ` [PATCH v2 4/6] osstest: limit FreeBSD jobs to hardware booting in BIOS mode Roger Pau Monne
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: Roger Pau Monne @ 2018-07-12 14:46 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson, Roger Pau Monne

Into a helper. A diff of the runvars of flights generated with and
without the patch show no differences.

No functional change.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
---
 make-freebsd-flight | 24 +++++-------------------
 mfi-common          | 14 ++++++++++++++
 2 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/make-freebsd-flight b/make-freebsd-flight
index 1a2b359c..6c530ebe 100755
--- a/make-freebsd-flight
+++ b/make-freebsd-flight
@@ -38,28 +38,14 @@ job_create_build_filter_callback () {
 
 for arch in "$arches"; do
     set_freebsd_runvars
-    job_create_build build-$arch-freebsd build-freebsd          \
-                arch=$arch                                      \
-                $RUNVARS $BUILD_RUNVARS $BUILD_FREEBSD_RUNVARS  \
-                $arch_runvars                                   \
-                tree_freebsd=$TREE_FREEBSD                      \
-                revision_freebsd=$REVISION_FREEBSD              \
-                host_hostflags=arch-$arch,purpose-build         \
-                all_host_os=freebsd                             \
-                $freebsd_runvars
+
+    create_freebsd_build_job build-$arch-freebsd
 
     # Create an identical job that's going to use the build output from
     # the previous one.
-    job_create_build build-$arch-freebsd-again build-freebsd    \
-                arch=$arch                                      \
-                $RUNVARS $BUILD_RUNVARS $BUILD_FREEBSD_RUNVARS  \
-                $arch_runvars                                   \
-                tree_freebsd=$TREE_FREEBSD                      \
-                revision_freebsd=$REVISION_FREEBSD              \
-                host_hostflags=arch-$arch,purpose-build         \
-                all_host_os=freebsd                             \
-                freebsdbuildjob=build-$arch-freebsd             \
-                recipe_testinstall=true
+    freebsd_runvars="$freebsd_runvars freebsdbuildjob=build-$arch-freebsd \
+                     recipe_testinstall=true"
+    create_freebsd_build_job build-$arch-freebsd-again
 done
 
 echo $flight
diff --git a/mfi-common b/mfi-common
index 9b6c9470..0e6cf01e 100644
--- a/mfi-common
+++ b/mfi-common
@@ -174,6 +174,20 @@ set_freebsd_runvars () {
     fi
 }
 
+create_freebsd_build_job () {
+  local name=$1
+
+  job_create_build $name build-freebsd                                  \
+    arch=$arch                                                          \
+    $RUNVARS $BUILD_RUNVARS $BUILD_FREEBSD_RUNVARS                      \
+    $arch_runvars                                                       \
+    tree_freebsd=$TREE_FREEBSD                                          \
+    revision_freebsd=$REVISION_FREEBSD                                  \
+    host_hostflags=arch-$arch,purpose-build                             \
+    all_host_os=freebsd                                                 \
+    $freebsd_runvars
+}
+
 create_build_jobs () {
 
   local arch
-- 
2.17.1


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

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

* [PATCH v2 4/6] osstest: limit FreeBSD jobs to hardware booting in BIOS mode
  2018-07-12 14:46 [PATCH v2 0/6] osstest: FreeBSD bugfixes and improvements Roger Pau Monne
                   ` (2 preceding siblings ...)
  2018-07-12 14:46 ` [PATCH v2 3/6] osstest: abstract code to create a FreeBSD build job Roger Pau Monne
@ 2018-07-12 14:46 ` Roger Pau Monne
  2018-07-17 11:12   ` Ian Jackson
  2018-07-12 14:46 ` [PATCH v2 5/6] osstest: set the make command to use for xen-build Roger Pau Monne
  2018-07-12 14:46 ` [PATCH v2 6/6] osstest: add FreeBSD Xen build job Roger Pau Monne
  5 siblings, 1 reply; 10+ messages in thread
From: Roger Pau Monne @ 2018-07-12 14:46 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson, Roger Pau Monne

There's no support yet in osstest to install FreeBSD from UEFI, so for
the time being limit the FreeBSD jobs to boxes booting with legacy
BIOS.

The hostflags are not set for examine jobs, in order to avoid them
from only running on BIOS boxes.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
Note that this patch depends on Ian Jackson's resource allocation
series.
---
Changes since v1:
 - Fix nonbreaking space.
 - Fix long line.
---
 make-flight |  3 ++-
 mfi-common  | 16 ++++++++++++----
 2 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/make-flight b/make-flight
index 4e2d464f..deb2276d 100755
--- a/make-flight
+++ b/make-flight
@@ -704,7 +704,8 @@ do_examine_one () {
   local freebsd_runvars
   # set_freebsd_runvars expects $arch to be set to the desired FreeBSD arch.
   local arch=$dom0arch
-  set_freebsd_runvars
+  # Pass true to not append any hostflags when creating the FreeBSD runvars.
+  set_freebsd_runvars true
   job_create_test test-$xenarch$kern-$dom0arch-examine \
                   host-examine-xen xl $xenarch $dom0arch \
                   all_hostflags=$most_hostflags $freebsd_runvars
diff --git a/mfi-common b/mfi-common
index 0e6cf01e..74645259 100644
--- a/mfi-common
+++ b/mfi-common
@@ -149,27 +149,35 @@ set_freebsd_runvars () {
     #
     # 4. Look for an anointed build of FreeBSD `master' (Executive only)
     #
+    local no_hostflags=$1
     local envvar="FREEBSD_${arch^^}_BUILDJOB"
+
+    if [ x$no_hostflags != xtrue ]; then
+        # osstest doesn't yet know how to install FreeBSD on UEFI hosts, so
+        # limit the usable hardware to boxes that boot from BIOS.
+        freebsd_runvars="all_hostflags,=PropEq:Firmware:bios:bios"
+    fi
+
     if [ -n "${!envvar}" ]; then
-        freebsd_runvars="freebsdbuildjob=${!envvar}"
+        freebsd_runvars="$freebsd_runvars freebsdbuildjob=${!envvar}"
         return
     fi
     if [ -n "$FREEBSD_DIST" ] && [ -n "$FREEBSD_VERSION" ]; then
-        freebsd_runvars="freebsd_distpath=$FREEBSD_DIST/$arch \
+        freebsd_runvars="$freebsd_runvars freebsd_distpath=$FREEBSD_DIST/$arch \
                          freebsd_version=$FREEBSD_VERSION"
         return
     fi
     local distpath=`getconfig "FreeBSDDist"`
     if [ -n "$distpath" ]; then
         local version=`getconfig "FreeBSDVersion"`
-        freebsd_runvars="freebsd_distpath=$distpath/$arch \
+        freebsd_runvars="$freebsd_runvars freebsd_distpath=$distpath/$arch \
                          freebsd_version=$version"
         return
     fi
     local anointment="freebsd build master $arch"
     local flightjob=`./mg-anoint retrieve --tolerate-unprepared "$anointment"`
     if [ -n "$flightjob" ]; then
-        freebsd_runvars="freebsdbuildjob=${flightjob/ /.}"
+        freebsd_runvars="$freebsd_runvars freebsdbuildjob=${flightjob/ /.}"
         return
     fi
 }
-- 
2.17.1


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

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

* [PATCH v2 5/6] osstest: set the make command to use for xen-build
  2018-07-12 14:46 [PATCH v2 0/6] osstest: FreeBSD bugfixes and improvements Roger Pau Monne
                   ` (3 preceding siblings ...)
  2018-07-12 14:46 ` [PATCH v2 4/6] osstest: limit FreeBSD jobs to hardware booting in BIOS mode Roger Pau Monne
@ 2018-07-12 14:46 ` Roger Pau Monne
  2018-07-12 14:46 ` [PATCH v2 6/6] osstest: add FreeBSD Xen build job Roger Pau Monne
  5 siblings, 0 replies; 10+ messages in thread
From: Roger Pau Monne @ 2018-07-12 14:46 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson, Roger Pau Monne

The default make on FreeBSD is the BSD make, and Xen requires the GNU
make in order to build. Set the make command based on the OS for the
Xen build.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
Changes since v1:
 - Use gmake for all BSDs.
---
 ts-xen-build | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/ts-xen-build b/ts-xen-build
index 57913d4f..48bf062f 100755
--- a/ts-xen-build
+++ b/ts-xen-build
@@ -28,6 +28,7 @@ tsreadconfig();
 selectbuildhost(\@ARGV);
 
 our $dokconfig = 1;
+our $make = $ho->{OS} =~ m/bsd/ ? "gmake" : "make";
 
 while (@ARGV && $ARGV[0] =~ m/^-/) {
     $_ = shift @ARGV;
@@ -156,24 +157,24 @@ END
 
     buildcmd_stamped_logged(600, 'xen', 'kconfig', '',<<END,'') if $dokconfig;
             if test -f xen/Kconfig; then
-                $make_prefix make -C xen olddefconfig
+                $make_prefix $make -C xen olddefconfig
             fi
 END
 
     if (!@make_args) {
 	buildcmd_stamped_logged(9000, 'xen', 'build', '',<<END,'');
-            $make_prefix make $makeflags build
+            $make_prefix $make $makeflags build
 END
     }
 
     buildcmd_stamped_logged(9000, 'xen', 'all', '',<<END,'');
-            $make_prefix make $makeflags @make_args
+            $make_prefix $make $makeflags @make_args
 END
 
     if ($enable_xsm) {
 	my $xen_version = target_cmd_output($ho, <<END, 30);
 	    cd $builddir/xen
-	    $make_prefix make xenversion
+	    $make_prefix $make xenversion
 END
 	store_runvar("flaskpolicy", "xenpolicy-" . $xen_version);
     }
@@ -181,7 +182,7 @@ END
     if ($enable_livepatch) {
 	substep_eval('/dist-test', sub {
 	    buildcmd_stamped_logged(600, 'xen', 'xenlpt', '',<<END,'');
-            $make_prefix make $makeflags dist-tests
+            $make_prefix $make $makeflags dist-tests
 END
 	});
     }
-- 
2.17.1


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

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

* [PATCH v2 6/6] osstest: add FreeBSD Xen build job
  2018-07-12 14:46 [PATCH v2 0/6] osstest: FreeBSD bugfixes and improvements Roger Pau Monne
                   ` (4 preceding siblings ...)
  2018-07-12 14:46 ` [PATCH v2 5/6] osstest: set the make command to use for xen-build Roger Pau Monne
@ 2018-07-12 14:46 ` Roger Pau Monne
  2018-07-12 14:50   ` Ian Jackson
  5 siblings, 1 reply; 10+ messages in thread
From: Roger Pau Monne @ 2018-07-12 14:46 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson, Roger Pau Monne

To both the FreeBSD and the xen-unstable flights.

This is the runvar difference of a xen-unstable flight:

+build-amd64-xen-freebsd     all_host_os      freebsd
+build-amd64-xen-xsm-freebsd all_host_os      freebsd
+build-amd64-xen-freebsd     all_hostflags    PropEq:Firmware:bios:bios
+build-amd64-xen-xsm-freebsd all_hostflags    PropEq:Firmware:bios:bios
+build-amd64-xen-freebsd     arch             amd64
+build-amd64-xen-xsm-freebsd arch             amd64
+build-amd64-xen-freebsd     enable_livepatch true
+build-amd64-xen-xsm-freebsd enable_livepatch true
+build-amd64-xen-freebsd     enable_ovmf      false
+build-amd64-xen-xsm-freebsd enable_ovmf      false
+build-amd64-xen-freebsd     enable_xend      false
+build-amd64-xen-xsm-freebsd enable_xend      false
+build-amd64-xen-freebsd     enable_xsm       false
+build-amd64-xen-xsm-freebsd enable_xsm       true
+build-amd64-xen-freebsd     freebsdbuildjob  125104.build-amd64-freebsd
+build-amd64-xen-xsm-freebsd freebsdbuildjob  125104.build-amd64-freebsd
+build-amd64-xen-freebsd     host_hostflags   arch-amd64,purpose-build
+build-amd64-xen-xsm-freebsd host_hostflags   arch-amd64,purpose-build
+build-amd64-xen-freebsd     revision_minios
+build-amd64-xen-xsm-freebsd revision_minios
+build-amd64-xen-freebsd     revision_ovmf
+build-amd64-xen-xsm-freebsd revision_ovmf
+build-amd64-xen-freebsd     revision_qemu
+build-amd64-xen-xsm-freebsd revision_qemu
+build-amd64-xen-freebsd     revision_qemuu
+build-amd64-xen-xsm-freebsd revision_qemuu
+build-amd64-xen-freebsd     revision_seabios
+build-amd64-xen-xsm-freebsd revision_seabios
+build-amd64-xen-freebsd     revision_xen
+build-amd64-xen-xsm-freebsd revision_xen
+build-amd64-xen-freebsd     tree_minios
+build-amd64-xen-xsm-freebsd tree_minios
+build-amd64-xen-freebsd     tree_ovmf
+build-amd64-xen-xsm-freebsd tree_ovmf
+build-amd64-xen-freebsd     tree_qemu        git://xenbits.xen.org/qemu-xen-traditional.git
+build-amd64-xen-xsm-freebsd tree_qemu        git://xenbits.xen.org/qemu-xen-traditional.git
+build-amd64-xen-freebsd     tree_qemuu       git://xenbits.xen.org/qemu-xen.git
+build-amd64-xen-xsm-freebsd tree_qemuu       git://xenbits.xen.org/qemu-xen.git
+build-amd64-xen-freebsd     tree_seabios
+build-amd64-xen-xsm-freebsd tree_seabios
+build-amd64-xen-freebsd     tree_xen         git://xenbits.xen.org/xen.git
+build-amd64-xen-xsm-freebsd tree_xen         git://xenbits.xen.org/xen.git

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
---
Changes since v1:
 - Fix enabling of FreeBSD Xen buildjob based on branch.
 - Introduce a helper to add the FreeBSD Xen build jobs.
 - Introduce the ts-xen-build-freebsd wrapper around ts-xen-build for
   FreeBSD.
 - Introduce a create_xen_build_job helper.
---
 make-freebsd-flight   |  6 +++++
 mfi-common            | 60 ++++++++++++++++++++++++++++++-------------
 sg-run-job            |  5 ++++
 ts-build-prep-freebsd |  5 +++-
 ts-xen-build-freebsd  | 19 ++++++++++++++
 5 files changed, 76 insertions(+), 19 deletions(-)
 create mode 100755 ts-xen-build-freebsd

diff --git a/make-freebsd-flight b/make-freebsd-flight
index 6c530ebe..d3c413b5 100755
--- a/make-freebsd-flight
+++ b/make-freebsd-flight
@@ -46,6 +46,12 @@ for arch in "$arches"; do
     freebsd_runvars="$freebsd_runvars freebsdbuildjob=build-$arch-freebsd \
                      recipe_testinstall=true"
     create_freebsd_build_job build-$arch-freebsd-again
+
+    # Create a Xen build job that's going to use the output from the first
+    # FreeBSD build job.
+    create_xen_build_job build-$arch-xen-freebsd build-xen-freebsd      \
+        host_hostflags=arch-$arch,purpose-build all_host_os=freebsd     \
+        $freebsd_runvars
 done
 
 echo $flight
diff --git a/mfi-common b/mfi-common
index 74645259..54e1f62b 100644
--- a/mfi-common
+++ b/mfi-common
@@ -196,6 +196,30 @@ create_freebsd_build_job () {
     $freebsd_runvars
 }
 
+create_xen_build_job () {
+  local name=$1; shift
+  local recipe=$1; shift
+  local extra_runvars=$@; shift
+
+  job_create_build $name $recipe                                        \
+    arch=$arch enable_xend=$build_defxend enable_ovmf=$enable_ovmf      \
+    enable_xsm=$enable_xsm $livepatch_runvars                           \
+    tree_qemu=$TREE_QEMU                                                \
+    tree_qemuu=$TREE_QEMU_UPSTREAM                                      \
+    tree_xen=$TREE_XEN                                                  \
+    tree_seabios=$TREE_SEABIOS                                          \
+    tree_ovmf=$TREE_OVMF                                                \
+    tree_minios=$TREE_MINIOS                                            \
+    revision_xen=$REVISION_XEN                                          \
+    revision_qemu=$REVISION_QEMU                                        \
+    revision_qemuu=$REVISION_QEMU_UPSTREAM                              \
+    revision_seabios=$REVISION_SEABIOS                                  \
+    revision_ovmf=$REVISION_OVMF                                        \
+    revision_minios=$REVISION_MINIOS                                    \
+    $RUNVARS $BUILD_RUNVARS $BUILD_XEN_RUNVARS $arch_runvars            \
+    $extra_runvars
+}
+
 create_build_jobs () {
 
   local arch
@@ -205,6 +229,7 @@ create_build_jobs () {
   local enable_ovmf
   local build_hostflags
   local livepatch_runvars
+  local freebsd_runvars build_on_freebsd
 
   if [ "x$BUILD_LVEXTEND_MAX" != x ]; then
      BUILD_RUNVARS+=" build_lvextend_max=$BUILD_LVEXTEND_MAX "
@@ -215,6 +240,8 @@ create_build_jobs () {
 
     if [ "x$arch" = xdisable ]; then continue; fi
 
+    set_freebsd_runvars
+
     build_matrix_branch_filter_callback || continue
 
     case "$arch" in
@@ -291,6 +318,13 @@ create_build_jobs () {
     esac
     enable_prevovmf=${enable_prevovmf:-$enable_ovmf}
 
+    case "$xenbranch" in
+    xen-3.*-testing)  build_on_freebsd=false;;
+    xen-4.?-testing)  build_on_freebsd=false;;
+    xen-4.11-testing) build_on_freebsd=false;;
+    *)                build_on_freebsd=true;;
+    esac
+
     want_prevxen=n
     if branch_wants_migrupgrade_tests ; then
         # Only x86 for now
@@ -314,24 +348,14 @@ create_build_jobs () {
       else
         xsm_suffix=""
       fi
-      job_create_build build-$arch$xsm_suffix build                          \
-                arch=$arch enable_xend=$build_defxend enable_ovmf=$enable_ovmf\
-                enable_xsm=$enable_xsm $livepatch_runvars		     \
-        tree_qemu=$TREE_QEMU                                                 \
-        tree_qemuu=$TREE_QEMU_UPSTREAM                                       \
-        tree_xen=$TREE_XEN                                                   \
-        tree_seabios=$TREE_SEABIOS                                           \
-        tree_ovmf=$TREE_OVMF                                                 \
-        tree_minios=$TREE_MINIOS                                             \
-                $RUNVARS $BUILD_RUNVARS $BUILD_XEN_RUNVARS $arch_runvars     \
-                $hostos_runvars                                              \
-                host_hostflags=$build_hostflags                              \
-                revision_xen=$REVISION_XEN                                   \
-                revision_qemu=$REVISION_QEMU                                 \
-                revision_qemuu=$REVISION_QEMU_UPSTREAM                       \
-                revision_seabios=$REVISION_SEABIOS                           \
-                revision_ovmf=$REVISION_OVMF                                 \
-                revision_minios=$REVISION_MINIOS
+      create_xen_build_job build-$arch$xsm_suffix build                 \
+        $hostos_runvars host_hostflags=$build_hostflags
+      if [ x$arch = xamd64 ] && [ x$build_on_freebsd = xtrue ] ; then
+        # OVMF doesn't compile on FreeBSD ATM, so forcefully disable it.
+        create_xen_build_job build-$arch-xen$xsm_suffix-freebsd         \
+          build-xen-freebsd host_hostflags=arch-$arch,purpose-build     \
+          all_host_os=freebsd $freebsd_runvars enable_ovmf=false
+      fi
     done
 
     if [ x$want_prevxen = xy ] ; then
diff --git a/sg-run-job b/sg-run-job
index d152051f..bbfe3f5b 100755
--- a/sg-run-job
+++ b/sg-run-job
@@ -712,6 +712,7 @@ proc need-hosts/build-libvirt {}        { return BUILD_LINUX }
 proc need-hosts/build-rumprun {}        { return BUILD_LINUX }
 proc need-hosts/build-xtf {}            { return BUILD_LINUX }
 proc need-hosts/build-freebsd {}        { return BUILD_FREEBSD }
+proc need-hosts/build-xen-freebsd {}    { return BUILD_FREEBSD }
 
 proc run-job/build {} {
     run-ts . = ts-xen-build
@@ -742,6 +743,10 @@ proc run-job/build-freebsd {} {
     run-ts . = ts-freebsd-build
 }
 
+proc run-job/build-xen-freebsd {} {
+    run-ts . = ts-xen-build-freebsd + host
+}
+
 proc allocate-build-host {ostype} {
     global jobinfo
     switch -exact $ostype {
diff --git a/ts-build-prep-freebsd b/ts-build-prep-freebsd
index 3999ed79..e3220fa8 100755
--- a/ts-build-prep-freebsd
+++ b/ts-build-prep-freebsd
@@ -31,7 +31,10 @@ our $ho= selecthost($whhost);
 exit 0 if $ho->{SharedReady};
 
 sub install_deps () {
-    target_install_packages($ho, qw(git));
+    my @packages = qw(git glib pkgconf yajl gmake pixman markdown gettext
+                      python argp-standalone lzo2 git gcc binutils);
+
+    target_install_packages($ho, @packages);
 }
 
 install_deps();
diff --git a/ts-xen-build-freebsd b/ts-xen-build-freebsd
new file mode 100755
index 00000000..55f513e5
--- /dev/null
+++ b/ts-xen-build-freebsd
@@ -0,0 +1,19 @@
+#!/bin/sh
+# This is part of "osstest", an automated testing framework for Xen.
+# Copyright (C) 2009-2018 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/>.
+
+set -ex
+./ts-xen-build "$@" -- clang=y SEABIOSCC=gcc SEABIOSLD=/usr/local/bin/ld
-- 
2.17.1


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

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

* Re: [PATCH v2 6/6] osstest: add FreeBSD Xen build job
  2018-07-12 14:46 ` [PATCH v2 6/6] osstest: add FreeBSD Xen build job Roger Pau Monne
@ 2018-07-12 14:50   ` Ian Jackson
  2018-07-12 15:02     ` Roger Pau Monné
  0 siblings, 1 reply; 10+ messages in thread
From: Ian Jackson @ 2018-07-12 14:50 UTC (permalink / raw)
  To: Roger Pau Monne; +Cc: xen-devel, Ian Jackson

Roger Pau Monne writes ("[PATCH v2 6/6] osstest: add FreeBSD Xen build job"):
> To both the FreeBSD and the xen-unstable flights.
> 
> This is the runvar difference of a xen-unstable flight:

Can you split out the refactoring, please ?

That way I can do my own runvar difference on the just-refactoring
part of the series.

Thanks,
Ian.

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

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

* Re: [PATCH v2 6/6] osstest: add FreeBSD Xen build job
  2018-07-12 14:50   ` Ian Jackson
@ 2018-07-12 15:02     ` Roger Pau Monné
  0 siblings, 0 replies; 10+ messages in thread
From: Roger Pau Monné @ 2018-07-12 15:02 UTC (permalink / raw)
  To: Ian Jackson; +Cc: xen-devel, Ian Jackson

On Thu, Jul 12, 2018 at 03:50:07PM +0100, Ian Jackson wrote:
> Roger Pau Monne writes ("[PATCH v2 6/6] osstest: add FreeBSD Xen build job"):
> > To both the FreeBSD and the xen-unstable flights.
> > 
> > This is the runvar difference of a xen-unstable flight:
> 
> Can you split out the refactoring, please ?

Sure, I've pushed it to:

git://xenbits.xen.org/people/royger/osstest.git freebsd_improvement_v3

If you prefer I can also send the updated series to the mailing list.

Thanks, Roger.

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

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

* Re: [PATCH v2 4/6] osstest: limit FreeBSD jobs to hardware booting in BIOS mode
  2018-07-12 14:46 ` [PATCH v2 4/6] osstest: limit FreeBSD jobs to hardware booting in BIOS mode Roger Pau Monne
@ 2018-07-17 11:12   ` Ian Jackson
  0 siblings, 0 replies; 10+ messages in thread
From: Ian Jackson @ 2018-07-17 11:12 UTC (permalink / raw)
  To: Roger Pau Monne; +Cc: xen-devel

Roger Pau Monne writes ("[PATCH v2 4/6] osstest: limit FreeBSD jobs to hardware booting in BIOS mode"):
> There's no support yet in osstest to install FreeBSD from UEFI, so for
> the time being limit the FreeBSD jobs to boxes booting with legacy
> BIOS.

I did a diff of the output of
  OSSTEST_CONFIG=standalone-config-example eatmydata ./standalone-generate-dump-flight-runvars
between current production, and after applying this patch, and I saw
these changes:

+freebsd-master             build-amd64-freebsd       all_hostflags       PropEq:Firmware:bios:bios           
+freebsd-master             build-amd64-freebsd-again all_hostflags       PropEq:Firmware:bios:bios           

These are expected, I think.

-freebsd-master             build-amd64-freebsd       freebsd_distpath    /amd64                              
-freebsd-master             build-amd64-freebsd       freebsd_version                                         

I don't think I understand these changes.

+examine                    examine-SOMEHOST  all_hostflags           PropEq:Firmware:bios:bios                                     

This is wrong.  The examine job needs to run on all hosts and
shouldn't have that hostflag applied.

I also notice that you did a runvar difference only of a xen-unstable
flight.  Looking at the differences between production and the tip of
your series, I think you are perhaps adding the freebsd xen build job
to rather too many of these flights.

Ian.

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

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

end of thread, other threads:[~2018-07-17 11:12 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-12 14:46 [PATCH v2 0/6] osstest: FreeBSD bugfixes and improvements Roger Pau Monne
2018-07-12 14:46 ` [PATCH v2 1/6] osstest: allow appending to existing runvars Roger Pau Monne
2018-07-12 14:46 ` [PATCH v2 2/6] osstest: remove duplicate set_freebsd_runvars Roger Pau Monne
2018-07-12 14:46 ` [PATCH v2 3/6] osstest: abstract code to create a FreeBSD build job Roger Pau Monne
2018-07-12 14:46 ` [PATCH v2 4/6] osstest: limit FreeBSD jobs to hardware booting in BIOS mode Roger Pau Monne
2018-07-17 11:12   ` Ian Jackson
2018-07-12 14:46 ` [PATCH v2 5/6] osstest: set the make command to use for xen-build Roger Pau Monne
2018-07-12 14:46 ` [PATCH v2 6/6] osstest: add FreeBSD Xen build job Roger Pau Monne
2018-07-12 14:50   ` Ian Jackson
2018-07-12 15:02     ` Roger Pau Monné

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.