Skip to contentSkip to conversation

osstest: FreeBSD bugfixes and improvements

PATCH In review Roger Pau Monne 2 participants 18 messages Jul 17, 2018 – Jul 18, 2018

lore
Share & tools
lore
#0 lore raw

v4 cover osstest: FreeBSD bugfixes and improvements

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_v4

Thanks, Roger.

Ian Jackson (3):
dummy flight generation: Tolerate lack of repos dummy flight generation: cs-hosts-list should not print { }
osstest: allow appending to existing runvars

Roger Pau Monne (6):
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: introduce a helper to create Xen build jobs
osstest: add FreeBSD Xen build job

 cri-getconfig         |  2 +-
 cri-lock-repos        |  4 +-
 cs-hosts-list         | 19 +++++----
 cs-job-create         |  8 +++-
 make-flight           |  3 +-
 make-freebsd-flight   | 61 +++++----------------------
 make-hosts-flight     |  2 +-
 mfi-common            | 95 +++++++++++++++++++++++++++++++++----------
 sg-run-job            |  5 +++
 ts-build-prep-freebsd |  5 ++-
 ts-xen-build          | 11 ++---
 ts-xen-build-freebsd  | 19 +++++++++
 12 files changed, 142 insertions(+), 92 deletions(-)
 create mode 100755 ts-xen-build-freebsd
Signature · 7 lines
2.17.1


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
#1 lore raw

PATCH v4 1/9 dummy flight generation: Tolerate lack of repos

From: Ian Jackson <[email protected]>

In particular
OSSTEST_CONFIG=standalone-config-example eatmydata bash -x ./standalone-generate-dump-flight-runvars
should not require ~/osstest-repos to exist.

---
 cri-getconfig  | 2 +-
 cri-lock-repos | 4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)
cri-getconfig +1 -1
index b891c9b1..f8397c18 100644
@@ -42,7 +42,7 @@ getrepos() {
 		echo "Repos must be configured in $config" >&2
 		exit 1
 	fi
-	if [ ! -d "$repos" ] ; then
+	if [ x"$AP_FETCH_PLACEHOLDERS" != xy ] && [ ! -d "$repos" ] ; then
 		# Is likely an absolute path, so don't create automatically,
 		# just in case...
 		echo "Repos $repos does not exist" >&2
cri-lock-repos +3 -1
index e75e3f59..e7e0fa87 100644
@@ -22,7 +22,9 @@
 repos=`getrepos`
 repos_lock="$repos/lock"
 
-if [ "x$OSSTEST_REPOS_LOCK_LOCKED" != "x$repos_lock" ]; then
+if [ "x$AP_FETCH_PLACEHOLDERS" = xy ] && ! [ -e $repos ]; then
+	echo "AP_FETCH_PLACEHOLDERS, not locking" >&2
+elif [ "x$OSSTEST_REPOS_LOCK_LOCKED" != "x$repos_lock" ]; then
 	OSSTEST_REPOS_LOCK_LOCKED="$repos_lock" \
 	exec with-lock-ex -w "$repos_lock" \
 	"$0" "$@"
Signature · 7 lines
2.17.1


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
#2 lore raw

PATCH v4 2/9 dummy flight generation: cs-hosts-list should not print { }

In reply to Roger Pau Monne

From: Ian Jackson <[email protected]>

With newer bash, this causes

      local envvar="FREEBSD_${arch^^}_BUILDJOB"
      if [ -n "${!envvar}" ]; then

to (properly) report a syntax error.

As Roger says, it is better to print a dummy host for each architecture, so do that.

---
 cs-hosts-list | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)
cs-hosts-list +11 -8
index 6b910ae3..384ed461 100755
@@ -92,15 +92,18 @@ my ($flags) = @ARGV;
 my $o;
 
 if ($ENV{'OSSTEST_HOSTSLIST_DUMMY'}) {
-    $o .= "SOMEHOST";
-    if (@arches) {
-	$o .= " $kernels[0]";
-	$o .= " {".join(',',@arches)."}";
+    foreach my $arch (@arches ? @arches : qw(SOMEARCH)) {
+        $o .= "SOMEHOST";
+        $o .= "-\U$arch" if @arches;
+        if (@arches) {
+            $o .= " $kernels[0]";
+            $o .= " $arch";
+        }
+        if (@suites) {
+            $o .= " $suites[0]";
+        }
+        $o .= "\n";
     }
-    if (@suites) {
-	$o .= " $suites[0]";
-    }
-    $o .= "\n";
     print $o or die $!;
     exit 0;
 }
Signature · 7 lines
2.17.1


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
#3 lore raw

PATCH v4 3/9 osstest: allow appending to existing runvars

In reply to Roger Pau Monne

From: Ian Jackson <[email protected]>

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.

---
 cs-job-create | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
cs-job-create +6 -2
index 064a9294..1980a625 100755
@@ -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];
 }
 
Signature · 7 lines
2.17.1


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
#4 lore raw

PATCH v4 4/9 osstest: remove duplicate set_freebsd_runvars

In reply to 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.

---
Changes since v1:
- Add commit message.

---
 make-freebsd-flight | 31 -------------------------------
 1 file changed, 31 deletions(-)
make-freebsd-flight +0 -31
index 66d4b816..1a2b359c 100755
@@ -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          \
Signature · 7 lines
2.17.1


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
#5 lore raw

PATCH v4 5/9 osstest: abstract code to create a FreeBSD build job

In reply to 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.

---
 make-freebsd-flight | 24 +++++-------------------
 mfi-common          | 14 ++++++++++++++
 2 files changed, 19 insertions(+), 19 deletions(-)
make-freebsd-flight +5 -19
index 1a2b359c..6c530ebe 100755
@@ -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
mfi-common +14 -0
index 01ab5d15..3038f713 100644
@@ -180,6 +180,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
Signature · 7 lines
2.17.1


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Acked-by on v4 5/9
#6 lore raw

Re: [PATCH v4 5/9] osstest: abstract code to create a FreeBSD build job

Roger Pau Monne writes ("[PATCH v4 5/9] osstest: abstract code to create a FreeBSD build job"):

Quoted 2 lines

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

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#7 lore raw

PATCH v4 6/9 osstest: limit FreeBSD jobs to hardware booting in BIOS mode

In reply to 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.

The runvar difference with this patch applied is:

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

---
Changes since v2:
- Fix hosts flight to not require BIOS firmware.

Changes since v1:
- Fix nonbreaking space.
- Fix long line.

---
 make-flight       |  3 ++-
 make-hosts-flight |  2 +-
 mfi-common        | 16 ++++++++++++----
 3 files changed, 15 insertions(+), 6 deletions(-)
make-flight +2 -1
index 0e63bc07..96c261b5 100755
@@ -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
make-hosts-flight +1 -1
index d5670857..f7422932 100755
@@ -70,7 +70,7 @@ hosts_iterate () {
       xen|linux)
         local di_version=`getconfig_TftpDiVersion_suite $suite`
         local freebsd_runvars
-        set_freebsd_runvars
+        set_freebsd_runvars true
         runvars+=" 
                    kernkind=pvops
                    all_host_di_version=$di_version
mfi-common +12 -4
index 3038f713..9d1bfac7 100644
@@ -155,27 +155,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
 }
Signature · 7 lines
2.17.1


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
#8 lore raw

PATCH v4 7/9 osstest: set the make command to use for xen-build

In reply to 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.

---
Changes since v1:
- Use gmake for all BSDs.

---
 ts-xen-build | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
ts-xen-build +6 -5
index 57913d4f..48bf062f 100755
@@ -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
 	});
     }
Signature · 7 lines
2.17.1


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
#9 lore raw

PATCH v4 8/9 osstest: introduce a helper to create Xen build jobs

In reply to Roger Pau Monne

This is currently a non-functional change, since no new jobs are added, and the existing ones should stay unchanged. Runvars of a xen-unstable flight are exactly the same.

The purpose of the helper is to allow adding different Xen build jobs, with likely different runvars in the future.

---
 mfi-common | 44 ++++++++++++++++++++++++++------------------
 1 file changed, 26 insertions(+), 18 deletions(-)
mfi-common +26 -18
index 9d1bfac7..b5af1771 100644
@@ -202,6 +202,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
@@ -320,24 +344,8 @@ 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
     done
 
     if [ x$want_prevxen = xy ] ; then
Signature · 7 lines
2.17.1


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
#10 lore raw

Re: [PATCH v4 8/9] osstest: introduce a helper to create Xen build jobs

Roger Pau Monne writes ("[PATCH v4 8/9] osstest: introduce a helper to create Xen build jobs"):

Quoted 3 lines

This is currently a non-functional change, since no new jobs are added, and the existing ones should stay unchanged. Runvars of a xen-unstable flight are exactly the same.

Can you please extend that assertion about unchanged runvars to all flights ? (Hopefully you already did the necessary check, but if not, please do it.)

Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#11 lore raw

Re: [PATCH v4 8/9] osstest: introduce a helper to create Xen build jobs

Quoted 8 lines · Ian Jackson

Roger Pau Monne writes ("[PATCH v4 8/9] osstest: introduce a helper to create Xen build jobs"):

Quoted 3 lines

This is currently a non-functional change, since no new jobs are added, and the existing ones should stay unchanged. Runvars of a xen-unstable flight are exactly the same.

Can you please extend that assertion about unchanged runvars to all flights ? (Hopefully you already did the necessary check, but if not, please do it.)

I've just checked with standalone-generate-dump-flight-runvars and there are no runvar differences at all in any flights.

Thanks, Roger.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#12 lore raw

PATCH v4 9/9 osstest: add FreeBSD Xen build job

In reply to Roger Pau Monne

To both the FreeBSD and the xen-unstable flights.

This is the runvar difference of all flights:

+freebsd-master build-amd64-xen-freebsd     all_host_os        freebsd
+freebsd-master build-amd64-xen-freebsd     all_hostflags      PropEq:Firmware:bios:bios
+freebsd-master build-amd64-xen-freebsd     arch               amd64
+freebsd-master build-amd64-xen-freebsd     enable_ovmf
+freebsd-master build-amd64-xen-freebsd     enable_xend
+freebsd-master build-amd64-xen-freebsd     enable_xsm
+freebsd-master build-amd64-xen-freebsd     freebsdbuildjob    build-amd64-freebsd
+freebsd-master build-amd64-xen-freebsd     host_hostflags     arch-amd64,purpose-build
+freebsd-master build-amd64-xen-freebsd     recipe_testinstall true
+freebsd-master build-amd64-xen-freebsd     revision_minios
+freebsd-master build-amd64-xen-freebsd     revision_ovmf
+freebsd-master build-amd64-xen-freebsd     revision_qemu
+freebsd-master build-amd64-xen-freebsd     revision_qemuu     ap-fetch-version-baseline:qemu-upstream-unstable
+freebsd-master build-amd64-xen-freebsd     revision_seabios
+freebsd-master build-amd64-xen-freebsd     revision_xen       ap-fetch-version-baseline:xen-unstable
+freebsd-master build-amd64-xen-freebsd     tree_minios
+freebsd-master build-amd64-xen-freebsd     tree_ovmf
+freebsd-master build-amd64-xen-freebsd     tree_qemu          git://xenbits.xen.org/qemu-xen-traditional.git
+freebsd-master build-amd64-xen-freebsd     tree_qemuu         git://xenbits.xen.org/qemu-xen.git
+freebsd-master build-amd64-xen-freebsd     tree_seabios
+freebsd-master build-amd64-xen-freebsd     tree_xen           git://xenbits.xen.org/xen.git
+xen-unstable   build-amd64-xen-freebsd     all_host_os        freebsd
+xen-unstable   build-amd64-xen-xsm-freebsd all_host_os        freebsd
+xen-unstable   build-amd64-xen-freebsd     all_hostflags      PropEq:Firmware:bios:bios
+xen-unstable   build-amd64-xen-xsm-freebsd all_hostflags      PropEq:Firmware:bios:bios
+xen-unstable   build-amd64-xen-freebsd     arch               amd64
+xen-unstable   build-amd64-xen-xsm-freebsd arch               amd64
+xen-unstable   build-amd64-xen-freebsd     build_lvextend_max 50
+xen-unstable   build-amd64-xen-xsm-freebsd build_lvextend_max 50
+xen-unstable   build-amd64-xen-freebsd     enable_livepatch   true
+xen-unstable   build-amd64-xen-xsm-freebsd enable_livepatch   true
+xen-unstable   build-amd64-xen-freebsd     enable_ovmf        false
+xen-unstable   build-amd64-xen-xsm-freebsd enable_ovmf        false
+xen-unstable   build-amd64-xen-freebsd     enable_xend        false
+xen-unstable   build-amd64-xen-xsm-freebsd enable_xend        false
+xen-unstable   build-amd64-xen-freebsd     enable_xsm         false
+xen-unstable   build-amd64-xen-xsm-freebsd enable_xsm         true
+xen-unstable   build-amd64-xen-freebsd     host_hostflags     arch-amd64,purpose-build
+xen-unstable   build-amd64-xen-xsm-freebsd host_hostflags     arch-amd64,purpose-build
+xen-unstable   build-amd64-xen-freebsd     revision_minios
+xen-unstable   build-amd64-xen-xsm-freebsd revision_minios
+xen-unstable   build-amd64-xen-freebsd     revision_ovmf
+xen-unstable   build-amd64-xen-xsm-freebsd revision_ovmf
+xen-unstable   build-amd64-xen-freebsd     revision_qemu
+xen-unstable   build-amd64-xen-xsm-freebsd revision_qemu
+xen-unstable   build-amd64-xen-freebsd     revision_qemuu     ap-fetch-version-baseline:qemu-upstream-unstable
+xen-unstable   build-amd64-xen-xsm-freebsd revision_qemuu     ap-fetch-version-baseline:qemu-upstream-unstable
+xen-unstable   build-amd64-xen-freebsd     revision_seabios
+xen-unstable   build-amd64-xen-xsm-freebsd revision_seabios
+xen-unstable   build-amd64-xen-freebsd     revision_xen       ap-fetch-version:xen-unstable
+xen-unstable   build-amd64-xen-xsm-freebsd revision_xen       ap-fetch-version:xen-unstable
+xen-unstable   build-amd64-xen-freebsd     tree_minios
+xen-unstable   build-amd64-xen-xsm-freebsd tree_minios
+xen-unstable   build-amd64-xen-freebsd     tree_ovmf
+xen-unstable   build-amd64-xen-xsm-freebsd tree_ovmf
+xen-unstable   build-amd64-xen-freebsd     tree_qemu          git://xenbits.xen.org/qemu-xen-traditional.git
+xen-unstable   build-amd64-xen-xsm-freebsd tree_qemu          git://xenbits.xen.org/qemu-xen-traditional.git
+xen-unstable   build-amd64-xen-freebsd     tree_qemuu         git://xenbits.xen.org/qemu-xen.git
+xen-unstable   build-amd64-xen-xsm-freebsd tree_qemuu         git://xenbits.xen.org/qemu-xen.git
+xen-unstable   build-amd64-xen-freebsd     tree_seabios
+xen-unstable   build-amd64-xen-xsm-freebsd tree_seabios
+xen-unstable   build-amd64-xen-freebsd     tree_xen           git://xenbits.xen.org/xen.git
+xen-unstable   build-amd64-xen-xsm-freebsd tree_xen           git://xenbits.xen.org/xen.git

---
Changes since v2:
- Only add FreeBSD Xen buildjobs to the xen-* branches.

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            | 21 +++++++++++++++++++++
 sg-run-job            |  5 +++++
 ts-build-prep-freebsd |  5 ++++-
 ts-xen-build-freebsd  | 19 +++++++++++++++++++
 5 files changed, 55 insertions(+), 1 deletion(-)
 create mode 100755 ts-xen-build-freebsd
make-freebsd-flight +6 -0
index 6c530ebe..d3c413b5 100755
@@ -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
mfi-common +21 -0
index b5af1771..614d3c10 100644
@@ -235,6 +235,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 "
@@ -245,6 +246,8 @@ create_build_jobs () {
 
     if [ "x$arch" = xdisable ]; then continue; fi
 
+    set_freebsd_runvars
+
     build_matrix_branch_filter_callback || continue
 
     case "$arch" in
@@ -321,6 +324,18 @@ create_build_jobs () {
     esac
     enable_prevovmf=${enable_prevovmf:-$enable_ovmf}
 
+    # Only add FreeBSD Xen buildjobs to the xen-* branches at the moment.
+    case "$branch" in
+    xen-*)
+      case "$xenbranch" in
+      xen-3.*-testing)  build_on_freebsd=false;;
+      xen-4.?-testing)  build_on_freebsd=false;;
+      xen-4.10-testing) build_on_freebsd=false;;
+      xen-4.11-testing) build_on_freebsd=false;;
+      *)                build_on_freebsd=true;;
+      esac;;
+    esac
+
     want_prevxen=n
     if branch_wants_migrupgrade_tests ; then
         # Only x86 for now
@@ -346,6 +361,12 @@ create_build_jobs () {
       fi
       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
sg-run-job +5 -0
index d152051f..bbfe3f5b 100755
@@ -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 {
ts-build-prep-freebsd +4 -1
index 3999ed79..e3220fa8 100755
@@ -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();
ts-xen-build-freebsd new file +19 -0
new file mode 100755
index 00000000..55f513e5
@@ -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
Signature · 7 lines
2.17.1


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
#14 lore raw

Re: [PATCH v4 9/9] osstest: add FreeBSD Xen build job

Ian Jackson writes ("Re: [PATCH v4 9/9] osstest: add FreeBSD Xen build job"):

Quoted 4 lines

Roger Pau Monne writes ("[PATCH v4 9/9] osstest: add FreeBSD Xen build job"):

Quoted 1 line

To both the FreeBSD and the xen-unstable flights.

Please add this to the osstest flights too!

I should expand on this:

The reason you want the osstest branch to be covered is that it is an input to this job. There is no protection against an un-covered input branches introducing a regression.

Looking at the runvars, the declared inputs are:

+freebsd-master build-amd64-xen-freebsd     freebsdbuildjob    build-amd64-freebsd
+freebsd-master build-amd64-xen-freebsd     revision_minios
+freebsd-master build-amd64-xen-freebsd     revision_ovmf
+freebsd-master build-amd64-xen-freebsd     revision_qemu
+freebsd-master build-amd64-xen-freebsd     revision_qemuu     ap-fetch-version-baseline:qemu-upstream-unstable
+freebsd-master build-amd64-xen-freebsd     revision_seabios
+freebsd-master build-amd64-xen-freebsd     revision_xen       ap-fetch-version-baseline:xen-unstable

Do you know what proportion of these are actually used by the FreeBSD Xen build ? All that are need this job adding to their own flights.

Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#15 lore raw

Re: [PATCH v4 9/9] osstest: add FreeBSD Xen build job

Quoted 11 lines · Ian Jackson

Ian Jackson writes ("Re: [PATCH v4 9/9] osstest: add FreeBSD Xen build job"):

Quoted 4 lines

Roger Pau Monne writes ("[PATCH v4 9/9] osstest: add FreeBSD Xen build job"):

Quoted 1 line

To both the FreeBSD and the xen-unstable flights.

Please add this to the osstest flights too!

I should expand on this:

The reason you want the osstest branch to be covered is that it is an input to this job. There is no protection against an un-covered input branches introducing a regression.

I'm attaching a patch below that adds a FreeBSD Xen build job to the osstest flights. I've also pushed the updated branch to my git repo:

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

Quoted 10 lines

Looking at the runvars, the declared inputs are:

(quoted diff) +7 -0
+freebsd-master build-amd64-xen-freebsd     freebsdbuildjob    build-amd64-freebsd
+freebsd-master build-amd64-xen-freebsd     revision_minios
+freebsd-master build-amd64-xen-freebsd     revision_ovmf
+freebsd-master build-amd64-xen-freebsd     revision_qemu
+freebsd-master build-amd64-xen-freebsd     revision_qemuu     ap-fetch-version-baseline:qemu-upstream-unstable
+freebsd-master build-amd64-xen-freebsd     revision_seabios
+freebsd-master build-amd64-xen-freebsd     revision_xen       ap-fetch-version-baseline:xen-unstable
Quoted 2 lines

Do you know what proportion of these are actually used by the FreeBSD Xen build ? All that are need this job adding to their own flights.

minios, ovmf and qemu is not used. I plan to add support for ovmf, but the rest (specially qemu-trad) will likely remain unused.

Thanks, Roger.

---8<---
From b67d5d562e1be182bb09b557d73ad3a9d1494690 Mon Sep 17 00:00:00 2001
From: Roger Pau Monne <[email protected]>
Date: Wed, 18 Jul 2018 17:49:40 +0200
Subject: [PATCH] osstest: add a FreeBSD Xen build job to osstest flights
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

The runvar diff is the following:

+osstest build-amd64-xen-freebsd     all_host_os        freebsd
+osstest build-amd64-xen-xsm-freebsd all_host_os        freebsd
+osstest build-amd64-xen-freebsd     all_hostflags      PropEq:Firmware:bios:bios
+osstest build-amd64-xen-xsm-freebsd all_hostflags      PropEq:Firmware:bios:bios
+osstest build-amd64-xen-freebsd     arch               amd64
+osstest build-amd64-xen-xsm-freebsd arch               amd64
+osstest build-amd64-xen-freebsd     build_lvextend_max 50
+osstest build-amd64-xen-xsm-freebsd build_lvextend_max 50
+osstest build-amd64-xen-freebsd     enable_livepatch   true
+osstest build-amd64-xen-xsm-freebsd enable_livepatch   true
+osstest build-amd64-xen-freebsd     enable_ovmf        false
+osstest build-amd64-xen-xsm-freebsd enable_ovmf        false
+osstest build-amd64-xen-freebsd     enable_xend        false
+osstest build-amd64-xen-xsm-freebsd enable_xend        false
+osstest build-amd64-xen-freebsd     enable_xsm         false
+osstest build-amd64-xen-xsm-freebsd enable_xsm         true
+osstest build-amd64-xen-freebsd     host_hostflags     arch-amd64,purpose-build
+osstest build-amd64-xen-xsm-freebsd host_hostflags     arch-amd64,purpose-build

+osstest build-amd64-xen-freebsd revision_minios
+osstest build-amd64-xen-xsm-freebsd revision_minios
+osstest build-amd64-xen-freebsd revision_ovmf
+osstest build-amd64-xen-xsm-freebsd revision_ovmf
+osstest build-amd64-xen-freebsd revision_qemu
+osstest build-amd64-xen-xsm-freebsd revision_qemu
+osstest build-amd64-xen-freebsd revision_qemuu ap-fetch-version-baseline:qemu-upstream-unstable
+osstest build-amd64-xen-xsm-freebsd revision_qemuu ap-fetch-version-baseline:qemu-upstream-unstable
+osstest build-amd64-xen-freebsd revision_seabios
+osstest build-amd64-xen-xsm-freebsd revision_seabios
+osstest build-amd64-xen-freebsd revision_xen ap-fetch-version-baseline:xen-unstable
+osstest build-amd64-xen-xsm-freebsd revision_xen ap-fetch-version-baseline:xen-unstable
+osstest build-amd64-xen-freebsd tree_minios
+osstest build-amd64-xen-xsm-freebsd tree_minios
+osstest build-amd64-xen-freebsd tree_ovmf
+osstest build-amd64-xen-xsm-freebsd tree_ovmf

+osstest build-amd64-xen-freebsd     tree_qemu          git://xenbits.xen.org/qemu-xen-traditional.git
+osstest build-amd64-xen-xsm-freebsd tree_qemu          git://xenbits.xen.org/qemu-xen-traditional.git
+osstest build-amd64-xen-freebsd     tree_qemuu         git://xenbits.xen.org/qemu-xen.git
+osstest build-amd64-xen-xsm-freebsd tree_qemuu         git://xenbits.xen.org/qemu-xen.git

+osstest build-amd64-xen-freebsd tree_seabios
+osstest build-amd64-xen-xsm-freebsd tree_seabios
+osstest build-amd64-xen-freebsd tree_xen git://xenbits.xen.org/xen.git
+osstest build-amd64-xen-xsm-freebsd tree_xen git://xenbits.xen.org/xen.git

---
 mfi-common | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mfi-common +1 -1
index 614d3c10..ae6a337d 100644
@@ -326,7 +326,7 @@ create_build_jobs () {
 
     # Only add FreeBSD Xen buildjobs to the xen-* branches at the moment.
     case "$branch" in
-    xen-*)
+    xen-*|osstest)
       case "$xenbranch" in
       xen-3.*-testing)  build_on_freebsd=false;;
       xen-4.?-testing)  build_on_freebsd=false;;
Signature · 8 lines
2.18.0



_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
#16 lore raw

Re: [PATCH v4 9/9] osstest: add FreeBSD Xen build job

Roger Pau Monné writes ("Re: [PATCH v4 9/9] osstest: add FreeBSD Xen build job"):

Quoted 7 lines · Ian Jackson
Quoted 3 lines

The reason you want the osstest branch to be covered is that it is an input to this job. There is no protection against an un-covered input branches introducing a regression.

I'm attaching a patch below that adds a FreeBSD Xen build job to the osstest flights. I've also pushed the updated branch to my git repo:

Thanks. That LGTM.

Quoted 5 lines
Quoted 2 lines

Do you know what proportion of these are actually used by the FreeBSD Xen build ? All that are need this job adding to their own flights.

minios, ovmf and qemu is not used. I plan to add support for ovmf, but the rest (specially qemu-trad) will likely remain unused.

OK, good.

Feel free to add my acks everywhere they're missing and update your branch.

I'm afraid I'm going to queue this behind a series I am working on to address continued poor throughput due to shortage of working armhf hosts.

Thanks,
Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#17 lore raw

Re: [PATCH v4 9/9] osstest: add FreeBSD Xen build job

Quoted 14 lines · Ian Jackson

Roger Pau Monné writes ("Re: [PATCH v4 9/9] osstest: add FreeBSD Xen build job"):

Quoted 7 lines · Ian Jackson
Quoted 3 lines

The reason you want the osstest branch to be covered is that it is an input to this job. There is no protection against an un-covered input branches introducing a regression.

I'm attaching a patch below that adds a FreeBSD Xen build job to the osstest flights. I've also pushed the updated branch to my git repo:

Thanks. That LGTM.

Quoted 3 lines
Quoted 2 lines

Do you know what proportion of these are actually used by the FreeBSD Xen build ? All that are need this job adding to their own flights.

Quoted 7 lines
Quoted 2 lines

minios, ovmf and qemu is not used. I plan to add support for ovmf, but the rest (specially qemu-trad) will likely remain unused.

OK, good.

Feel free to add my acks everywhere they're missing and update your branch.

I've pushed it to:

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

Quoted 3 lines

I'm afraid I'm going to queue this behind a series I am working on to address continued poor throughput due to shortage of working armhf hosts.

NP.

Thanks, Roger.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel