osstest: initial FreeBSD support
v7 cover osstest: initial FreeBSD support
Hello,
Note that this thread only contains the patches that need an ack or have been modified in some way between v6 and v7. This is done in order to prevent spamming the list with already acked patches for such long series. The full series can be found at:
git://xenbits.xen.org/people/royger/osstest.git freebsd_v7
This includes Ian's mg-anoint series.
The procedure to enable this in production mode (ie: on the mass osstest instance) is as follows:
1. Make the memdisk binary available from the tftp path. This is described in patch 5.
2. Pick the output from a previous FreeBSD build and make it available to the osstest controller. I'm currently running a flight that should create a suitable installer for the mass osstest instance (should contain the right ssh authorized keys). Taking the output of flight 71726 as an example, the contents of the build folder [0] should be copied to the osstest controller. The following path hierarchy should be used:
<FREEBSD_DIST>/amd64/{install.img,MANIFEST,base.txz,kernel.txz}[watch this space for the path to the new images]
3. The path in FREEBSD_DIST described above should be set on the environment, together with FREEBSD_VERSION:
export FREEBSD_DIST=<FREEBSD_DIST>
export FREEBSD_VERSION=12
4. Run cr-daily-branch to create the first build output:
./cr-daily-branch freebsd-master
5. Prepare and anoint the first build (provided the previous step 4. is successful):
./mg-anoint prepare 'freebsd build master amd64' 'FreeBSD HEAD amd64 builds' ./mg-anoint anoint --allow-blessed=play 'freebsd build master amd64' $flight build-amd64-freebsd
6. Unset FREEBSD_DIST and FREEBSD_VERSION.
Thanks, Roger.
[0] http://osstest.xs.citrite.net/~osstest/testlogs/logs/71726/build-amd64-freebsd/build/
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
PATCH v7 11/20 osstest: introduce an OS $ho field
In order to differentiate between FreeBSD and Debian hosts.
---
Changes since v6:
- New in this version
--- Osstest/TestSupport.pm | 1 + 1 file changed, 1 insertion(+)
Osstest/TestSupport.pm +1 -0
@@ -983,6 +983,7 @@ sub selecthost ($) { $ho->{Suite} = target_var($ho, "suite") // $c{DebianSuite}; $ho->{DiVersion} = target_var($ho, "di_version") // cfg_tftp_di_version($ho->{Suite}); + $ho->{Os} = target_var($ho, "os") // "debian"; } #----- handle hosts which are themselves guests (nested) -----
Signature · 7 lines
2.11.0 (Apple Git-81) _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Re: [PATCH v7 11/20] osstest: introduce an OS $ho field
Roger Pau Monne writes ("[PATCH v7 11/20] osstest: introduce an OS $ho field"):
Quoted 1 line
In order to differentiate between FreeBSD and Debian hosts.
...
Quoted 1 line
+ $ho->{Os} =
target_var($ho, "os")// "debian";
I will change this to "OS" when committing, if you don't first.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
PATCH v7 12/20 osstest: add support for the FreeBSD package manager
In reply to Roger Pau MonneFreeBSD support is added to target_install_packages and target_install_packages_norec, although there's no equivalent to the --no-install-recommends in the FreeBSD package manager.
---
Changes since v6:
- Use $ho->{Os} in order to detect the target OS.
Changes since v5:
- Add prototype for package_install_cmd.
- Use $ho->{Ident} instead of hardcoding "host" in get_hostflags.
Changes since v4:
- Unify more code between FreeBSD and Debian: introduce an OS-agnostic package_install_cmd to generate the install cmd.
Changes since v3:
- New in this version.
--- Osstest/TestSupport.pm | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-)
Osstest/TestSupport.pm +21 -8
@@ -68,7 +68,6 @@ BEGIN { http_proxy_envsettings target_editfile_root target_file_exists target_editfile_kvp_replace - target_run_apt target_install_packages target_install_packages_norec target_jobdir target_extract_jobdistpath_subdir target_extract_jobdistpath target_tftp_prefix
@@ -523,19 +522,33 @@ sub target_putfile ($$$$;$) { sub target_putfile_root ($$$$;$) { tputfileex('root', @_); } -sub target_run_apt { - my ($ho, @aptopts) = @_; - target_cmd_root($ho, - "DEBIAN_PRIORITY=critical UCF_FORCE_CONFFOLD=y \\ - with-lock-ex -w /var/lock/osstest-apt apt-get @aptopts", 3000); + +sub package_install_cmd ($;$) { + my ($ho, $norec) = @_; + my @cmd; + + if ($ho->{Os} eq "freebsd") { + push @cmd, qw(lockf /var/run/osstest-pkg-lock pkg-static install); + } else { + push @cmd, qw(DEBIAN_PRIORITY=critical UCF_FORCE_CONFFOLD=y + with-lock-ex -w /var/lock/osstest-apt apt-get); + push @cmd, qw(--no-install-recommends) if $norec; + push @cmd, qw(-y install); + } + + return @cmd; } sub target_install_packages ($@) { my ($ho, @packages) = @_; - target_run_apt($ho, qw(-y install), @packages); + my @cmd = package_install_cmd($ho); + + target_cmd_root($ho,"@cmd @packages", 3000); } sub target_install_packages_norec ($@) { my ($ho, @packages) = @_; - target_run_apt($ho, qw(--no-install-recommends -y install), @packages); + my @cmd = package_install_cmd($ho, 1); + + target_cmd_root($ho,"@cmd @packages", 3000); } sub target_somefile_getleaf ($$$) {
Signature · 7 lines
2.11.0 (Apple Git-81) _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
PATCH v7 18/20 osstest: introduce a script to create a FreeBSD flight
In reply to Roger Pau MonneThe logic to create a FreeBSD build job is added to make-freebsd-flight. This includes creating a FreeBSD build job, and also testing the output of that build job (by creating another build job that depends on the output of the first).
Note that the FreeBSD build job needs some input in order to setup a FreeBSD host, and that can be fetched from different places:
1. Env variable FREEBSD_<arch>_BUILDJOB: use the output from a previous build-<arch>-freebsd job.
2. Env variables FREEBSD_DIST and FREEBSD_VERSION: set before calling into make-flight, provide the path to the installer image and sets folder and the version being installed.
3. Config file FreeBSDDist and FreeBSDVersion: same as 2. except that they are set on the config file.
---
Changes since v6:
- Re-wrap lines.
- Remove the freebsd hostflag.
- Do not set the FreeBSD git trees in this patch.
- Set all_host_os runvar to freebsd for the FreeBSD build jobs.
Changes since v5:
- Append the "freebsd" hostflag, the specific version will be set dynamically by the ts-freebsd-set-hostflags script.
- Use FREEBSD_<arch>_BUILDJOB to set the freebsdbuildjob runvar.
- Loop around arches, although only amd64 is supported ATM. This should make it easier to add more arches later on.
- Expand README comment to describe the expected layout of the FreeBSD install media.
Changes since v4:
- Convert get_freebsdjob_runvars into set_freebsd_runvars, mimic the behavior of set_hostos_runvars.
Changes since v3:
- Split the sg-run-job code into pre-patches.
Changes since v1:
- Replace freebsd_buildjob with freebsdbuildjob.
- Replace FREEBSD_SETS/IMAGE with a single FREEBSD_DIST that points to a folder that should contain both things.
- Document the FreeBSDDist and FreeBSDVersion config file options in the README file.
--- README | 16 +++++++++ make-freebsd-flight | 95 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 111 insertions(+) create mode 100755 make-freebsd-flight
README +16 -0
@@ -423,6 +423,22 @@ HostGroupFlags_<group> DebianPreseed Text to add to the debian-installer preseed file. Optional. +FreeBSDDist + Path to the folder(s) that contain the FreeBSD install image and + the FreeBSD compressed install sets, together with the MANIFEST + file that holds the checksums. This is required in order to run + a FreeBSD host install if no previous FreeBSD buildjob is + available (ie: for example when running in standalone mode). + The layout expected by osstest is the following: + <FreeBSDDist>/<arch>/install.img + <FreeBSDDist>/<arch>/base.txz + <FreeBSDDist>/<arch>/kernel.txz + <FreeBSDDist>/<arch>/MANIFEST + +FreeBSDVersion + Numeric value holding the major FreeBSD version of the media + provided in FreeBSDDist (ie: 12). + ======================================== Config settings relevant only to standalone mode
make-freebsd-flight new file +95 -0
95 lines not on this page · raw message
Signature · 7 lines
2.11.0 (Apple Git-81) _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Re: [PATCH v7 18/20] osstest: introduce a script to create a FreeBSD flight
Roger Pau Monne writes ("[PATCH v7 18/20] osstest: introduce a script to create a FreeBSD flight"):
Quoted 11 lines
The logic to create a FreeBSD build job is added to make-freebsd-flight. This includes creating a FreeBSD build job, and also testing the output of that build job (by creating another build job that depends on the output of the first).
Note that the FreeBSD build job needs some input in order to setup a FreeBSD host, and that can be fetched from different places:
1. Env variable FREEBSD_<arch>_BUILDJOB: use the output from a previous build-<arch>-freebsd job.
Quoted 6 lines
2. Env variables
FREEBSD_DISTandFREEBSD_VERSION: set before calling into make-flight, provide the path to the installer image and sets folder and the version being installed.3. Config file FreeBSDDist and FreeBSDVersion: same as 2. except that they are set on the config file.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
PATCH v7 19/20 osstest: hook FreeBSD flight into cr-daily-branch
In reply to Roger Pau MonneAdd the missing pieces so that cr-daily-branch knows how to create a FreeBSD flight. This has been tested by calling ./cr-daily-branch freebsd-master.
Note that there are two missing pieces. The first one is correctly setting the FREEBSD_<arch>_BUILDJOB environment variable when calling make-freebsd-flight, without it the installer media will always be picked from the configuration file. This requires keeping track of previous FreeBSD successful build jobs, marking them as permanent and fetching them from the database in order to pass them on the env variable.
---
Changes since v6:
- Set the path to the FreeBSD git trees in this patch.
- Push to tested/master or tested/stable/<version> instead of using the same branches as the origin tree.
Changes since v5:
- Add support for testing multiple FreeBSD branches, default to branch master.
Changes since v3:
- Fix the daily-cron-email-* settings for FreeBSD branch flights.
--- ap-common | 5 +++++ ap-fetch-version | 8 ++++++++ ap-fetch-version-old | 9 +++++++++ ap-print-url | 3 +++ ap-push | 9 +++++++++ cr-daily-branch | 17 +++++++++++++++++ cr-for-branches | 2 +- cri-common | 1 + daily-cron-email-adhoc--freebsd-master | 1 + daily-cron-email-play--freebsd-master | 1 + daily-cron-email-real--freebsd-master | 4 ++++ 11 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 daily-cron-email-adhoc--freebsd-master create mode 100644 daily-cron-email-play--freebsd-master create mode 100644 daily-cron-email-real--freebsd-master
ap-common +5 -0
@@ -37,6 +37,10 @@ : ${PUSH_TREE_XTF:=$XENBITS:/home/xen/git/xtf.git} : ${BASE_TREE_XTF:=git://xenbits.xen.org/xtf.git} +: ${TREE_FREEBSD:=git://github.com/freebsd/freebsd.git} +: ${PUSH_TREE_FREEBSD:=$XENBITS:/home/xen/git/freebsd.git} +: ${BASE_TREE_FREEBSD:=git://xenbits.xen.org/freebsd.git} + : ${TREE_LIBVIRT:=git://libvirt.org/libvirt.git} : ${PUSH_TREE_LIBVIRT:=$XENBITS:/home/xen/git/libvirt.git} : ${BASE_TREE_LIBVIRT:=git://xenbits.xen.org/libvirt.git}
@@ -82,6 +86,7 @@ fi : ${LOCALREV_SEABIOS:=daily-cron.$branch} : ${LOCALREV_OVMF:=daily-cron.$branch} : ${LOCALREV_XTF:=daily-cron.$branch} +: ${LOCALREV_FREEBSD:=daily-cron.$branch} : ${TREEBASE_LINUX_XCP:=http://hg.uk.xensource.com/carbon/trunk/linux-2.6.27}
ap-fetch-version +8 -0
@@ -106,6 +106,14 @@ ovmf) repo_tree_rev_fetch_git ovmf \ $TREE_OVMF_UPSTREAM master $LOCALREV_OVMF ;; +freebsd-*) + branchcore=${branch#freebsd-} + if [ "x$branchcore" != "xmaster" ]; then + branchcore="stable/$branchcore" + fi + repo_tree_rev_fetch_git freebsd \ + $TREE_FREEBSD $branchcore $LOCALREV_FREEBSD + ;; osstest) if [ "x$OSSTEST_USE_HEAD" = "xy" ] ; then git update-ref -m "Arranging to test HEAD" \
ap-fetch-version-old +9 -0
@@ -34,6 +34,7 @@ check_ap_fetch_placeholders : ${BASE_LOCALREV_SEABIOS:=daily-cron.$branch.old} : ${BASE_LOCALREV_XTF:=daily-cron.$branch.old} : ${BASE_LOCALREV_OVMF:=daily-cron.$branch.old} +: ${BASE_LOCALREV_FREEBSD:=daily-cron.$branch.old} : ${BASE_TAG_LIBVIRT:=xen-tested-master} if info_linux_tree "$branch"; then
@@ -114,6 +115,14 @@ ovmf) repo_tree_rev_fetch_git ovmf \ $BASE_TREE_OVMF xen-tested-master $BASE_LOCALREV_OVMF ;; +freebsd-*) + branchcore=${branch#freebsd-} + if [ "x$branchcore" != "xmaster" ]; then + branchcore="stable/$branchcore" + fi + repo_tree_rev_fetch_git freebsd \ + $BASE_TREE_FREEBSD $branchcore $BASE_LOCALREV_FREEBSD + ;; osstest) if [ "x$OSSTEST_USE_HEAD" != "xy" ] ; then git fetch -f $HOME/testing.git production:ap-fetch
ap-print-url +3 -0
@@ -64,6 +64,9 @@ xtf) ovmf) echo $TREE_OVMF_UPSTREAM ;; +freebsd-*) + echo $TREE_FREEBSD + ;; osstest) echo none:; ;;
ap-push +9 -0
@@ -41,6 +41,7 @@ TREE_RUMPRUN=$PUSH_TREE_RUMPRUN TREE_SEABIOS=$PUSH_TREE_SEABIOS TREE_OVMF=$PUSH_TREE_OVMF TREE_XTF=$PUSH_TREE_XTF +TREE_FREEBSD=$PUSH_TREE_FREEBSD if info_linux_tree "$branch"; then cd $repos/linux
@@ -125,6 +126,14 @@ xtf) cd $repos/xtf git push $TREE_XTF $revision:refs/heads/xen-tested-master ;; +freebsd-*) + branchcore=${branch#freebsd-} + if [ "x$branchcore" != "xmaster" ]; then + branchcore="stable/$branchcore" + fi + cd $repos/freebsd + git push $TREE_FREEBSD $revision:refs/heads/tested/$branchcore + ;; ovmf) cd $repos/ovmf git push $TREE_OVMF $revision:refs/heads/xen-tested-master
cr-daily-branch +17 -0
@@ -207,6 +207,18 @@ if [ "x$REVISION_LINUXFIRMWARE" = x ]; then determine_version REVISION_LINUXFIRMWARE linuxfirmware LINUXFIRMWARE export REVISION_LINUXFIRMWARE fi +if [ "x$REVISION_FREEBSD" = x ]; then + case "$branch" in + freebsd-*) + determine_version REVISION_FREEBSD "$branch" FREEBSD + ;; + *) + determine_version REVISION_FREEBSD freebsd-master FREEBSD + ;; + esac + + export REVISION_FREEBSD +fi case "$tree" in xen)
@@ -255,6 +267,10 @@ ovmf) realtree=ovmf NEW_REVISION=$REVISION_OVMF ;; +freebsd) + realtree=freebsd + NEW_REVISION=$REVISION_FREEBSD + ;; *) NEW_REVISION='' wantpush=false
@@ -274,6 +290,7 @@ examine) makeflight=make_hosts_flight ./make-hosts-flight $1 $2 blessed-$3 $3 $4 } ;; +freebsd-*) makeflight=./make-freebsd-flight ;; *) makeflight=./make-flight ;; esac
cr-for-branches +1 -1
@@ -31,7 +31,7 @@ scriptoptions="$1"; shift LOGFILE=tmp/cr-for-branches.log export LOGFILE -: ${BRANCHES:=osstest xen-4.0-testing xen-4.1-testing xen-4.2-testing xen-4.3-testing xen-4.4-testing xen-4.5-testing xen-4.6-testing xen-4.7-testing xen-4.8-testing xen-4.9-testing xen-unstable qemu-mainline qemu-upstream-unstable qemu-upstream-4.2-testing qemu-upstream-4.3-testing qemu-upstream-4.4-testing qemu-upstream-4.5-testing qemu-upstream-4.6-testing qemu-upstream-4.7-testing qemu-upstream-4.8-testing qemu-upstream-4.9-testing linux-linus linux-4.9 linux-4.1 linux-3.18 linux-3.16 linux-3.14 linux-3.10 linux-3.4 linux-arm-xen seabios ovmf xtf ${EXTRA_BRANCHES}} +: ${BRANCHES:=osstest xen-4.0-testing xen-4.1-testing xen-4.2-testing xen-4.3-testing xen-4.4-testing xen-4.5-testing xen-4.6-testing xen-4.7-testing xen-4.8-testing xen-4.9-testing xen-unstable qemu-mainline qemu-upstream-unstable qemu-upstream-4.2-testing qemu-upstream-4.3-testing qemu-upstream-4.4-testing qemu-upstream-4.5-testing qemu-upstream-4.6-testing qemu-upstream-4.7-testing qemu-upstream-4.8-testing qemu-upstream-4.9-testing linux-linus linux-4.9 linux-4.1 linux-3.18 linux-3.16 linux-3.14 linux-3.10 linux-3.4 linux-arm-xen seabios ovmf xtf freebsd-master ${EXTRA_BRANCHES}} export BRANCHES fetchwlem=$wlem
cri-common +1 -0
@@ -80,6 +80,7 @@ select_xenbranch () { seabios) tree=seabios; xenbranch=xen-unstable ;; xtf) tree=xtf; xenbranch=xen-unstable ;; ovmf) tree=ovmf; xenbranch=xen-unstable ;; + freebsd-*) tree=freebsd; xenbranch=xen-unstable ;; distros-*|examine) tree=none; xenbranch=xen-unstable ;; osstest) tree=osstest; xenbranch=xen-unstable ;; esac
daily-cron-email-adhoc--freebsd-master new file +1 -0
@@ -0,0 +1 @@ +To: [email protected]
daily-cron-email-play--freebsd-master new file +1 -0
@@ -0,0 +1 @@ +To: [email protected]
daily-cron-email-real--freebsd-master new file +4 -0
@@ -0,0 +1,4 @@ +To: [email protected], + [email protected], + [email protected] +Bcc: [email protected]
Signature · 7 lines
2.11.0 (Apple Git-81) _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Re: [PATCH v7 19/20] osstest: hook FreeBSD flight into cr-daily-branch
Roger Pau Monne writes ("[PATCH v7 19/20] osstest: hook FreeBSD flight into cr-daily-branch"):
Quoted 3 lines
Add the missing pieces so that cr-daily-branch knows how to create a FreeBSD flight. This has been tested by calling
./cr-daily-branch freebsd-master.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
PATCH v7 20/20 osstest: save/retrieve the last successfully tested FreeBSD build
In reply to Roger Pau MonneAnd use it in order to install the hosts for the next FreeBSD flight.
Note that the anoints are done after the push, but there's a recovery mechanism in case osstest manages to do a successful push, but the artifacts are not anointed for some reason. Osstest will continue to create flights until the revision of the anointed artifacts matches the one pushed to the repository (even if that means running flights with OLD_REVISION == NEW_REVISION).
---
Changes since v6:
- Use just the branch name for anoint (instead of freebsd-$branch).
- Force the creation of flights if the revision of the current anoints don't match OLD_VERSION.
- Iterate over the list of current anoints instead of open-coding the arches.
- Split the retrieve/anoint code blocks into it's own sections.
Changes since v5:
- New in this version.
--- cr-daily-branch | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+)
cr-daily-branch +68 -0
@@ -126,6 +126,34 @@ elif [ "x$OSSTEST_NO_BASELINE" != xy ] ; then fi fi +# For convenience set a global variable with the FreeBSD branch +# under test, so that we don't need to repeat this in several +# places +case "$branch" in +freebsd-*) freebsd_branch=${branch#freebsd-} ;; +*) freebsd_branch=master ;; +esac + +case "$branch" in +freebsd-*) + IFS=$'\n' + for anointed in \ + `./mg-anoint list-prepared "freebsd build $freebsd_branch*"`; do + # Check if the anointed version matches OLD_VERSION, + # or else force a new flight, even if OLD_REVISION matches + # NEW_REVISION. + flight_job=`./mg-anoint retrieve "$anointed"` + anointed_revision=`check_tested --flight=${flight_job%% *} \ + --print-revision=$tree` + if [ "x$anointed_revision" != "x$OLD_REVISION" ]; then + skipidentical=false + break + fi + done + unset IFS + ;; +esac + if [ "x$REVISION_XEN" = x ]; then REVISION_XEN="`fetch_version $xenbranch`" export REVISION_XEN
@@ -277,6 +305,19 @@ freebsd) ;; esac +IFS=$'\n' +for anointed in \ + `./mg-anoint list-prepared "freebsd build $freebsd_branch*"`; do + # Retrieve previous successful FreeBSD build for each arch. + freebsd_arch=${anointed##* } + freebsd_envvar="FREEBSD_${freebsd_arch^^}_BUILDJOB" + if [ "x${!freebsd_envvar}" = "x" ]; then + flight_job=`./mg-anoint retrieve "$anointed"` + export ${freebsd_envvar}=${flight_job/ /.} + fi +done +unset IFS + if [ "x$OLD_REVISION" = xdetermine-late ]; then OLD_REVISION="`\ $AP_FETCH_PFX ./ap-fetch-version-baseline-late $branch $NEW_REVISION`"
@@ -476,6 +517,33 @@ else echo fi +# Do the anoints after the push: if for some reason this fails, +# and osstest ends up with a pushed revision that doesn't match +# the latest anointed artifact a new flight will be run regardless +# of whether OLD_REVISION == NEW_REVISION. +case "$branch" in +freebsd-*) + if grep '^tolerable$' $mrof >/dev/null 2>&1 && $OSSTEST_ANOINT && + [ "x$OSSTEST_BLESSING" == "xreal" ]; then + IFS=$'\n' + for anointed in `./mg-anoint list-prepared \ + "freebsd build $freebsd_branch*"`; do + # Update anointed versions + # NB: failure to update an anointed build for a specific arch + # should not be fatal, and it's not an issue if one of the + # arches gets slightly out of sync with the other ones. + freebsd_arch=${anointed##* } + if ./mg-anoint anoint \ + "freebsd build $freebsd_branch $freebsd_arch" \ + $flight build-$freebsd_arch-freebsd; then + echo "Anointed artifacts from build-$freebsd_arch-freebsd" + fi + done + unset IFS + fi + ;; +esac + if [ -f $revlog ]; then revlog_lines=`wc -l <$revlog` if [ $revlog_lines -lt 300 ]; then
Signature · 7 lines
2.11.0 (Apple Git-81) _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Re: [PATCH v7 20/20] osstest: save/retrieve the last successfully tested FreeBSD build
Roger Pau Monne writes ("[PATCH v7 20/20] osstest: save/retrieve the last successfully tested FreeBSD build"):
Quoted 1 line
And use it in order to install the hosts for the next FreeBSD flight.
...
cr-daily-branch elif [ "x$OSSTEST_NO_BASELINE" != xy ] ; then · line 139
Quoted 3 lines
cr-daily-branch +3
-0+case "$branch" in +freebsd-*) + IFS=$'\n'
That's quite brave, but I don't object. I would have piped the output into `read' or something.
Quoted 1 line
+ for anointed in \> +
./mg-anoint list-prepared "freebsd build $freebsd_branch*"; do
^
I think there is a missing space between $freebsd_branch and * ?
cr-daily-branch freebsd) · line 319
Quoted 12 lines
cr-daily-branch +12
-0+IFS=$'\n' +for anointed in \ + `./mg-anoint list-prepared "freebsd build $freebsd_branch*"`; do + # Retrieve previous successful FreeBSD build for each arch. + freebsd_arch=${anointed##* } + freebsd_envvar="FREEBSD_${freebsd_arch^^}_BUILDJOB" + if [ "x${!freebsd_envvar}" = "x" ]; then + flight_job=`./mg-anoint retrieve "$anointed"` + export ${freebsd_envvar}=${flight_job/ /.} + fi +done +unset IFS
LGTM apart from the same missing space.
So if you add those spaces:
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [PATCH v7 20/20] osstest: save/retrieve the last successfully tested FreeBSD build
Quoted 9 lines · Ian Jackson
Roger Pau Monne writes ("[PATCH v7 20/20] osstest: save/retrieve the last successfully tested FreeBSD build"):
Quoted 1 line
And use it in order to install the hosts for the next FreeBSD flight.
...
cr-daily-branch elif [ "x$OSSTEST_NO_BASELINE" != xy ] ; then · line 139
Quoted 3 lines
cr-daily-branch +3
-0+case "$branch" in +freebsd-*) + IFS=$'\n'That's quite brave, but I don't object. I would have piped the output into `read' or something.
Yes, I think that would be better, let me do that as a patch on top of this afterwards. I'm currently building the new images and I cannot play freely with osstest ATM.
Quoted 19 lines
Quoted 1 line
+ for anointed in \> +
./mg-anoint list-prepared "freebsd build $freebsd_branch*"; do^I think there is a missing space between $freebsd_branch and * ?
cr-daily-branch freebsd) · line 319
Quoted 12 lines
cr-daily-branch +12
-0+IFS=$'\n' +for anointed in \ + `./mg-anoint list-prepared "freebsd build $freebsd_branch*"`; do + # Retrieve previous successful FreeBSD build for each arch. + freebsd_arch=${anointed##* } + freebsd_envvar="FREEBSD_${freebsd_arch^^}_BUILDJOB" + if [ "x${!freebsd_envvar}" = "x" ]; then + flight_job=`./mg-anoint retrieve "$anointed"` + export ${freebsd_envvar}=${flight_job/ /.} + fi +done +unset IFSLGTM apart from the same missing space.
Quoted 3 lines
So if you add those spaces:
Acked-by Ian Jackson <[email protected]>
Thanks, I've now pushed this (also with the other acks) to:
git://xenbits.xen.org/people/royger/osstest.git freebsd_v8
Roger.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [PATCH v7 20/20] osstest: save/retrieve the last successfully tested FreeBSD build
In reply to Ian JacksonQuoted 9 lines · Ian Jackson
Roger Pau Monne writes ("[PATCH v7 20/20] osstest: save/retrieve the last successfully tested FreeBSD build"):
Quoted 1 line
And use it in order to install the hosts for the next FreeBSD flight.
...
Review
Quoted 3 lines
(quoted diff) +3
-0+case "$branch" in +freebsd-*) + IFS=$'\n'That's quite brave, but I don't object. I would have piped the output into `read' or something.
I have the following which can be applied on top and is IMHO better, I also don't fancy playing with IFS. I can push a new branch with this folded if that's more convenient.
---8<---
cr-daily-branch +7 -15
@@ -136,9 +136,7 @@ esac case "$branch" in freebsd-*) - IFS=$'\n' - for anointed in \ - `./mg-anoint list-prepared "freebsd build $freebsd_branch *"`; do + while read anointed; do # Check if the anointed version matches OLD_VERSION, # or else force a new flight, even if OLD_REVISION matches # NEW_REVISION.
@@ -149,8 +147,7 @@ freebsd-*) skipidentical=false break fi - done - unset IFS + done <<< `./mg-anoint list-prepared "freebsd build $freebsd_branch *"` ;; esac
@@ -305,9 +302,7 @@ freebsd) ;; esac -IFS=$'\n' -for anointed in \ - `./mg-anoint list-prepared "freebsd build $freebsd_branch *"`; do +while read anointed; do # Retrieve previous successful FreeBSD build for each arch. freebsd_arch=${anointed##* } freebsd_envvar="FREEBSD_${freebsd_arch^^}_BUILDJOB"
@@ -315,8 +310,7 @@ for anointed in \ flight_job=`./mg-anoint retrieve "$anointed"` export ${freebsd_envvar}=${flight_job/ /.} fi -done -unset IFS +done <<< `./mg-anoint list-prepared "freebsd build $freebsd_branch *"` if [ "x$OLD_REVISION" = xdetermine-late ]; then OLD_REVISION="`\
@@ -525,9 +519,7 @@ case "$branch" in freebsd-*) if grep '^tolerable$' $mrof >/dev/null 2>&1 && $OSSTEST_ANOINT && [ "x$OSSTEST_BLESSING" == "xreal" ]; then - IFS=$'\n' - for anointed in `./mg-anoint list-prepared \ - "freebsd build $freebsd_branch *"`; do + while read anointed; do # Update anointed versions # NB: failure to update an anointed build for a specific arch # should not be fatal, and it's not an issue if one of the
@@ -537,8 +529,8 @@ freebsd-*) $flight build-$freebsd_arch-freebsd; then echo "Anointed artifacts from build-$freebsd_arch-freebsd" fi - done - unset IFS + done <<< `./mg-anoint list-prepared \ + "freebsd build $freebsd_branch *"` fi ;; esac
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [PATCH v7 20/20] osstest: save/retrieve the last successfully tested FreeBSD build
Quoted 11 lines · Roger Pau Monne
Quoted 9 lines · Ian Jackson
Roger Pau Monne writes ("[PATCH v7 20/20] osstest: save/retrieve the last successfully tested FreeBSD build"):
Quoted 1 line
And use it in order to install the hosts for the next FreeBSD flight.
...
Review
Quoted 3 lines
(quoted diff) +3
-0+case "$branch" in +freebsd-*) + IFS=$'\n'That's quite brave, but I don't object. I would have piped the output into `read' or something.
Quoted 3 lines
I have the following which can be applied on top and is IMHO better, I also don't fancy playing with IFS. I can push a new branch with this folded if that's more convenient.
After our IRC conversation about here strings and failure, the following one using pipes is probably better.
---8<---
cr-daily-branch +6 -12
@@ -136,9 +136,8 @@ esac case "$branch" in freebsd-*) - IFS=$'\n' - for anointed in \ - `./mg-anoint list-prepared "freebsd build $freebsd_branch *"`; do + ./mg-anoint list-prepared "freebsd build $freebsd_branch *" | \ + while read anointed; do # Check if the anointed version matches OLD_VERSION, # or else force a new flight, even if OLD_REVISION matches # NEW_REVISION.
@@ -150,7 +149,6 @@ freebsd-*) break fi done - unset IFS ;; esac
@@ -305,9 +303,8 @@ freebsd) ;; esac -IFS=$'\n' -for anointed in \ - `./mg-anoint list-prepared "freebsd build $freebsd_branch *"`; do +./mg-anoint list-prepared "freebsd build $freebsd_branch *" | \ +while read anointed; do # Retrieve previous successful FreeBSD build for each arch. freebsd_arch=${anointed##* } freebsd_envvar="FREEBSD_${freebsd_arch^^}_BUILDJOB"
@@ -316,7 +313,6 @@ for anointed in \ export ${freebsd_envvar}=${flight_job/ /.} fi done -unset IFS if [ "x$OLD_REVISION" = xdetermine-late ]; then OLD_REVISION="`\
@@ -525,9 +521,8 @@ case "$branch" in freebsd-*) if grep '^tolerable$' $mrof >/dev/null 2>&1 && $OSSTEST_ANOINT && [ "x$OSSTEST_BLESSING" == "xreal" ]; then - IFS=$'\n' - for anointed in `./mg-anoint list-prepared \ - "freebsd build $freebsd_branch *"`; do + ./mg-anoint list-prepared "freebsd build $freebsd_branch *" | \ + while read anointed; do # Update anointed versions # NB: failure to update an anointed build for a specific arch # should not be fatal, and it's not an issue if one of the
@@ -538,7 +533,6 @@ freebsd-*) echo "Anointed artifacts from build-$freebsd_arch-freebsd" fi done - unset IFS fi ;; esac
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 25 lines · Roger Pau Monne
Hello,
Note that this thread only contains the patches that need an ack or have been modified in some way between v6 and v7. This is done in order to prevent spamming the list with already acked patches for such long series. The full series can be found at:
git://xenbits.xen.org/people/royger/osstest.gitfreebsd_v7This includes Ian's mg-anoint series.
The procedure to enable this in production mode (ie: on the mass osstest instance) is as follows:
1. Make the memdisk binary available from the tftp path. This is described in patch 5.
2. Pick the output from a previous FreeBSD build and make it available to the osstest controller. I'm currently running a flight that should create a suitable installer for the mass osstest instance (should contain the right ssh authorized keys). Taking the output of flight 71726 as an example, the contents of the build folder [0] should be copied to the osstest controller. The following path hierarchy should be used:
Quoted 2 lines
<FREEBSD_DIST>/amd64/{install.img,MANIFEST,base.txz,kernel.txz}The flight has finished successfully and the images are at:
http://osstest.xs.citrite.net/~osstest/testlogs/logs/71750/build-amd64-freebsd/build/
FYI, the summary of the flight:
http://osstest.xs.citrite.net/~osstest/testlogs/logs/71750/
I've already anointed those in the cam osstest instance.
Quoted 21 lines
3. The path in
FREEBSD_DISTdescribed above should be set on the environment, together withFREEBSD_VERSION:export FREEBSD_DIST=<FREEBSD_DIST>
export FREEBSD_VERSION=124. Run cr-daily-branch to create the first build output:
./cr-daily-branch freebsd-master
5. Prepare and anoint the first build (provided the previous step 4. is successful):
./mg-anoint prepare 'freebsd build master amd64' 'FreeBSD HEAD amd64 builds' ./mg-anoint anoint --allow-blessed=play 'freebsd build master amd64' $flight build-amd64-freebsd
6. Unset
FREEBSD_DISTandFREEBSD_VERSION.Thanks, Roger.
Quoted 7 lines
[0] http://osstest.xs.citrite.net/~osstest/testlogs/logs/71726/build-amd64-freebsd/build/
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel