From: Ian Jackson <ian.jackson@eu.citrix.com>
To: xen-devel@lists.xenproject.org
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>
Subject: [OSSTEST PATCH 11/24] host examination: Initial skeleton
Date: Thu, 18 May 2017 12:01:21 +0100 [thread overview]
Message-ID: <1495105294-25989-11-git-send-email-ian.jackson@eu.citrix.com> (raw)
In-Reply-To: <1495105294-25989-1-git-send-email-ian.jackson@eu.citrix.com>
Introduce an initial cut of job recipies host-examine-linux and
host-examine-xen, and a flight generation script which can make a
flight to examine all hosts with a particular blessing.
So far all this does is provide a way to make a flight which:
* Allocates each relevant host
* Installs Debian and, if applicable, Xen
* Reboots (if applicable, into Xen)
* Collects the logs to the flight log directory
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
make-hosts-flight | 113 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
sg-run-job | 30 +++++++++++++++
2 files changed, 143 insertions(+)
create mode 100755 make-hosts-flight
diff --git a/make-hosts-flight b/make-hosts-flight
new file mode 100755
index 0000000..bbd3343
--- /dev/null
+++ b/make-hosts-flight
@@ -0,0 +1,113 @@
+#!/bin/bash
+
+# This is part of "osstest", an automated testing framework for Xen.
+# Copyright (C) 2009-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/>.
+
+
+set -e -o posix
+
+branch=$1
+xenbranch=$2
+hostflags=$3
+blessing=$4
+buildflight=$5
+
+: ${ALL_ARCHES:=amd64 i386 arm64 armhf}
+: ${ALL_SUITES:=jessie stretch}
+
+flight=`./cs-flight-create $blessing $branch`
+
+. ./cri-common
+. ./ap-common
+. ./mfi-common
+
+defsuite=`getconfig DebianSuite`
+
+job_create_build_filter_callback () {
+ local job=$1; shift
+
+ case "$job" in
+ build-*-libvirt) return 1;;
+ esac
+ case " $* " in
+ *" enable_xsm=true "*) return 1;;
+ esac
+ return 0
+}
+
+build_matrix_branch_filter_callback () {
+ :
+}
+
+hosts_iterate () {
+ ./cs-hosts-list --arches=${ALL_ARCHES// /,} \
+ --suites=${ALL_SUITES// /,} \
+ $hostflags >tmp/$flight.hosts-list
+ exec 3<tmp/$flight.hosts-list
+
+ while read <&3 host kern arch suite; do
+ runvars="
+ arch=$arch host=$host
+ "
+
+ case $kern in
+ xen|linux)
+ local di_version=`getconfig_TftpDiVersion_suite $suite`
+ runvars+="
+ kernkind=pvops
+ all_host_di_version=$di_version
+ all_host_suite=$suite
+ "
+ ;;
+ esac
+
+ case $kern in
+ xen)
+ runvars+="
+ enable_xsm=false
+ buildjob=${bfi}build-$arch
+ xenbuildjob=${bfi}build-$arch
+ kernbuildjob=${bfi}build-$arch-pvops
+ toolstack=xl
+ "
+ ;;
+ esac
+
+ ./cs-job-create $flight examine-$host host-examine-$kern $runvars
+ done
+}
+
+if [ x$buildflight = x ]; then
+
+ WANT_XEND=false REVISION_LINUX_OLD=disable
+
+ create_build_jobs
+
+else
+
+ bfi=$buildflight.
+
+fi
+
+hosts_iterate
+
+echo $flight
+
+# Local variables:
+# mode: sh
+# sh-basic-offset: 2
+# indent-tabs-mode: nil
+# End:
diff --git a/sg-run-job b/sg-run-job
index 4fd7505..51dc2ec 100755
--- a/sg-run-job
+++ b/sg-run-job
@@ -498,6 +498,36 @@ if {[file exists sg-run-job-adhoc]} {
source sg-run-job-adhoc
}
+#---------- host examination recipes ----------
+
+proc examine-host-install-debian {} {
+ run-ts broken = ts-hosts-allocate + host
+ run-ts broken host-install ts-host-install-twice + host
+}
+proc examine-host-install-xen {} {
+ examine-host-install-debian
+ run-ts . = ts-xen-install + host
+ # examine-hosts-examine will do reboot
+}
+
+proc examine-host-examine {install} {
+ catching-otherwise fail {
+ examine-host-install-$install
+ run-ts . reboot ts-host-reboot + host
+ }
+ run-ts !broken capture-logs ts-logs-capture + host
+}
+
+proc need-hosts/host-examine-xen {} { return {} }
+proc run-job/host-examine-xen {} {
+ examine-host-examine xen
+}
+
+proc need-hosts/host-examine-linux {} { return {} }
+proc need-hosts/host-examine-linux {} {
+ examine-host-examine debian
+}
+
#---------- builds ----------
proc need-hosts/build {} { return BUILD }
--
2.1.4
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2017-05-18 11:02 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-18 11:01 [OSSTEST PATCH 01/24] README: Advise using `play' for playground flights Ian Jackson
2017-05-18 11:01 ` [OSSTEST PATCH 02/24] sg-report-flight: Do not report <none executed> unless it's true Ian Jackson
2017-05-18 11:01 ` [OSSTEST PATCH 03/24] cs-flight-create: Fix usage error message Ian Jackson
2017-05-23 13:58 ` Roger Pau Monné
2017-05-18 11:01 ` [OSSTEST PATCH 04/24] ts-hosts-allocate-Executive: tolerate lack of hostflags Ian Jackson
2017-05-18 11:01 ` [OSSTEST PATCH 05/24] tcmd: Work around ssh bug with `ssh host ""' Ian Jackson
2017-05-23 13:16 ` Roger Pau Monné
2017-05-23 13:53 ` Ian Jackson
2017-05-18 11:01 ` [OSSTEST PATCH 06/24] cs-hosts-list: New utility Ian Jackson
2017-05-23 13:23 ` Roger Pau Monné
2017-05-23 13:54 ` Ian Jackson
2017-05-23 14:12 ` Roger Pau Monné
2017-05-18 11:01 ` [OSSTEST PATCH 07/24] cs-hosts-list: Support --arches and --kernels Ian Jackson
2017-05-18 11:01 ` [OSSTEST PATCH 08/24] cs-hosts-list: Support --suites Ian Jackson
2017-05-23 14:25 ` Roger Pau Monné
2017-05-23 17:11 ` Ian Jackson
2017-05-18 11:01 ` [OSSTEST PATCH 09/24] cs-hosts-list, standalone-generate-dump-flight-runvars: make compatible Ian Jackson
2017-05-18 11:01 ` [OSSTEST PATCH 10/24] sg-run-job: new run-ts iffail syntax - Ian Jackson
2017-05-18 11:01 ` Ian Jackson [this message]
2017-05-18 11:01 ` [OSSTEST PATCH 12/24] Debian.pm: Break out setupboot_bootloader_edited_rune Ian Jackson
2017-05-18 11:01 ` [OSSTEST PATCH 13/24] TestSupport, Executive: Provide intended_blessing Ian Jackson
2017-05-18 11:01 ` [OSSTEST PATCH 14/24] host examination: Check that serial output is working Ian Jackson
2017-05-18 11:01 ` [OSSTEST PATCH 15/24] host examination: Permanently save the logs Ian Jackson
2017-05-18 11:01 ` [OSSTEST PATCH 16/24] ts-hosts-allocate-Executive: Honour hostalloc_maxwait_max Ian Jackson
2017-05-18 11:01 ` [OSSTEST PATCH 17/24] make-hosts-flight: Impose a timeout Ian Jackson
2017-05-18 11:01 ` [OSSTEST PATCH 18/24] cr-daily-branch: Move harness_rev definition Ian Jackson
2017-05-18 11:01 ` [OSSTEST PATCH 19/24] host examination: Add a check to many flights Ian Jackson
2017-05-18 11:01 ` [OSSTEST PATCH 20/24] host examination: Run a regular exam flight Ian Jackson
2017-05-18 11:01 ` [OSSTEST PATCH 21/24] host examination: serial, grub2: put cookie in menu lines Ian Jackson
2017-05-18 11:01 ` [OSSTEST PATCH 22/24] host examination: bootloader: Do not use ed Ian Jackson
2017-05-18 11:01 ` [OSSTEST PATCH 23/24] host examination: bootloader: edit all grub2 menu entries Ian Jackson
2017-05-18 11:01 ` [OSSTEST PATCH 24/24] host examination: bootloader: better handling of multiple runs Ian Jackson
2017-05-23 13:24 ` [OSSTEST PATCH 01/24] README: Advise using `play' for playground flights Roger Pau Monné
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1495105294-25989-11-git-send-email-ian.jackson@eu.citrix.com \
--to=ian.jackson@eu.citrix.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).