Integrate XTF into OSSTest
RFC PATCH 2/14 TestSupport: factor out target_jobdir_subdir
In reply to Wei LiuReturns a path inside job-specific directory with leafname subdir.
It will be used to return the distribution location of xtf.
No functional change.
--- Osstest/TestSupport.pm | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-)
Osstest/TestSupport.pm +9 -3
@@ -64,7 +64,7 @@ BEGIN { target_run_apt target_install_packages target_install_packages_norec target_jobdir target_extract_jobdistpath_subdir - target_extract_jobdistpath + target_extract_jobdistpath target_jobdir_subdir lv_create lv_dev_mapper poll_loop tcpconnect await_tcp
@@ -2175,14 +2175,20 @@ sub target_jobdir ($) { return $jobdir; } +# returns a path inside job-specific dir with leafname $subdir on $ho +sub target_jobdir_subdir($$) { + my ($ho, $subdir) = @_; + my $jobdir = target_jobdir($ho); + return "$jobdir/$subdir"; +} + sub target_extract_jobdistpath_subdir ($$$$) { my ($ho, $subdir, $distpart, $buildjob) = @_; # Extracts dist part $distpart from job $buildjob into an # job-specific directory with leafname $subdir on $ho, and returns # the directory's pathname. Does not need root. - my $jobdir = target_jobdir($ho); - my $distdir = "$jobdir/$subdir"; + my $distdir = target_jobdir_subdir($ho, $subdir); target_cmd($ho,"rm -rf $distdir && mkdir $distdir",60); my $path = get_stashed("path_${distpart}dist", $buildjob);
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
RFC PATCH 1/14 ts-xen-build: always compile in FEP support
In reply to Wei LiuBy default FEP depends on debug flag. When we are near release the debug flag will be turned off. In order to test a release build, we explicitly enable FEP in build configuration.
Since we target Xen versions that already have Kconfig support, only a Kconfig option is created for now.
We can easily add config option for older Xen when necessary.
Note that this only compiles in FEP support. To enable it a user needs to explicitly specify fep=1 in hypervisor command line.
--- ts-xen-build | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
ts-xen-build +6 -1
@@ -84,9 +84,14 @@ END (nonempty($earlyprintk) ? <<END : ''). echo >>.config CONFIG_EARLY_PRINTK=$earlyprintk END - ($ho->{Suite} =~ m/squeeze|wheezy/ ? <<END : '') #Debian #693721 + ($ho->{Suite} =~ m/squeeze|wheezy/ ? <<END : ''). #Debian #693721 echo >>.config PYTHON_PREFIX_ARG= END + <<END + if test -f xen/Kconfig; then + echo >>xen/.config CONFIG_HVM_FEP=y + fi +END ); }
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
RFC PATCH 5/14 DO NOT APPLY point xtf to my personal tree
In reply to Wei Liu--- ap-common | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
ap-common +3 -3
@@ -33,9 +33,9 @@ : ${TREEVCS_LINUX:=git} -: ${TREE_XTF:=git://xenbits.xen.org/xtf.git} -: ${PUSH_TREE_XTF:=$XENBITS:/home/xen/git/osstest/xtf.git} -: ${BASE_TREE_XTF:=git://xenbits.xen.org/osstest/xtf.git} +: ${TREE_XTF:=git://xenbits.xen.org/people/liuw/xtf.git} +: ${PUSH_TREE_XTF:=/export/home/weil/xtf.git/.git} +: ${BASE_TREE_XTF:=git://xenbits.xen.org/people/liuw/xtf.git} : ${TREE_LIBVIRT:=git://libvirt.org/libvirt.git} : ${PUSH_TREE_LIBVIRT:=$XENBITS:/home/xen/git/libvirt.git}
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
RFC PATCH 7/14 sg-run-job: create xtf build recipe
In reply to Wei Liu--- sg-run-job | 5 +++++ 1 file changed, 5 insertions(+)
sg-run-job +5 -0
@@ -480,6 +480,7 @@ proc need-hosts/build {} { return BUILD } proc need-hosts/build-kern {} { return BUILD } proc need-hosts/build-libvirt {} { return BUILD } proc need-hosts/build-rumpuserxen {} { return BUILD } +proc need-hosts/build-xtf {} { return BUILD } proc run-job/build {} { run-ts . = ts-xen-build
@@ -498,6 +499,10 @@ proc run-job/build-rumpuserxen {} { run-ts . = ts-xen-build + host tools } +proc run-job/build-xtf {} { + run-ts . = ts-xtf-build +} + proc prepare-build-host {} { global jobinfo run-ts broken = ts-hosts-allocate + host
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
RFC PATCH 3/14 DO NOT APPLY ts-leak-check: sleep 5 seconds before collecting stuff
In reply to Wei LiuThe system could be in the process of freeing up resources. Give it some time to finish.
---
This won't be necessary once we fix all synchronisation issues in xtf-runner.
--- ts-leak-check | 3 +++ 1 file changed, 3 insertions(+)
ts-leak-check +3 -0
@@ -170,6 +170,9 @@ sub inventory () { } if (!eval { + # Sleep 5 seconds before colleting stuff in case some resources are + # being freed. + sleep 5; &{ "start_$mode" }(); inventory(); &{ "finish_$mode" }();
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
RFC PATCH 8/14 Introduce ts-xtf-install
In reply to Wei LiuExtract XTF to the desire location.
--- ts-xtf-install | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100755 ts-xtf-install
ts-xtf-install new file +41 -0
@@ -0,0 +1,41 @@ +#!/usr/bin/perl -w +# This is part of "osstest", an automated testing framework for Xen. +# Copyright (C) 2016 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 Osstest; +use Osstest::TestSupport; + +tsreadconfig(); + +our ($whhost) = @ARGV; +$whhost ||= 'host'; + +our $ho= selecthost($whhost); + +sub extract () { + my $xtfdir; + my %distpath; + + $xtfdir = get_runvar('xtfdir', $r{xtfbuildjob}); + die "xtfdir not set?" if !$xtfdir; + + target_extract_jobdistpath($ho, "xtf", "path_xtfdist", + $r{xtfbuildjob}, \%distpath); +} + +extract();
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
cover Integrate XTF into OSSTest
Hi all
This patch series integrates XTF into OSSTest. It still depends on quite a few things (listed below) but I think it has gotten to point that it can be posted for review.
It depends on having a canonical location for xtf.git. Currently this series contains a patch to point to my own xtf.git tree.
It depends on Ian's work:
1. Add a "skip" state to OSSTest.
2. Add diverse flag.
To make the XTf jobs reliable, we also need to:
1. Fix synchronisation issues in xenconsole related code in Xen.
2. Fix synchronisation issue in xtf-runner.
The effect of synchronisations can be seen in [0]. Test 1 and 5 failed. I've posted patches for them ([2], [3]).
I created a dummy test case that always fails. We expect ts-xtf-run to continue running after that. The result is at [1].
Wei.
[0] http://osstest.xs.citrite.net/~osstest/testlogs/logs/66910/
[1] http://osstest.xs.citrite.net/~osstest/testlogs/logs/66916/
[2] <[email protected]>
[3] <[email protected]>
* Currently all logs are only accessible from within Citrix. Sorry. :-/
Wei Liu (14):
ts-xen-build: always compile in FEP support
TestSupport: factor out target_jobdir_subdir
DO NOT APPLY ts-leak-check: sleep 5 seconds before collecting stuff
ap-common: add xtf tree
DO NOT APPLY point xtf to my personal tree
Introduce ts-xtf-build
sg-run-job: create xtf build recipe
Introduce ts-xtf-install
mfi-common: create xtf build job for 4.8 onwards Introduce ts-xtf-fep
Introduce ts-xtf-run
sg-run-job: test-xtf recipe
make-flight: create 5 xtf jobs
Create XTF branch
Osstest/TestSupport.pm | 12 +++-- ap-common | 4 ++ ap-fetch-version | 4 ++ ap-print-url | 3 ++ ap-push | 5 ++ cr-daily-branch | 8 +++ cr-for-branches | 2 +- cri-common | 1 + make-flight | 40 ++++++++++++++ mfi-common | 29 +++++++++++ sg-run-job | 12 +++++ ts-leak-check | 3 ++ ts-xen-build | 7 ++- ts-xtf-build | 66 +++++++++++++++++++++++ ts-xtf-fep | 39 ++++++++++++++ ts-xtf-install | 41 +++++++++++++++ ts-xtf-run | 139 +++++++++++++++++++++++++++++++++++++++++++++++++ 17 files changed, 410 insertions(+), 5 deletions(-) create mode 100755 ts-xtf-build create mode 100755 ts-xtf-fep create mode 100755 ts-xtf-install create mode 100755 ts-xtf-run
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
RFC PATCH 4/14 ap-common: add xtf tree
--- ap-common | 4 ++++ 1 file changed, 4 insertions(+)
ap-common +4 -0
@@ -33,6 +33,10 @@ : ${TREEVCS_LINUX:=git} +: ${TREE_XTF:=git://xenbits.xen.org/xtf.git} +: ${PUSH_TREE_XTF:=$XENBITS:/home/xen/git/osstest/xtf.git} +: ${BASE_TREE_XTF:=git://xenbits.xen.org/osstest/xtf.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}
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
RFC PATCH 9/14 mfi-common: create xtf build job for 4.8 onwards
In reply to Wei Liu--- mfi-common | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+)
mfi-common +29 -0
@@ -67,6 +67,21 @@ xenbranch_xsm_variants () { esac } +xenbranch_wants_xtf_tests () { + case "$xenbranch" in + xen-3.*-testing) return 1;; + xen-4.0-testing) return 1;; + xen-4.1-testing) return 1;; + xen-4.2-testing) return 1;; + xen-4.3-testing) return 1;; + xen-4.4-testing) return 1;; + xen-4.5-testing) return 1;; + xen-4.6-testing) return 1;; + xen-4.7-testing) return 1;; + *) return 0;; + esac +} + job_create_build () { job_create_build_filter_callback "$@" || return 0
@@ -265,6 +280,20 @@ create_build_jobs () { fi + if xenbranch_wants_xtf_tests; then + # Only x86, build once for amd64 and use the same result for + # both amd64 and i386 + if [ x$arch = xamd64 ] ; then + job_create_build build-$arch-xtf build-xtf \ + arch=$arch \ + $RUNVARS $BUILD_RUNVARS $BUILD_XTF_RUNVARS $arch_runvars \ + $hostos_runvars \ + host_hostflags=$build_hostflags \ + tree_xtf=$TREE_XTF \ + revision_xtf=$REVISION_XTF + fi + fi + if branch_wants_rumpkernel_tests; then case $arch in
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
RFC PATCH 6/14 Introduce ts-xtf-build
In reply to Wei LiuClone, build and package XTF for later use.
--- ts-xtf-build | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100755 ts-xtf-build
ts-xtf-build new file +66 -0
@@ -0,0 +1,66 @@ +#!/usr/bin/perl -w +# This is part of "osstest", an automated testing framework for Xen. +# Copyright (C) 2016 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 Osstest; +use File::Path; +use POSIX; +use Osstest::TestSupport; +use Osstest::BuildSupport; + +tsreadconfig(); +selectbuildhost(\@ARGV); +# remaining arguments are passed as targets to "make" +builddirsprops(); + +sub checkout () { + prepbuilddirs(); + + build_clone($ho, 'xtf', $builddir, 'xtf'); +} + +sub build_and_install () { + # Generate a job-specific directory. XTF will be installed to and run from + # that directory on the test host. + my $xtfdir = target_jobdir_subdir($ho, 'xtf'); + + target_cmd_build($ho, 300, $builddir, <<END); + cd xtf + rm -f ../xtf-build-ok-stamp + ( make xtfdir=$xtfdir 2>&1 && touch ../xtf-build-ok-stamp + ) |tee ../xtf-build-log + test -f ../xtf-build-ok-stamp + echo ok. +END +#/; + target_cmd_build($ho, 300, $builddir, <<END); + cd xtf + make xtfdir=$xtfdir DESTDIR=$builddir/xtfdist install 2>&1 + echo ok. +END +#/; + store_runvar("xtfdir", $xtfdir); +} + +sub stash () { + built_stash($ho, $builddir, "xtfdist", "xtfdist"); +} + +checkout(); +build_and_install(); +stash();
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
RFC PATCH 13/14 make-flight: create 5 xtf jobs
In reply to Wei LiuCreate jobs only for x86 and set host flag diverse-xtf-x86.
--- make-flight | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+)
make-flight +22 -0
@@ -422,6 +422,26 @@ do_rtds_tests () { $debian_runvars all_hostflags=$most_hostflags } +do_xtf_tests () { + if ! xenbranch_wants_xtf_tests; then + return + fi + + # xtf is only meaningful to x86. And amd64 and i386 should be the same, + # create only for one subarch is good enough. + if [ x$xenarch != xamd64 -o x$dom0arch != xamd64 ]; then + return; + fi + + for i in `seq 1 5`; do + job_create_test test-xtf-$xenarch-$dom0arch-$i \ + test-xtf xl $xenarch $dom0arch \ + xtfbuildjob=build-$xenarch-xtf \ + xen_boot_append='hvm_fep=1' \ + all_hostflags=$most_hostflags,diverse-xtf-x86 + done +} + do_multivcpu_tests () { if [ $xenarch != $dom0arch ]; then return
@@ -705,6 +725,8 @@ test_matrix_do_one () { do_pygrub_tests do_pvgrub_tests + + do_xtf_tests } if [ x$buildflight = x ]; then
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
RFC PATCH 11/14 Introduce ts-xtf-run
In reply to Wei LiuThis is the main script for running XTF. It will first perform selftest, and then run each XTF test case as a substep.
It does the following things:
1. Run self tests for individual environment and record the result.
2. Collect tests according to available environments.
3. Run the collected tests one by one.
The script may exit early if it detects the test host is down or xtf-runner returns non-recognisable exit code.
--- ts-xtf-run | 139 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 139 insertions(+) create mode 100755 ts-xtf-run
ts-xtf-run new file +139 -0
@@ -0,0 +1,139 @@ +#!/usr/bin/perl -w +# This is part of "osstest", an automated testing framework for Xen. +# Copyright (C) 2016 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 Osstest; +use POSIX; +use Osstest::TestSupport; + +tsreadconfig(); + +our $ho = selecthost('host'); + +our $runner; +our @tests; +our @all_environments; +our @environments; + +# XTF results (runner returned numeric values) and OSStest results: +# +# SUCCESS(0) -> pass +# SKIP(3) -> skip +# ERROR(4) -> fail +# FAILURE(5) -> fail +# +# All other return codes are mapped to fail. + +sub xtf_result_to_osstest_result ($) { + my ($xret) = @_; + + return "pass" if $xret == 0; + return "skip" if $xret == 3; + return "fail"; +} + +# Check if the xtf result is within pre-defined range +# See xtf-runner --help +sub xtf_result_defined ($) { + my ($xret) = @_; + return $xret >= 0 && $xret <= 5; +} + +sub prep () { + my $xtfdir = get_runvar('xtfdir', $r{xtfbuildjob}); + $runner = "$xtfdir/xtf-runner"; +} + +sub get_environments () { + my $output = target_cmd_output_root($ho, <<END); + $runner --list --environments +END + foreach my $e (split('\n', $output)) { + push @all_environments, $e + } +} + +# Call the runner on one test case, generate a substep for it in final test +# report. Return runner exit code to caller. May exit the script early if +# things go really bad. +sub do_one_test ($) { + my ($name) = @_; + my $tid = "xtf/$name"; + my $cmd = "xtf-runner $name"; + + substep_start($tid, $cmd); + my $output = target_cmd_output_root($ho, <<END, 600); + $runner $name 1>&2; echo \$\? +END + my ($ret) = $output =~ /(\d+)/; + + # If the host doesn't respond after a test case, always make this substep + # fail and exit the script early with 0 + my $msg = target_ping_check_up($ho); + if ($msg) { + logm("$msg"); + substep_finish($tid, "fail"); + exit 0; + } + + # If xtf result can't be recognised, always make this substep fail and exit + # the script early with status 0. + if (!xtf_result_defined($ret)) { + substep_finish($tid, "fail"); + exit 0; + } + + substep_finish($tid, xtf_result_to_osstest_result($ret)); + + return $ret; +} + +# Run selftest for each environment, record the ones that are +# funtional to get maximum coverage. +sub do_selftest () { + foreach my $e (sort @all_environments) { + my $output = target_cmd_output_root($ho, <<END); + $runner --list $e selftest +END + my $ret = do_one_test($output); + push @environments, $e if $ret == 0; + } +} + +sub get_tests_list () { + foreach my $e (sort @environments) { + my $output = target_cmd_output_root($ho, <<END); + $runner --list $e --all --host +END + foreach my $t (split('\n', $output)) { + push @tests, $t + } + } +} + +sub do_all_tests () { + foreach my $t (sort @tests) { + do_one_test($t); + } +} + +prep(); +get_environments(); +do_selftest(); +get_tests_list(); +do_all_tests(); +exit 0;
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
RFC PATCH 14/14 Create XTF branch
In reply to Wei LiuThis branch contains Xen and Linux build jobs and all jobs which contain xtf in their name.
---
I'm not sure if everything is ok because I can't test all changes.
--- ap-fetch-version | 4 ++++ ap-print-url | 3 +++ ap-push | 5 +++++ cr-daily-branch | 8 ++++++++ cr-for-branches | 2 +- cri-common | 1 + make-flight | 18 ++++++++++++++++++ 7 files changed, 40 insertions(+), 1 deletion(-)
ap-fetch-version +4 -0
@@ -98,6 +98,10 @@ seabios) repo_tree_rev_fetch_git seabios \ $TREE_SEABIOS_UPSTREAM master $LOCALREV_SEABIOS ;; +xtf) + repo_tree_rev_fetch_git xtf \ + $TREE_XTF_UPSTREAM master $LOCALREV_XTF + ;; ovmf) repo_tree_rev_fetch_git ovmf \ $TREE_OVMF_UPSTREAM master $LOCALREV_OVMF
ap-print-url +3 -0
@@ -58,6 +58,9 @@ rumpuserxen) seabios) echo $TREE_SEABIOS_UPSTREAM ;; +xtf) + echo $TREE_XTF_UPSTREAM + ;; ovmf) echo $TREE_OVMF_UPSTREAM ;;
ap-push +5 -0
@@ -40,6 +40,7 @@ TREE_LIBVIRT=$PUSH_TREE_LIBVIRT TREE_RUMPUSERXEN=$PUSH_TREE_RUMPUSERXEN TREE_SEABIOS=$PUSH_TREE_SEABIOS TREE_OVMF=$PUSH_TREE_OVMF +TREE_XTF=$PUSH_TREE_XTF if info_linux_tree "$branch"; then cd $repos/linux
@@ -120,6 +121,10 @@ seabios) cd $repos/seabios git push $TREE_SEABIOS $revision:refs/heads/xen-tested-master ;; +xtf) + cd $repos/xtf + git push $TREE_XTF $revision:refs/heads/xen-tested-master + ;; ovmf) cd $repos/ovmf git push $TREE_OVMF $revision:refs/heads/xen-tested-master
cr-daily-branch +8 -0
@@ -195,6 +195,10 @@ if [ "x$REVISION_LIBVIRT" = x ]; then determine_version REVISION_LIBVIRT libvirt LIBVIRT export REVISION_LIBVIRT fi +if [ "x$REVISION_XTF" = x ]; then + determine_version REVISION_XTF xtf XTF + export REVISION_XTF +fi if [ "x$REVISION_RUMPUSERXEN" = x ]; then determine_version REVISION_RUMPUSERXEN rumpuserxen RUMPUSERXEN export REVISION_RUMPUSERXEN
@@ -248,6 +252,10 @@ seabios) realtree=seabios NEW_REVISION=$REVISION_SEABIOS ;; +xtf) + realtree=xtf + NEW_REVISION=$REVISION_XTF + ;; ovmf) realtree=ovmf NEW_REVISION=$REVISION_OVMF
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-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 linux-4.1 linux-3.18 linux-3.16 linux-3.14 linux-3.10 linux-3.4 linux-arm-xen seabios ovmf ${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-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 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}} export BRANCHES fetchwlem=$wlem
cri-common +1 -0
@@ -78,6 +78,7 @@ select_xenbranch () { libvirt) tree=libvirt; xenbranch=xen-unstable ;; rumpuserxen) tree=rumpuserxen; xenbranch=xen-unstable ;; seabios) tree=seabios; xenbranch=xen-unstable ;; + xtf) tree=xtf; xenbranch=xen-unstable ;; ovmf) tree=ovmf; xenbranch=xen-unstable ;; distros-*) tree=none; xenbranch=xen-unstable ;; osstest) tree=osstest; xenbranch=xen-unstable ;;
make-flight +18 -0
@@ -75,6 +75,14 @@ job_create_build_filter_callback () { *) return 1 ;; esac ;; + xtf) + case "$job" in + build-amd64) ;; + build-amd64-pvops) ;; + build-*-xtf) ;; + *) return 1 ;; + esac + ;; esac return 0 }
@@ -116,6 +124,16 @@ job_create_test_filter_callback () { return 1;; esac ;; + xtf) + case "$xenarch:$dom0arch" in + amd64:amd64) ;; + *) return 1;; + esac + case $job in + *-xtf-*) ;; + *) return 1;; + esac + ;; seabios) case $xenarch in amd64|i386) ;;
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
RFC PATCH 12/14 sg-run-job: test-xtf recipe
In reply to Wei LiuInstall XTF, run FEP test and then run all available tests.
--- sg-run-job | 7 +++++++ 1 file changed, 7 insertions(+)
sg-run-job +7 -0
@@ -411,6 +411,13 @@ proc run-job/test-nested {} { run-ts . = ts-guest-stop l1 l2 } +proc need-hosts/test-xtf {} { return host } +proc run-job/test-xtf {} { + run-ts . = ts-xtf-install + run-ts . = ts-xtf-fep + 0 + run-ts . = ts-xtf-run +} + proc test-guest-migr {g} { set to_reap [spawn-ts . = ts-migrate-support-check + host $g 1] set can_migrate [reap-ts $to_reap]
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
RFC PATCH 10/14 Introduce ts-xtf-fep
In reply to Wei LiuTest the availability of FEP during runtime.
--- ts-xtf-fep | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100755 ts-xtf-fep
ts-xtf-fep new file +39 -0
@@ -0,0 +1,39 @@ +#!/usr/bin/perl -w +# This is part of "osstest", an automated testing framework for Xen. +# Copyright (C) 2016 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 Osstest; +use POSIX; +use Osstest::TestSupport; + +tsreadconfig(); + +our ($expect) = @ARGV; +our $ho = selecthost('host'); + +sub fep_test () { + my $xtfdir = get_runvar('xtfdir', $r{xtfbuildjob}); + + my $ret = target_cmd_root($ho, <<END); + $xtfdir/xtf-runner fep +END + die "expecting $expect but fep test returned $ret" if $ret != $expect; + + return 0; +} + +exit fep_test();
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Re: [OSSTEST PATCH RFC 01/14] ts-xen-build: always compile in FEP support
In reply to Wei LiuWei Liu writes ("[OSSTEST PATCH RFC 01/14] ts-xen-build: always compile in FEP support"):
Quoted 6 lines
By default FEP depends on debug flag. When we are near release the debug flag will be turned off. In order to test a release build, we explicitly enable FEP in build configuration.
Since we target Xen versions that already have
Kconfigsupport, only aKconfigoption is created for now.
What do you mean by "we target" ? osstest needs to support all versions of Xen which are still in security support, which goes back to 4.4 right now.
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [OSSTEST PATCH RFC 02/14] TestSupport: factor out target_jobdir_subdir
In reply to Wei LiuWei Liu writes ("[OSSTEST PATCH RFC 02/14] TestSupport: factor out target_jobdir_subdir"):
Quoted 3 lines
Returns a path inside job-specific directory with leafname subdir.
It will be used to return the distribution location of xtf.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [OSSTEST PATCH RFC 04/14] ap-common: add xtf tree
In reply to Wei LiuWei Liu writes ("[OSSTEST PATCH RFC 04/14] ap-common: add xtf tree"):
Quoted 1 line
Signed-off-by Wei Liu <[email protected]>
...
Quoted 3 lines
+: ${TREE_XTF:=git://xenbits.xen.org/xtf.git}
+: ${PUSH_TREE_XTF:=$XENBITS:/home/xen/git/osstest/xtf.git} +: ${BASE_TREE_XTF:=git://xenbits.xen.org/osstest/xtf.git}
We should probably have the osstest tested version in the same repo.
Andrew, do you want to have osstest run its xtf push gate between staging' and master' branches of xtf, or do you want to just push to xtf master, and have a separate `osstest/tested' or some such branch for the osstest push gate output ?
Thanks,
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [OSSTEST PATCH RFC 01/14] ts-xen-build: always compile in FEP support
In reply to Ian JacksonQuoted 5 lines · Ian Jackson
Wei Liu writes ("[OSSTEST PATCH RFC 01/14] ts-xen-build: always compile in FEP support"):
Quoted 4 lines
By default FEP depends on debug flag. When we are near release the debug flag will be turned off. In order to test a release build, we explicitly enable FEP in build configuration.
Quoted 7 lines
Quoted 2 lines
Since we target Xen versions that already have
Kconfigsupport, only aKconfigoption is created for now.What do you mean by "we target" ? osstest needs to support all versions of Xen which are still in security support, which goes back to 4.4 right now.
I didn't want to enable fep for older versions of xen until xtf-runner is capable of running on them.
In any case, I can add that for older versions of xen as well. It's trivial.
Wei.
Quoted 1 line
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [OSSTEST PATCH RFC 06/14] Introduce ts-xtf-build
In reply to Wei LiuWei Liu writes ("[OSSTEST PATCH RFC 06/14] Introduce ts-xtf-build"):
Quoted 1 line
Clone, build and package XTF for later use.
...
Quoted 5 lines
ts-xtf-build new file +0
-0
...
ts-xtf-build line 28
Quoted 2 lines
ts-xtf-build new file +2
-0+selectbuildhost(\@ARGV); +# remaining arguments are passed as targets to "make"
This doesn't seem to be actually true.
ts-xtf-build line 47
Quoted 6 lines
ts-xtf-build new file +6
-0+ target_cmd_build($ho, 300, $builddir, <<END); + cd xtf + rm -f ../xtf-build-ok-stamp + ( make xtfdir=$xtfdir 2>&1 && touch ../xtf-build-ok-stamp + ) |tee ../xtf-build-log + test -f ../xtf-build-ok-stamp
I think you should lift buildcmd_stamped_logged out of ts-xen-build.
Quoted 1 line
+#/;
These are for the benefit of some editor's indenting ?
ts-xtf-build line 62
Quoted 3 lines
ts-xtf-build new file +3
-0+sub stash () { + built_stash($ho, $builddir, "xtfdist", "xtfdist"); +}
Can you post a tar zvvtf of a sample xtfdist tarball ?
Thanks,
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [OSSTEST PATCH RFC 07/14] sg-run-job: create xtf build recipe
In reply to Wei LiuWei Liu writes ("[OSSTEST PATCH RFC 07/14] sg-run-job: create xtf build recipe"):
Quoted 1 line
Signed-off-by Wei Liu <[email protected]>
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [OSSTEST PATCH RFC 01/14] ts-xen-build: always compile in FEP support
In reply to Ian JacksonQuoted 10 lines · Ian Jackson
Wei Liu writes ("[OSSTEST PATCH RFC 01/14] ts-xen-build: always compile in FEP support"):
Quoted 6 lines
By default FEP depends on debug flag. When we are near release the debug flag will be turned off. In order to test a release build, we explicitly enable FEP in build configuration.
Since we target Xen versions that already have
Kconfigsupport, only aKconfigoption is created for now.What do you mean by "we target" ? osstest needs to support all versions of Xen which are still in security support, which goes back to 4.4 right now.
Xen 4.8 will have CONFIG_HVM_FEP available, and the hvm_fep command line option is available irrespective of whether it is a debug build of the hypervisor.
Xen 4.5-4.7 have hvm_fep available on the command line, strictly for debug builds of Xen only.
Older versions have no FEP support at all.
XTF tests which require FEP to function will probe and SKIP if support is not available. This does mean that some tests can only sensibly work against newer hypervisors.
~Andrew
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [OSSTEST PATCH RFC 08/14] Introduce ts-xtf-install
In reply to Wei LiuWei Liu writes ("[OSSTEST PATCH RFC 08/14] Introduce ts-xtf-install"):
Quoted 1 line
Extract XTF to the desire location.
... ^
ts-xtf-install line 35
Quoted 2 lines
ts-xtf-install new file +2
-0+ $xtfdir = get_runvar('xtfdir', $r{xtfbuildjob}); + die "xtfdir not set?" if !$xtfdir;
I don't understand the purpose of this xtfdir variable.
Surely the extracting job should just put it wherever it wants.
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [OSSTEST PATCH RFC 06/14] Introduce ts-xtf-build
In reply to Ian JacksonQuoted 9 lines · Ian Jackson
Wei Liu writes ("[OSSTEST PATCH RFC 06/14] Introduce ts-xtf-build"):
Quoted 1 line
Clone, build and package XTF for later use.
...
Quoted 5 lines
ts-xtf-build new file +0
-0...
Quoted 5 lines
ts-xtf-build line 28
Quoted 2 lines
ts-xtf-build new file +2
-0+selectbuildhost(\@ARGV); +# remaining arguments are passed as targets to "make"This doesn't seem to be actually true.
Right, I will delete this.
Quoted 9 lines
ts-xtf-build line 47
Quoted 6 lines
ts-xtf-build new file +6
-0+ target_cmd_build($ho, 300, $builddir, <<END); + cd xtf + rm -f ../xtf-build-ok-stamp + ( make xtfdir=$xtfdir 2>&1 && touch ../xtf-build-ok-stamp + ) |tee ../xtf-build-log + test -f ../xtf-build-ok-stampI think you should lift
buildcmd_stamped_loggedout of ts-xen-build.
NP.
Quoted 4 lines
Quoted 1 line
+#/;
These are for the benefit of some editor's indenting ?
Yes. I think so. Copied and pasted from ts-xen-build, actually.
Quoted 5 lines
ts-xtf-build line 62
Quoted 3 lines
ts-xtf-build new file +3
-0+sub stash () { + built_stash($ho, $builddir, "xtfdist", "xtfdist"); +}Can you post a tar zvvtf of a sample xtfdist tarball ?
drwxr-xr-x osstest/osstest 0 2016-08-04 08:30 home/ drwxr-xr-x osstest/osstest 0 2016-08-04 08:30 home/osstest/ drwxr-xr-x osstest/osstest 0 2016-08-04 08:30 home/osstest/build.66916.build-amd64-xtf/ drwxr-xr-x osstest/osstest 0 2016-08-04 08:30 home/osstest/build.66916.build-amd64-xtf/xtf/
-rwxr-xr-x osstest/osstest 20124 2016-08-04 08:30 home/osstest/build.66916.build-amd64-xtf/xtf/xtf-runner
drwxr-xr-x osstest/osstest 0 2016-08-04 08:30 home/osstest/build.66916.build-amd64-xtf/xtf/tests/
drwxr-xr-x osstest/osstest 0 2016-08-04 08:30 home/osstest/build.66916.build-amd64-xtf/xtf/tests/xsa-168/
-rwxr-xr-x osstest/osstest 1179952 2016-08-04 08:30 home/osstest/build.66916.build-amd64-xtf/xtf/tests/xsa-168/test-hvm64-xsa-168
-rw-r--r-- osstest/osstest 563 2016-08-04 08:30 home/osstest/build.66916.build-amd64-xtf/xtf/tests/xsa-168/test-hvm64-xsa-168.cfg
-rw-r--r-- osstest/osstest 116 2016-08-04 08:30 home/osstest/build.66916.build-amd64-xtf/xtf/tests/xsa-168/info.json
drwxr-xr-x osstest/osstest 0 2016-08-04 08:30 home/osstest/build.66916.build-amd64-xtf/xtf/tests/xsa-173/
-rw-r--r-- osstest/osstest 528 2016-08-04 08:30 home/osstest/build.66916.build-amd64-xtf/xtf/tests/xsa-173/test-hvm64-xsa-173.cfg
[repetitive output truncated]
Quoted 3 lines
Thanks,
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [OSSTEST PATCH RFC 08/14] Introduce ts-xtf-install
In reply to Ian JacksonQuoted 10 lines · Ian Jackson
Wei Liu writes ("[OSSTEST PATCH RFC 08/14] Introduce ts-xtf-install"):
Quoted 1 line
Extract XTF to the desire location.
... ^
ts-xtf-install line 35
Quoted 2 lines
ts-xtf-install new file +2
-0+ $xtfdir = get_runvar('xtfdir', $r{xtfbuildjob}); + die "xtfdir not set?" if !$xtfdir;I don't understand the purpose of this xtfdir variable.
Surely the extracting job should just put it wherever it wants.
No, it can't.
It has to be in the location specified during build because there are hard-coded paths inside test case config files.
Wei.
Quoted 1 line
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [OSSTEST PATCH RFC 09/14] mfi-common: create xtf build job for 4.8 onwards
In reply to Wei LiuWei Liu writes ("[OSSTEST PATCH RFC 09/14] mfi-common: create xtf build job for 4.8 onwards"):
Quoted 1 line
Signed-off-by Wei Liu <[email protected]>
...
mfi-common xenbranch_xsm_variants () { · line 80
Quoted 11 lines
mfi-common +11
-0+xenbranch_wants_xtf_tests () { + case "$xenbranch" in + xen-3.*-testing) return 1;; + xen-4.0-testing) return 1;; + xen-4.1-testing) return 1;; + xen-4.2-testing) return 1;; + xen-4.3-testing) return 1;; + xen-4.4-testing) return 1;; + xen-4.5-testing) return 1;; + xen-4.6-testing) return 1;; + xen-4.7-testing) return 1;;
Is there some reason we can't run XTF for older Xen versions too ?
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [OSSTEST PATCH RFC 10/14] Introduce ts-xtf-fep
In reply to Wei LiuWei Liu writes ("[OSSTEST PATCH RFC 10/14] Introduce ts-xtf-fep"):
Quoted 1 line
Test the availability of FEP during runtime.
...
ts-xtf-fep line 34
Quoted 4 lines
ts-xtf-fep new file +4
-0+ my $ret = target_cmd_root($ho, <<END); + $xtfdir/xtf-runner fep +END + die "expecting $expect but fep test returned $ret" if $ret != $expect;
target_cmd_root does not return a useful return value.
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [OSSTEST PATCH RFC 10/14] Introduce ts-xtf-fep
Quoted 10 lines · Ian Jackson
Wei Liu writes ("[OSSTEST PATCH RFC 10/14] Introduce ts-xtf-fep"):
Quoted 1 line
Test the availability of FEP during runtime.
...
ts-xtf-fep line 34
Quoted 4 lines
ts-xtf-fep new file +4
-0+ my $ret = target_cmd_root($ho, <<END); + $xtfdir/xtf-runner fep +END + die "expecting $expect but fep test returned $ret" if $ret != $expect;
target_cmd_rootdoes not return a useful return value.
Right. I should use the trick we discussed yesterday here.
my $ret = target_cmd_output_root($ho, <<END);
$xtfdir/xtf-runner fep ; echo \$\?
END
Quoted 1 line
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [OSSTEST PATCH RFC 01/14] ts-xen-build: always compile in FEP support
In reply to Andrew CooperQuoted 19 lines · Andrew Cooper
Quoted 10 lines · Ian Jackson
Wei Liu writes ("[OSSTEST PATCH RFC 01/14] ts-xen-build: always compile in FEP support"):
Quoted 6 lines
By default FEP depends on debug flag. When we are near release the debug flag will be turned off. In order to test a release build, we explicitly enable FEP in build configuration.
Since we target Xen versions that already have
Kconfigsupport, only aKconfigoption is created for now.What do you mean by "we target" ? osstest needs to support all versions of Xen which are still in security support, which goes back to 4.4 right now.
Xen 4.8 will have
CONFIG_HVM_FEPavailable, and thehvm_fepcommand line option is available irrespective of whether it is a debug build of the hypervisor.Xen 4.5-4.7 have
hvm_fepavailable on the command line, strictly for debug builds of Xen only.
Quoted 7 lines
Older versions have no FEP support at all.
XTF tests which require FEP to function will probe and SKIP if support is not available. This does mean that some tests can only sensibly work against newer hypervisors.
In that case I think I would just abolish the fep test? Currently if hypervisor doesn't support fep, the whole job is aborted.
Quoted 1 line
~Andrew
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [OSSTEST PATCH RFC 11/14] Introduce ts-xtf-run
In reply to Wei LiuWei Liu writes ("[OSSTEST PATCH RFC 11/14] Introduce ts-xtf-run"):
Quoted 11 lines
This is the main script for running XTF. It will first perform selftest, and then run each XTF test case as a substep.
It does the following things:
1. Run self tests for individual environment and record the result.
2. Collect tests according to available environments.
3. Run the collected tests one by one.The script may exit early if it detects the test host is down or xtf-runner returns non-recognisable exit code.
...
ts-xtf-run line 67
Quoted 3 lines
ts-xtf-run new file +3
-0+ foreach my $e (split('\n', $output)) { + push @all_environments, $e + }
Why not
push @all_environments, split /\n/, $output;
?
(NB split takes a pattern - a regexp - not a string. Your code provides a literal string which is then used as a regexp.)
(Another occurrence of this pattern, later.)
ts-xtf-run line 81
Quoted 12 lines
ts-xtf-run new file +12
-0+# Call the runner on one test case, generate a substep for it in final test +# report. Return runner exit code to caller. May exit the script early if +# things go really bad. +sub do_one_test ($) { + my ($name) = @_; + my $tid = "xtf/$name"; + my $cmd = "xtf-runner $name"; + + substep_start($tid, $cmd); + my $output = target_cmd_output_root($ho, <<END, 600); + $runner $name 1>&2; echo \$\? +END
^ this second \ is superfluous
Quoted 1 line
+ my ($ret) = $output =~ /(\d+)/;
die unless the pattern matches.
This code seems to be lacking the error handling we discussed. In particular, if target_cmd_output_root fails (because the dom0 crashed), target_cmd_output_root will die. The script will exit nonzero and the step will be left `running'.
ts-xtf-run line 86
Quoted 3 lines
ts-xtf-run new file +3
-0+ # If the host doesn't respond after a test case, always make this substep + # fail and exit the script early with 0 + my $msg = target_ping_check_up($ho);
I think it would be better to use
target_cmd_output($ho, 'echo ok.');
than target_ping_check_up.
There are some kinds of failure which leave the host responding to ping but not actually usefully alive.
ts-xtf-run line 97
Quoted 5 lines
ts-xtf-run new file +5
-0+ # If xtf result can't be recognised, always make this substep fail and exit + # the script early with status 0. + if (!xtf_result_defined($ret)) { + substep_finish($tid, "fail"); + exit 0;
The lack of use of eval' (and appropriate use of die') has resulted in a lot of explicit repetition of this error path.
Please arrange that all problems which ought to cause "record step as `fail' and run no more tests" are handled by:
- having the code which detects the problem calling die
- that die being caught by a single eval instance
- the code after the eval handling all exceptions that way
Also there is a latent bug here. You have xtf_result_defined accept exit statuses 1 and 2, but those are actually not defined exit statuses for the xtf runner.
I think that this would be best fixed by using something like this:
+sub xtf_result_to_osstest_result ($) {
+ my ($xret) = @_;
+
+ return "pass" if $xret == 0; + return "skip" if $xret == 3; + return "fail" if $xret == 4; + return "fail" if $xret == 5; + die "xtf runner gave unexpected exit status $xret";
+}
(And, obviously, calling it within the eval.)
Then you can abolish xtf_result_defined.
And another thing: AFAICT there is nothing that prints the XTF exit status. You need at least to report the numerical exit status; ideally you would print some human-readable interpretation of it.
The person reading the logs may not be familiar with osstest or xtf. They ought to be told the xtf name for the exit status as well as the osstest mapping of it.
ts-xtf-run line 106
Quoted 2 lines
ts-xtf-run new file +2
-0+# Run selftest for each environment, record the ones that are +# funtional to get maximum coverage.
^c
ts-xtf-run line 124
Quoted 8 lines
ts-xtf-run new file +8
-0+sub get_tests_list () { + foreach my $e (sort @environments) { + my $output = target_cmd_output_root($ho, <<END); + $runner --list $e --all --host +END + foreach my $t (split('\n', $output)) { + push @tests, $t + }
It might be worth recording the environment for each test, for the log, unless the xtf runner prints that.
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [OSSTEST PATCH RFC 12/14] sg-run-job: test-xtf recipe
In reply to Wei LiuWei Liu writes ("[OSSTEST PATCH RFC 12/14] sg-run-job: test-xtf recipe"):
Quoted 1 line
Install XTF, run FEP test and then run all available tests.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [OSSTEST PATCH RFC 13/14] make-flight: create 5 xtf jobs
In reply to Wei LiuWei Liu writes ("[OSSTEST PATCH RFC 13/14] make-flight: create 5 xtf jobs"):
Quoted 1 line
Create jobs only for x86 and set host flag diverse-xtf-x86.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [OSSTEST PATCH RFC 01/14] ts-xen-build: always compile in FEP support
In reply to Wei LiuQuoted 22 lines · Wei Liu
Quoted 21 lines · Andrew Cooper
Quoted 10 lines · Ian Jackson
Wei Liu writes ("[OSSTEST PATCH RFC 01/14] ts-xen-build: always compile in FEP support"):
Quoted 6 lines
By default FEP depends on debug flag. When we are near release the debug flag will be turned off. In order to test a release build, we explicitly enable FEP in build configuration.
Since we target Xen versions that already have
Kconfigsupport, only aKconfigoption is created for now.What do you mean by "we target" ? osstest needs to support all versions of Xen which are still in security support, which goes back to 4.4 right now.
Xen 4.8 will have
CONFIG_HVM_FEPavailable, and thehvm_fepcommand line option is available irrespective of whether it is a debug build of the hypervisor.Xen 4.5-4.7 have
hvm_fepavailable on the command line, strictly for debug builds of Xen only.Older versions have no FEP support at all.
Quoted 6 lines
Quoted 4 lines
XTF tests which require FEP to function will probe and SKIP if support is not available. This does mean that some tests can only sensibly work against newer hypervisors.
In that case I think I would just abolish the fep test? Currently if hypervisor doesn't support fep, the whole job is aborted.
For just running tests normally, you shouldn't need to test for fep.
Some of the functional tests which compare Xen's emulated behaviour to real hardware have an algorithm which runs first against real hardware, then emulated (usually via fep). For these tests, the first half will always run (and may fail if the test is broken), and then either skip or run the fep part of the test.
These are still worth running even if fep is unavailable, as it still runs the first half against real hardware.
However, it might be useful to confirm that fep doesn't accidentally disappear, or a load of tests which were previously passing will turn into skip, which I presume OSSTest isn't going to be overly concerned with.
~Andrew
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [OSSTEST PATCH RFC 04/14] ap-common: add xtf tree
In reply to Ian JacksonQuoted 6 lines · Ian Jackson
Wei Liu writes ("[OSSTEST PATCH RFC 04/14] ap-common: add xtf tree"):
Quoted 1 line
Signed-off-by Wei Liu <[email protected]>...
Quoted 3 lines
+: ${TREE_XTF:=git://xenbits.xen.org/xtf.git}
+: ${PUSH_TREE_XTF:=$XENBITS:/home/xen/git/osstest/xtf.git} +: ${BASE_TREE_XTF:=git://xenbits.xen.org/osstest/xtf.git}
Quoted 6 lines
We should probably have the osstest tested version in the same repo.
Andrew, do you want to have osstest run its xtf push gate between
staging' andmaster' branches of xtf, or do you want to just push to xtf master, and have a separate `osstest/tested' or some such branch for the osstest push gate output ?
The latter please.
We should also clarify the force push criteria. It is moderately likely that we get a fix or extension to an existing test which starts showing up a new bug in the code under test.
In this case, OSSTest will identify a regression, but it isn't a regression isn't in XTF, nor is it reasonable to call it a regression in Xen. We would absolutely want to fix it in upstream, but there are no guarentees that the bugfix would be suitable for backport to older trees.
~Andrew
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [OSSTEST PATCH RFC 01/14] ts-xen-build: always compile in FEP support
In reply to Andrew CooperQuoted 38 lines · Andrew Cooper
Quoted 22 lines · Wei Liu
Quoted 21 lines · Andrew Cooper
Quoted 10 lines · Ian Jackson
Wei Liu writes ("[OSSTEST PATCH RFC 01/14] ts-xen-build: always compile in FEP support"):
Quoted 6 lines
By default FEP depends on debug flag. When we are near release the debug flag will be turned off. In order to test a release build, we explicitly enable FEP in build configuration.
Since we target Xen versions that already have
Kconfigsupport, only aKconfigoption is created for now.What do you mean by "we target" ? osstest needs to support all versions of Xen which are still in security support, which goes back to 4.4 right now.
Xen 4.8 will have
CONFIG_HVM_FEPavailable, and thehvm_fepcommand line option is available irrespective of whether it is a debug build of the hypervisor.Xen 4.5-4.7 have
hvm_fepavailable on the command line, strictly for debug builds of Xen only.Older versions have no FEP support at all.
Quoted 6 lines
Quoted 4 lines
XTF tests which require FEP to function will probe and SKIP if support is not available. This does mean that some tests can only sensibly work against newer hypervisors.
In that case I think I would just abolish the fep test? Currently if hypervisor doesn't support fep, the whole job is aborted.
For just running tests normally, you shouldn't need to test for fep.
Some of the functional tests which compare Xen's emulated behaviour to real hardware have an algorithm which runs first against real hardware, then emulated (usually via fep). For these tests, the first half will always run (and may fail if the test is broken), and then either skip or run the fep part of the test.
Quoted 7 lines
These are still worth running even if fep is unavailable, as it still runs the first half against real hardware.
However, it might be useful to confirm that fep doesn't accidentally disappear, or a load of tests which were previously passing will turn into skip, which I presume OSSTest isn't going to be overly concerned with.
OK. I will adjust that test to check a runvar for expected result.
For 4.8 onwards, the expected result of fep test is SUCCESS and for (to be implemented) older versions the expected result is ERROR (or FAILURE? Doesn't matter from OSSTest's PoV) because branches for older versions always have FEP to be off.
Wei.
Quoted 2 lines
~Andrew
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [OSSTEST PATCH RFC 04/14] ap-common: add xtf tree
In reply to Ian JacksonQuoted 7 lines · Ian Jackson
Wei Liu writes ("[OSSTEST PATCH RFC 04/14] ap-common: add xtf tree"):
Quoted 1 line
Signed-off-by Wei Liu <[email protected]>...
Quoted 3 lines
+: ${TREE_XTF:=git://xenbits.xen.org/xtf.git}
+: ${PUSH_TREE_XTF:=$XENBITS:/home/xen/git/osstest/xtf.git} +: ${BASE_TREE_XTF:=git://xenbits.xen.org/osstest/xtf.git}
Quoted 7 lines
We should probably have the osstest tested version in the same repo.
Andrew, do you want to have osstest run its xtf push gate between
staging' andmaster' branches of xtf, or do you want to just push to xtf master, and have a separate `osstest/tested' or some such branch for the osstest push gate output ?
It is currently arranged in latter way.
See "Create XTF branch" patch. OSSTest will push to xen-tested-master.
Wei.
Quoted 2 lines
Thanks,
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [OSSTEST PATCH RFC 01/14] ts-xen-build: always compile in FEP support
In reply to Wei LiuQuoted 45 lines · Wei Liu
Quoted 37 lines · Andrew Cooper
Quoted 22 lines · Wei Liu
Quoted 21 lines · Andrew Cooper
Quoted 10 lines · Ian Jackson
Wei Liu writes ("[OSSTEST PATCH RFC 01/14] ts-xen-build: always compile in FEP support"):
Quoted 6 lines
By default FEP depends on debug flag. When we are near release the debug flag will be turned off. In order to test a release build, we explicitly enable FEP in build configuration.
Since we target Xen versions that already have
Kconfigsupport, only aKconfigoption is created for now.What do you mean by "we target" ? osstest needs to support all versions of Xen which are still in security support, which goes back to 4.4 right now.
Xen 4.8 will have
CONFIG_HVM_FEPavailable, and thehvm_fepcommand line option is available irrespective of whether it is a debug build of the hypervisor.Xen 4.5-4.7 have
hvm_fepavailable on the command line, strictly for debug builds of Xen only.Older versions have no FEP support at all.
Quoted 6 lines
Quoted 4 lines
XTF tests which require FEP to function will probe and SKIP if support is not available. This does mean that some tests can only sensibly work against newer hypervisors.
In that case I think I would just abolish the fep test? Currently if hypervisor doesn't support fep, the whole job is aborted.
For just running tests normally, you shouldn't need to test for fep.
Some of the functional tests which compare Xen's emulated behaviour to real hardware have an algorithm which runs first against real hardware, then emulated (usually via fep). For these tests, the first half will always run (and may fail if the test is broken), and then either skip or run the fep part of the test.
Quoted 7 lines
These are still worth running even if fep is unavailable, as it still runs the first half against real hardware.
However, it might be useful to confirm that fep doesn't accidentally disappear, or a load of tests which were previously passing will turn into skip, which I presume OSSTest isn't going to be overly concerned with.
Quoted 6 lines
OK. I will adjust that test to check a runvar for expected result.
For 4.8 onwards, the expected result of fep test is SUCCESS and for (to be implemented) older versions the expected result is ERROR (or FAILURE? Doesn't matter from OSSTest's PoV) because branches for older versions always have FEP to be off.
http://xenbits.xen.org/people/andrewcoop/xen-test-framework/fep_2main_8c_source.html
Docs say success/failure. (after all, it was your code ;p)
~Andrew
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [OSSTEST PATCH RFC 09/14] mfi-common: create xtf build job for 4.8 onwards
In reply to Ian JacksonQuoted 15 lines · Ian Jackson
Wei Liu writes ("[OSSTEST PATCH RFC 09/14] mfi-common: create xtf build job for 4.8 onwards"):
Quoted 1 line
Signed-off-by Wei Liu <[email protected]>...
mfi-common xenbranch_xsm_variants () { · line 80
Quoted 11 lines
mfi-common +11
-0+xenbranch_wants_xtf_tests () { + case "$xenbranch" in + xen-3.*-testing) return 1;; + xen-4.0-testing) return 1;; + xen-4.1-testing) return 1;; + xen-4.2-testing) return 1;; + xen-4.3-testing) return 1;; + xen-4.4-testing) return 1;; + xen-4.5-testing) return 1;; + xen-4.6-testing) return 1;; + xen-4.7-testing) return 1;;
Quoted 2 lines
Is there some reason we can't run XTF for older Xen versions too ?
No particular reason, it is just not yet coded like that.
Would be trivial to change this patch, but I want to wait until xtf-runner is capable of running on older versions.
Wei.
Quoted 1 line
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [OSSTEST PATCH RFC 11/14] Introduce ts-xtf-run
In reply to Ian JacksonQuoted 17 lines · Ian Jackson
Wei Liu writes ("[OSSTEST PATCH RFC 11/14] Introduce ts-xtf-run"):
Quoted 11 lines
This is the main script for running XTF. It will first perform selftest, and then run each XTF test case as a substep.
It does the following things:
1. Run self tests for individual environment and record the result.
2. Collect tests according to available environments.
3. Run the collected tests one by one.The script may exit early if it detects the test host is down or xtf-runner returns non-recognisable exit code.
...
ts-xtf-run line 67
Quoted 3 lines
ts-xtf-run new file +3
-0+ foreach my $e (split('\n', $output)) { + push @all_environments, $e + }
Quoted 9 lines
Why not
push @all_environments, split /\n/, $output;
?(NB split takes a pattern - a regexp - not a string. Your code provides a literal string which is then used as a regexp.)
(Another occurrence of this pattern, later.)
Ack.
Quoted 13 lines
ts-xtf-run line 81
Quoted 12 lines
ts-xtf-run new file +12
-0+# Call the runner on one test case, generate a substep for it in final test +# report. Return runner exit code to caller. May exit the script early if +# things go really bad. +sub do_one_test ($) { + my ($name) = @_; + my $tid = "xtf/$name"; + my $cmd = "xtf-runner $name"; + + substep_start($tid, $cmd); + my $output = target_cmd_output_root($ho, <<END, 600); + $runner $name 1>&2; echo \$\? +END^ this second \ is superfluous
Quoted 3 lines
Quoted 1 line
+ my ($ret) = $output =~ /(\d+)/;
die unless the pattern matches.
Ack.
Quoted 26 lines
This code seems to be lacking the error handling we discussed. In particular, if
target_cmd_output_rootfails (because the dom0 crashed),target_cmd_output_rootwill die. The script will exit nonzero and the step will be left `running'.ts-xtf-run line 86
Quoted 3 lines
ts-xtf-run new file +3
-0+ # If the host doesn't respond after a test case, always make this substep + # fail and exit the script early with 0 + my $msg = target_ping_check_up($ho);I think it would be better to use
target_cmd_output($ho, 'echo ok.');
thantarget_ping_check_up.There are some kinds of failure which leave the host responding to ping but not actually usefully alive.
ts-xtf-run line 97
Quoted 5 lines
ts-xtf-run new file +5
-0+ # If xtf result can't be recognised, always make this substep fail and exit + # the script early with status 0. + if (!xtf_result_defined($ret)) { + substep_finish($tid, "fail"); + exit 0;The lack of use of
eval' (and appropriate use ofdie') has resulted in a lot of explicit repetition of this error path.
Quoted 7 lines
Please arrange that all problems which ought to cause "record step as `fail' and run no more tests" are handled by:
- having the code which detects the problem calling die
- that die being caught by a single eval instance
- the code after the eval handling all exceptions that way
I will see what I can do regarding this. I'm not very familiar with perl, will need to read some docs first.
Quoted 3 lines
Also there is a latent bug here. You have
xtf_result_definedaccept exit statuses 1 and 2, but those are actually not defined exit statuses for the xtf runner.
FAOD, 1 and 2 are defined xtf exit statuses -- reserved for anything python interpreter related. But I think this is going to be moot because they are going to be mapped to fail anyway.
Quoted 17 lines
I think that this would be best fixed by using something like this:
+sub
xtf_result_to_osstest_result($) {
+ my ($xret) = @_;
++ return "pass" if $xret == 0; + return "skip" if $xret == 3; + return "fail" if $xret == 4; + return "fail" if $xret == 5; + die "xtf runner gave unexpected exit status $xret";+}
(And, obviously, calling it within the eval.)
Then you can abolish
xtf_result_defined.
Quoted 8 lines
And another thing: AFAICT there is nothing that prints the XTF exit status. You need at least to report the numerical exit status; ideally you would print some human-readable interpretation of it.
The person reading the logs may not be familiar with osstest or xtf. They ought to be told the xtf name for the exit status as well as the osstest mapping of it.
The XTF exit status is already available in the log, as is the osstest result (in substep status line).
I guess you want them on the same line? One logm would do.
Quoted 4 lines
ts-xtf-run line 106
Quoted 2 lines
ts-xtf-run new file +2
-0+# Run selftest for each environment, record the ones that are +# funtional to get maximum coverage.^c
Quoted 12 lines
ts-xtf-run line 124
Quoted 8 lines
ts-xtf-run new file +8
-0+sub get_tests_list () { + foreach my $e (sort @environments) { + my $output = target_cmd_output_root($ho, <<END); + $runner --list $e --all --host +END + foreach my $t (split('\n', $output)) { + push @tests, $t + }It might be worth recording the environment for each test, for the log, unless the xtf runner prints that.
It is encoded in test case name.
Wei.
Quoted 1 line
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [OSSTEST PATCH RFC 06/14] Introduce ts-xtf-build
In reply to Wei LiuWei Liu writes ("Re: [OSSTEST PATCH RFC 06/14] Introduce ts-xtf-build"):
Quoted 8 lines · Ian Jackson
Quoted 5 lines
Wei Liu writes ("[OSSTEST PATCH RFC 06/14] Introduce ts-xtf-build"):
ts-xtf-build line 28
Quoted 2 lines
ts-xtf-build new file +2
-0+selectbuildhost(\@ARGV); +# remaining arguments are passed as targets to "make"This doesn't seem to be actually true.
Right, I will delete this.
Maybe it should be made true rather than deleted ?
I'll reply to the tarball listing in just a moment.
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [OSSTEST PATCH RFC 06/14] Introduce ts-xtf-build [and 1 more messages]
In reply to Wei LiuWei Liu writes ("[OSSTEST PATCH RFC 06/14] Introduce ts-xtf-build"):
Quoted 8 lines
Quoted 5 lines
ts-xtf-build line 62
Quoted 3 lines
ts-xtf-build new file +3
-0+sub stash () { + built_stash($ho, $builddir, "xtfdist", "xtfdist"); +}Can you post a tar zvvtf of a sample xtfdist tarball ?
drwxr-xr-x osstest/osstest 0 2016-08-04 08:30 home/
drwxr-xr-x osstest/osstest 0 2016-08-04 08:30 home/osstest/
...
Quoted 1 line
-rw-r--r-- osstest/osstest 563 2016-08-04 08:30 home/osstest/build.66916.build-amd64-xtf/xtf/tests/xsa-168/test-hvm64-xsa-168.cfg
This is quite odd.
AFAICT this means that the original path of that file, as generated by the invocation of `make install DESTDIR=...', was:
/home/osstest/build.66916/build-amd64-xtf/xtf/xtfdist/home/osstest/build.66916/build-amd64-xtf/xtf/xtfdist/tests/xsa-168/test-hvm64-xsa-168.cfg
This seems perverse. Read on...
Wei Liu writes ("Re: [OSSTEST PATCH RFC 08/14] Introduce ts-xtf-install"):
Quoted 7 lines · Ian Jackson
Quoted 1 line
Surely the extracting job should just put it wherever it wants.
No, it can't.
It has to be in the location specified during build because there are hard-coded paths inside test case config files.
That's a bit sad. But, fine.
But, in that case it is not possible to coinstall multiple different versions of xtf.
The ability to coinstall multiple different xtfs was my reason for suggesting that the xtfdist should be unpacked into a job-specific subdirectory of /home/osstest. Obviously that would have to be a directory specific to the _test job_, not the build job.
As I say, if xtfdists aren't portable to different install locations, then this is not possible and there is no reason not to use a fixed install location.
That is:
Build host:
cd /home/osstest/build.66916.build-amd64-xtf/xtf make xtfdir=/home/xtf
make xtfdir=/home/xtf DESTDIR=pwd/xtfdist
Resulting in, on build host, for example:
/home/osstest/build.66916.build-amd64-xtf/xtf/xtfdist/home/xtf/tests/xsa-168/test-hvm64-xsa-168.cfg
Note that this does not actually create anything in /home/xtf on the build host. So different builds do not interfere with each other.
Test host, for example:
/home/xtf/tests/xsa-168/test-hvm64-xsa-168.cfg
Then there is no need for the xtfdir runvar, because the answer is always the same.
Thanks,
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [OSSTEST PATCH RFC 04/14] ap-common: add xtf tree
In reply to Andrew CooperAndrew Cooper writes ("Re: [OSSTEST PATCH RFC 04/14] ap-common: add xtf tree"):
Quoted 7 lines · Ian Jackson
Quoted 4 lines
Andrew, do you want to have osstest run its xtf push gate between
staging' andmaster' branches of xtf, or do you want to just push to xtf master, and have a separate `osstest/tested' or some such branch for the osstest push gate output ?The latter please.
NP.
Quoted 3 lines
We should also clarify the force push criteria. It is moderately likely that we get a fix or extension to an existing test which starts showing up a new bug in the code under test.
Can this not be made into a new test ?
osstest would like such an extension to an existing test to be a new `step' (in osstest terminology). That would mean that the fact that it fails with old versions of Xen can be seen not to be a regression.
Ie, osstest would like to be able to distinguish:
* this version of xtf didn't have the new part of the test
* old part of the test failed (and presumably new part was not run)
* old part succeeded and new part failed
* both parts were run and succeeded
Quoted 4 lines
In this case, OSSTest will identify a regression, but it isn't a regression isn't in XTF, nor is it reasonable to call it a regression in Xen. We would absolutely want to fix it in upstream, but there are no guarentees that the bugfix would be suitable for backport to older trees.
Indeed.
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [OSSTEST PATCH RFC 01/14] ts-xen-build: always compile in FEP support
In reply to Wei LiuWei Liu writes ("Re: [Xen-devel] [OSSTEST PATCH RFC 01/14] ts-xen-build: always compile in FEP support"):
Quoted 4 lines · Andrew Cooper
Quoted 3 lines
However, it might be useful to confirm that fep doesn't accidentally disappear, or a load of tests which were previously passing will turn into skip, which I presume OSSTest isn't going to be overly concerned with.
Yes, indeed. That should be detected by spotting that the fep test fails.
Quoted 1 line
OK. I will adjust that test to check a runvar for expected result.
No, that is not the right approach.
Quoted 4 lines
For 4.8 onwards, the expected result of fep test is SUCCESS and for (to be implemented) older versions the expected result is ERROR (or FAILURE? Doesn't matter from OSSTest's PoV) because branches for older versions always have FEP to be off.
Why not just report the fep test as having failed, in old branches, and then carry on ?
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [OSSTEST PATCH RFC 01/14] ts-xen-build: always compile in FEP support
Quoted 13 lines · Ian Jackson
Wei Liu writes ("Re: [Xen-devel] [OSSTEST PATCH RFC 01/14] ts-xen-build: always compile in FEP support"):
Quoted 4 lines · Andrew Cooper
Quoted 3 lines
However, it might be useful to confirm that fep doesn't accidentally disappear, or a load of tests which were previously passing will turn into skip, which I presume OSSTest isn't going to be overly concerned with.
Yes, indeed. That should be detected by spotting that the fep test fails.
Quoted 1 line
OK. I will adjust that test to check a runvar for expected result.
No, that is not the right approach.
Quoted 8 lines
Quoted 4 lines
For 4.8 onwards, the expected result of fep test is SUCCESS and for (to be implemented) older versions the expected result is ERROR (or FAILURE? Doesn't matter from OSSTest's PoV) because branches for older versions always have FEP to be off.
Why not just report the fep test as having failed, in old branches, and then carry on ?
How to do that? If the test script fails, surely sg-run-job would not run the rest of the job.
Or do you mean the script should still pass, but print the result in the log? But then, how to express the expected result for different branches? Runvar? Script argument?
Wei.
Quoted 1 line
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [OSSTEST PATCH RFC 11/14] Introduce ts-xtf-run
In reply to Wei LiuWei Liu writes ("Re: [OSSTEST PATCH RFC 11/14] Introduce ts-xtf-run"):
Quoted 11 lines · Ian Jackson
Quoted 7 lines
Please arrange that all problems which ought to cause "record step as `fail' and run no more tests" are handled by:
- having the code which detects the problem calling die
- that die being caught by a single eval instance
- the code after the eval handling all exceptions that wayI will see what I can do regarding this. I'm not very familiar with perl, will need to read some docs first.
Sure. I'm happy to handwave IRL or on IRC if you prefer.
If you want some full-on examples of the use of eval and indeed die, there are:
ts-logs-capture (several smallish examples)
cs-bisection-step
Osstest::db_retry (subrefs, hairy)
Osstest::Executive::alloc_resources (one nested inside another)
Quoted 7 lines
Quoted 3 lines
Also there is a latent bug here. You have
xtf_result_definedaccept exit statuses 1 and 2, but those are actually not defined exit statuses for the xtf runner.FAOD, 1 and 2 are defined xtf exit statuses -- reserved for anything python interpreter related. But I think this is going to be moot because they are going to be mapped to fail anyway.
What I meant was that exit statuses 1 and 2 mean it has all gone horribly wrong'. They are not supposed to occur. (They may be defined' by the xtf runner spec, but only to reserve them.)
Quoted 2 lines
The XTF exit status is already available in the log, as is the osstest result (in substep status line).
Oh good. Sorry for quibbling, then.
Quoted 1 line
I guess you want them on the same line? One logm would do.
But, yes, that would be nice.
Quoted 4 lines
Quoted 2 lines
It might be worth recording the environment for each test, for the log, unless the xtf runner prints that.
It is encoded in test case name.
Jolly good.
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [OSSTEST PATCH RFC 06/14] Introduce ts-xtf-build [and 1 more messages]
In reply to Ian JacksonQuoted 32 lines · Ian Jackson
Wei Liu writes ("[OSSTEST PATCH RFC 06/14] Introduce ts-xtf-build"):
Quoted 8 lines
Quoted 5 lines
ts-xtf-build line 62
Quoted 3 lines
ts-xtf-build new file +3
-0+sub stash () { + built_stash($ho, $builddir, "xtfdist", "xtfdist"); +}Can you post a tar zvvtf of a sample xtfdist tarball ?
drwxr-xr-x osstest/osstest 0 2016-08-04 08:30 home/
drwxr-xr-x osstest/osstest 0 2016-08-04 08:30 home/osstest/...
Quoted 1 line
-rw-r--r-- osstest/osstest 563 2016-08-04 08:30 home/osstest/build.66916.build-amd64-xtf/xtf/tests/xsa-168/test-hvm64-xsa-168.cfg
This is quite odd.
AFAICT this means that the original path of that file, as generated by the invocation of `make install DESTDIR=...', was:
/home/osstest/build.66916/build-amd64-xtf/xtf/xtfdist/home/osstest/build.66916/build-amd64-xtf/xtf/xtfdist/tests/xsa-168/test-hvm64-xsa-168.cfgThis seems perverse. Read on...
Wei Liu writes ("Re: [OSSTEST PATCH RFC 08/14] Introduce ts-xtf-install"):
Quoted 7 lines · Ian Jackson
Quoted 1 line
Surely the extracting job should just put it wherever it wants.
No, it can't.
It has to be in the location specified during build because there are hard-coded paths inside test case config files.
That's a bit sad. But, fine.
Quoted 8 lines
But, in that case it is not possible to coinstall multiple different versions of xtf.
The ability to coinstall multiple different xtfs was my reason for suggesting that the xtfdist should be unpacked into a job-specific subdirectory of
/home/osstest. Obviously that would have to be a directory specific to the_testjob_, not the build job.
I'm confused.
Note that xtf won't generate any artefacts during runtime.
The test jobs are tied to a specific build job in one flight, so I think a build job specific path (as coded) would be the same as test job specific path.
If you have different test jobs that depend the same build job, using the same build should be fine. If you have test jobs that depend on different build job, obviously the path would be different, too.
But I guess this point is moot now because I'm fine with your suggestion below.
Quoted 21 lines
As I say, if xtfdists aren't portable to different install locations, then this is not possible and there is no reason not to use a fixed install location.
That is:
Build host:
cd
/home/osstest/build.66916.build-amd64-xtf/xtfmake xtfdir=/home/xtf
make xtfdir=/home/xtf DESTDIR=pwd/xtfdistResulting in, on build host, for example:
/home/osstest/build.66916.build-amd64-xtf/xtf/xtfdist/home/xtf/tests/xsa-168/test-hvm64-xsa-168.cfgNote that this does not actually create anything in
/home/xtfon the build host. So different builds do not interfere with each other.Test host, for example:
Quoted 7 lines
/home/xtf/tests/xsa-168/test-hvm64-xsa-168.cfgThen there is no need for the xtfdir runvar, because the answer is always the same.
Thanks,
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [OSSTEST PATCH RFC 01/14] ts-xen-build: always compile in FEP support
In reply to Wei LiuWei Liu writes ("Re: [Xen-devel] [OSSTEST PATCH RFC 01/14] ts-xen-build: always compile in FEP support"):
Quoted 6 lines · Ian Jackson
Quoted 2 lines
Why not just report the fep test as having failed, in old branches, and then carry on ?
How to do that? If the test script fails, surely sg-run-job would not run the rest of the job.
sg-run-job can be told that this script failing is not fatal. This is done by calling spawn-ts and reap-ts explicitly. See test-guest-migr for an example.
Quoted 2 lines
Or do you mean the script should still pass, but print the result in the log?
No.
Quoted 2 lines
But then, how to express the expected result for different
branches? Runvar? Script argument?
You do not need to encode this in osstest at all. The database will record that FEP never worked for Xen 4.4 the same way that it records that ARM migration never worked for 4.7. It will show up as `fail never pass'.
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [OSSTEST PATCH RFC 04/14] ap-common: add xtf tree
In reply to Ian JacksonQuoted 6 lines · Ian Jackson
Andrew Cooper writes ("Re: [OSSTEST PATCH RFC 04/14] ap-common: add xtf tree"):
Quoted 5 lines · Ian Jackson
Quoted 4 lines
Andrew, do you want to have osstest run its xtf push gate between
staging' andmaster' branches of xtf, or do you want to just push to xtf master, and have a separate `osstest/tested' or some such branch for the osstest push gate output ?
Quoted 7 lines
Quoted 1 line
The latter please.
NP.
Quoted 3 lines
We should also clarify the force push criteria. It is moderately likely that we get a fix or extension to an existing test which starts showing up a new bug in the code under test.
Can this not be made into a new test ?
That very much depends, and probably needs deciding on a case by case basis.
What absolutely shouldn't happen is ending up with test-$FOO, test-$FOO-2, test-more-$FOO, test-$FOO-again because that will result in the same logical test being split up in ad-hoc ways. While XTF is useful for automation, it is first and foremost a tool for humans.
~Andrew
Quoted 11 lines
osstest would like such an extension to an existing test to be a new `step' (in osstest terminology). That would mean that the fact that it fails with old versions of Xen can be seen not to be a regression.
Ie, osstest would like to be able to distinguish:
* this version of xtf didn't have the new part of the test
* old part of the test failed (and presumably new part was not run)
* old part succeeded and new part failed
* both parts were run and succeeded
Quoted 7 lines
Quoted 4 lines
In this case, OSSTest will identify a regression, but it isn't a regression isn't in XTF, nor is it reasonable to call it a regression in Xen. We would absolutely want to fix it in upstream, but there are no guarentees that the bugfix would be suitable for backport to older trees.
Indeed.
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [OSSTEST PATCH RFC 06/14] Introduce ts-xtf-build [and 1 more messages]
In reply to Wei LiuWei Liu writes ("Re: [OSSTEST PATCH RFC 06/14] Introduce ts-xtf-build [and 1 more messages]"):
Quoted 5 lines · Ian Jackson
Quoted 4 lines
The ability to coinstall multiple different xtfs was my reason for suggesting that the xtfdist should be unpacked into a job-specific subdirectory of
/home/osstest. Obviously that would have to be a directory specific to the_testjob_, not the build job.
...
Quoted 1 line
Note that xtf won't generate any artefacts during runtime.
Yes.
Quoted 3 lines
The test jobs are tied to a specific build job in one flight, so I think a build job specific path (as coded) would be the same as test job specific path.
That is how the flights are constructed right now, yes.
But it is not in general a good idea to bake too many of these assumptions into the ts-* scripts. It's not easy to imagine today why a single test host might want to be subjected to multiple xtf runs, but it seems hard to rule out.
For example, in the future, host sharing may mean that different test jobs for the same flight are run on the same host. Of course these wouldn't be your existing multiple xtf jobs (for several reasons).
But if there were ever some xtf test jobs which were different in some way, then in principle it would be possible for each xtf test job to specify a differnet xtf build job. This would mean installing xtf more than once, from what may be different build jobs or what may be the same build job.
Whether they are the same build job might not depend on things specified directly in make-flight and mfi-*. Automatic job constructors can reuse jobs from other flights and/or construct new flights using old ones as templates. The bisector will choose build jobs as it sees fit.
If an xtfdist would work if unpacked in a different directory, which wasn't known at build time, it would be possible for each xtf test job to unpack its xtfdist in the directory corresponding to the test job.
Thus multiple test jobs with potentially-different xtfs could run sequentially on the same host.
However, that is not possible. (Unpacking the same xtf over the top of itself might not be safe and wouldn't be a good idea.)
Therefore, we will have to remember this limitation if we ever are likely to come across it. Fine.
But that does mean that my suggestion for using a job-specific location for the xtf installed version is pointless. The (impossible) scheme depends on a _test_-job-specific location. There is no point embedding the _build_ job info in the pathnames.
And as you discover, doing so means that the pathname needs to be made available in a runvar. This is pointless complexity.
Quoted 3 lines
If you have different test jobs that depend the same build job, using the same build should be fine. If you have test jobs that depend on different build job, obviously the path would be different, too.
This seems to contemplate unpacking the same xtf over the top of itself. I don't think this is a good idea. For example, if we ever do parallel runs, it would break. It might also overwrite useful logs etc.
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [OSSTEST PATCH RFC 04/14] ap-common: add xtf tree
In reply to Andrew CooperAndrew Cooper writes ("Re: [OSSTEST PATCH RFC 04/14] ap-common: add xtf tree"):
Quoted 5 lines · Ian Jackson
Quoted 4 lines
Andrew Cooper writes ("Re: [OSSTEST PATCH RFC 04/14] ap-common: add xtf tree"):
Quoted 3 lines
We should also clarify the force push criteria. It is moderately likely that we get a fix or extension to an existing test which starts showing up a new bug in the code under test.
Quoted 8 lines
Quoted 1 line
Can this not be made into a new test ?
That very much depends, and probably needs deciding on a case by case basis.
What absolutely shouldn't happen is ending up with test-$FOO, test-$FOO-2, test-more-$FOO, test-$FOO-again because that will result in the same logical test being split up in ad-hoc ways. While XTF is useful for automation, it is first and foremost a tool for humans.
You mean that this would contort the code for the test ?
Here is another approach that could be used to satisfy osstest's desire for stability in the meaning of test names: you could explicitly copy the entire source of the test to a new test name, and deprecate the old test. Later, if the old versions of Xen are fixed, or after they are retired you would delete the old test.
The result would be that the old, less-good, test would still exist and still detect regressions. The new, better test, would be seen to have never passed on old branches.
Force pushing XTF is not an answer to this problem, for two reasons:
Firstly, if the improved test correctly fails on old versions of Xen, this will appear as a regression in each old version of Xen. Each old Xen tree would need to be force pushed, every time this happened.
Secondly, in any case, force pushing XTF might not be necessary. In the usual case, one would expect xen-unstable (which is what would drive the XTF push gate) to be fixed so that the improved test passes. So osstest wouldn't spot the issue until it ran the new XTF with old Xen.
Another possibility would be to have the capability for an single XTF test execution to return multiple statuses.
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [OSSTEST PATCH RFC 06/14] Introduce ts-xtf-build [and 1 more messages]
In reply to Ian JacksonQuoted 57 lines · Ian Jackson
Wei Liu writes ("Re: [OSSTEST PATCH RFC 06/14] Introduce ts-xtf-build [and 1 more messages]"):
Quoted 5 lines · Ian Jackson
Quoted 4 lines
The ability to coinstall multiple different xtfs was my reason for suggesting that the xtfdist should be unpacked into a job-specific subdirectory of
/home/osstest. Obviously that would have to be a directory specific to the_testjob_, not the build job....
Quoted 1 line
Note that xtf won't generate any artefacts during runtime.
Yes.
Quoted 3 lines
The test jobs are tied to a specific build job in one flight, so I think a build job specific path (as coded) would be the same as test job specific path.
That is how the flights are constructed right now, yes.
But it is not in general a good idea to bake too many of these assumptions into the ts-* scripts. It's not easy to imagine today why a single test host might want to be subjected to multiple xtf runs, but it seems hard to rule out.
For example, in the future, host sharing may mean that different test jobs for the same flight are run on the same host. Of course these wouldn't be your existing multiple xtf jobs (for several reasons).
But if there were ever some xtf test jobs which were different in some way, then in principle it would be possible for each xtf test job to specify a differnet xtf build job. This would mean installing xtf more than once, from what may be different build jobs or what may be the same build job.
Whether they are the same build job might not depend on things specified directly in make-flight and mfi-*. Automatic job constructors can reuse jobs from other flights and/or construct new flights using old ones as templates. The bisector will choose build jobs as it sees fit.
If an xtfdist would work if unpacked in a different directory, which wasn't known at build time, it would be possible for each xtf test job to unpack its xtfdist in the directory corresponding to the test job.
Thus multiple test jobs with potentially-different xtfs could run sequentially on the same host.
However, that is not possible. (Unpacking the same xtf over the top of itself might not be safe and wouldn't be a good idea.)
Therefore, we will have to remember this limitation if we ever are likely to come across it. Fine.
But that does mean that my suggestion for using a job-specific location for the xtf installed version is pointless. The (impossible) scheme depends on a _test_-job-specific location. There is no point embedding the _build_ job info in the pathnames.
And as you discover, doing so means that the pathname needs to be made available in a runvar. This is pointless complexity.
Quoted 7 lines
Quoted 3 lines
If you have different test jobs that depend the same build job, using the same build should be fine. If you have test jobs that depend on different build job, obviously the path would be different, too.
This seems to contemplate unpacking the same xtf over the top of itself. I don't think this is a good idea. For example, if we ever do parallel runs, it would break. It might also overwrite useful logs etc.
The current hard-coded paths exist only because of current limitiations in xl/libxl (identified here:
http://xenbits.xen.org/people/andrewcoop/xen-test-framework/#errata)
With those issues fixed, XTF can be made to be entirely filesystem location independent.
~Andrew
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [OSSTEST PATCH RFC 06/14] Introduce ts-xtf-build [and 1 more messages]
Andrew Cooper writes ("Re: [Xen-devel] [OSSTEST PATCH RFC 06/14] Introduce ts-xtf-build [and 1 more messages]"):
Quoted 6 lines
The current hard-coded paths exist only because of current limitiations in xl/libxl (identified here:
http://xenbits.xen.org/people/andrewcoop/xen-test-framework/#errata)With those issues fixed, XTF can be made to be entirely filesystem location independent.
Great. If that ever happens we can make osstest install its xtf(s) whereever it likes and the build location will be irrelevant.
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Re: [OSSTEST PATCH RFC 04/14] ap-common: add xtf tree
In reply to Ian JacksonQuoted 31 lines · Ian Jackson
Andrew Cooper writes ("Re: [OSSTEST PATCH RFC 04/14] ap-common: add xtf tree"):
Quoted 5 lines · Ian Jackson
Quoted 4 lines
Andrew Cooper writes ("Re: [OSSTEST PATCH RFC 04/14] ap-common: add xtf tree"):
Quoted 3 lines
We should also clarify the force push criteria. It is moderately likely that we get a fix or extension to an existing test which starts showing up a new bug in the code under test.
Quoted 7 lines
Quoted 1 line
Can this not be made into a new test ?
That very much depends, and probably needs deciding on a case by case basis.
What absolutely shouldn't happen is ending up with test-$FOO, test-$FOO-2, test-more-$FOO, test-$FOO-again because that will result in the same logical test being split up in ad-hoc ways. While XTF is useful for automation, it is first and foremost a tool for humans.
You mean that this would contort the code for the test ?
Here is another approach that could be used to satisfy osstest's desire for stability in the meaning of test names: you could explicitly copy the entire source of the test to a new test name, and deprecate the old test. Later, if the old versions of Xen are fixed, or after they are retired you would delete the old test.
The result would be that the old, less-good, test would still exist and still detect regressions. The new, better test, would be seen to have never passed on old branches.
Force pushing XTF is not an answer to this problem, for two reasons:
Firstly, if the improved test correctly fails on old versions of Xen, this will appear as a regression in each old version of Xen. Each old Xen tree would need to be force pushed, every time this happened.
Quoted 8 lines
Secondly, in any case, force pushing XTF might not be necessary. In the usual case, one would expect xen-unstable (which is what would drive the XTF push gate) to be fixed so that the improved test passes. So osstest wouldn't spot the issue until it ran the new XTF with old Xen.
Another possibility would be to have the capability for an single XTF test execution to return multiple statuses.
After an IRL discussion, the following has been proposed.
Each test can have a revision number associated with it. The revision gets bumped every time there is a change to the test which adds new functionality (including bugfixes which cause it to spot a preexisting error).
By default, a human will just want the latest and greatest. Test systems on the other hand will want to test "the same thing as before".
The XTF build system will support a way to build older revisions of the tests. It is likely that this will involve recompiling the current code with an older revision id, and leave the onus on the programmer to ensure that the result is functionally equivalent to the older test.
This way, test automation systems can internal treat different revisions of the test as logically separate, for the purpose of identifying regressions.
~Andrew
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel