Skip to contentSkip to conversation

osstest: initial FreeBSD support

PATCH Superseded Roger Pau Monne 2 participants 7 messages Oct 27, 2017

v14 of 17 Superseded Latest is v17 →

lore
Share & tools
lore
#0 lore raw

v14 cover osstest: initial FreeBSD support

Hello,

These are the remaining FreeBSD host setup patches. I've only sent the ones that changed or are new in this version.

Branch can be found at:

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

Thanks, Roger.

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

#1 lore raw

PATCH v14 4/16 osstest: introduce host_shared_mark_ready

That allows marking a host as ready to be shared. Replace the current callers that open-code it.

---
Changes since v13:
- s/resource_shared_mark_ready/host_shared_mark_ready/.
- First argument of jobdb_resource_shared_mark_ready must be 'host'.

Changes since v4:
- New in this version.

---
 Osstest/TestSupport.pm  | 9 ++++++++-
 ts-freebsd-host-install | 4 ++--
 ts-xen-build-prep       | 4 ++--
 3 files changed, 12 insertions(+), 5 deletions(-)
Osstest/TestSupport.pm +8 -1
index c7cc8108..f28c8e4a 100644
@@ -134,7 +134,7 @@ BEGIN {
                       guest_editconfig_nocd
                       host_install_postboot_complete
                       target_core_dump_setup
-                      sha256file
+                      sha256file host_shared_mark_ready
                       );
     %EXPORT_TAGS = ( );
 
@@ -2815,4 +2815,11 @@ sub sha256file ($;$) {
     return $truncate ? substr($digest, 0, $truncate) : $digest;
 }
 
+sub host_shared_mark_ready($$) {
+    my ($ho,$sharetype) = @_;
+
+    $mjobdb->jobdb_resource_shared_mark_ready('host', $ho->{Name},
+                                              $sharetype);
+}
+
 1;
ts-freebsd-host-install +2 -2
index bfc693a1..735f7ff0 100755
@@ -279,5 +279,5 @@ setup_netboot_local($ho);
 # Proceed with the install
 install();
 
-resource_shared_mark_ready($ho, "build-freebsd-".
-                                sha256file("$path_prefix/install.img", 16));
+host_shared_mark_ready($ho, "build-freebsd-".
+                            sha256file("$path_prefix/install.img", 16));
ts-xen-build-prep +2 -2
index 3e98364a..22a3ce66 100755
@@ -273,5 +273,5 @@ if (!$ho->{Flags}{'no-reinstall'}) {
     ccache_setup();
     gitcache_setup();
 }
-$mjobdb->jobdb_resource_shared_mark_ready
-   ($ho->{Ident}, $ho->{Name}, "build-".$ho->{Suite}."-".$r{arch});
+
+host_shared_mark_ready($ho, "build-".$ho->{Suite}."-".$r{arch});
Signature · 7 lines
2.13.5 (Apple Git-94)


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Acked-by on v14 4/16
#2 lore raw

Re: [PATCH 04/16] osstest: introduce host_shared_mark_ready

Roger Pau Monne writes ("[PATCH 04/16] osstest: introduce host_shared_mark_ready"):

Quoted 8 lines

That allows marking a host as ready to be shared. Replace the current callers that open-code it.

---
Changes since v13:
- s/resource_shared_mark_ready/host_shared_mark_ready/.
- First argument of jobdb_resource_shared_mark_ready must be 'host'.

Although it would be good to mention that you are fixing a bug here, to wit the $ho->{Ident} to 'host' change.

Thanks,
Ian.

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

#3 lore raw

PATCH v14 12/16 osstest: add script to install build dependencies on FreeBSD

In reply to Roger Pau Monne

Since at the moment osstest only builds FreeBSD on FreeBSD, there are no dependencies to install. Just mark the host as ready to share.

---
 ts-build-prep-freebsd   | 37 +++++++++++++++++++++++++++++++++++++
 ts-freebsd-host-install |  3 ---
 2 files changed, 37 insertions(+), 3 deletions(-)
 create mode 100755 ts-build-prep-freebsd
ts-build-prep-freebsd new file +37 -0
new file mode 100755
index 00000000..1d78a3e1
@@ -0,0 +1,37 @@
+#!/usr/bin/perl -w
+# This is part of "osstest", an automated testing framework for Xen.
+# Copyright (C) 2017 Citrix Inc.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+use strict qw(vars);
+use DBI;
+use POSIX;
+
+unshift @INC, qw(.);
+use Osstest;
+use Osstest::TestSupport;
+
+tsreadconfig();
+
+our ($whhost) = @ARGV;
+$whhost ||= 'host';
+our $ho= selecthost($whhost);
+exit 0 if $ho->{SharedReady};
+
+our $path_prefix = $r{"freebsd_distpath"} ||
+                   get_stashed("path_freebsddist", $r{"freebsdbuildjob"});
+
+host_shared_mark_ready($ho, "build-freebsd-".
+                            sha256file("$path_prefix/install.img", 16));
ts-freebsd-host-install +0 -3
index 735f7ff0..447a5076 100755
@@ -278,6 +278,3 @@ setup_netboot_local($ho);
 
 # Proceed with the install
 install();
-
-host_shared_mark_ready($ho, "build-freebsd-".
-                            sha256file("$path_prefix/install.img", 16));
Signature · 7 lines
2.13.5 (Apple Git-94)


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Acked-by on v14 12/16
#4 lore raw

Re: [PATCH 12/16] osstest: add script to install build dependencies on FreeBSD

Roger Pau Monne writes ("[PATCH 12/16] osstest: add script to install build dependencies on FreeBSD"):

Quoted 2 lines

Since at the moment osstest only builds FreeBSD on FreeBSD, there are no dependencies to install. Just mark the host as ready to share.

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

#5 lore raw

PATCH v14 14/16 osstest: add support for FreeBSD buildjobs to sg-run-job

In reply to Roger Pau Monne

Add support and introduce a FreeBSD build job to sg-run-job.

---
Changes since v13:
- Run ts-build-prep-freebsd for FreeBSD build host setup.

Changes since v5:
- Add a '+' to the arguments passed to ts-freebsd-set-hostflags, so they are hidden from testid.

Changes since v4:
- Use a switch in allocate-build-host.

Changes since v3:
- New in this version (split from existing patch).

---
 sg-run-job | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
sg-run-job +15 -0
index 17cf6c4a..bb59b109 100755
@@ -683,6 +683,7 @@ proc need-hosts/build-kern {}           { return BUILD_LINUX }
 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 run-job/build {} {
     run-ts . = ts-xen-build
@@ -709,8 +710,16 @@ proc run-job/build-xtf {} {
     run-ts . = ts-xtf-build
 }
 
+proc run-job/build-freebsd {} {
+    run-ts . = ts-freebsd-build
+}
+
 proc allocate-build-host {ostype} {
     global jobinfo
+    switch -exact $ostype {
+        FREEBSD { run-ts broken = ts-freebsd-set-hostflags + --share host }
+        default {}
+    }
     run-ts broken = ts-hosts-allocate + host
 }
 proc prepare-build-host-linux {} {
@@ -719,6 +728,12 @@ proc prepare-build-host-linux {} {
     run-ts . host-build-prep ts-xen-build-prep
 }
 
+proc prepare-build-host-freebsd {} {
+    global jobinfo
+    run-ts broken host-install(*) ts-freebsd-host-install
+    run-ts . host-build-prep ts-build-prep-freebsd
+}
+
 proc need-hosts/coverity {} { return BUILD_LINUX }
 proc run-job/coverity {} {
     run-ts . = ts-coverity-build + host
Signature · 7 lines
2.13.5 (Apple Git-94)


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