xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [OSSTEST PATCH RFC v2 00/14] Integrate XTF into OSSTest
@ 2016-08-08  9:22 Wei Liu
  2016-08-08  9:22 ` [OSSTEST PATCH RFC v2 01/14] ts-xen-build: always compile in FEP support Wei Liu
                   ` (13 more replies)
  0 siblings, 14 replies; 31+ messages in thread
From: Wei Liu @ 2016-08-08  9:22 UTC (permalink / raw)
  To: Xen-devel; +Cc: ian.jackson, Wei Liu, andrew.cooper3

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].

The test flight in [4] contained a hack that removed "skip" from accepcted
states, so test-pv64-xsa-167 became "never pass" (should be "skip" in normal
case). In job 4 test-pv32-pae-pv-iopl~vmassist failed due to xenconsole race.
The code correctly caused rest of the job to be skipped. The same race also
caused xtf-fep to fail in job 2, but that test won't cause the job to be
aborted anymore.
 

Wei.


[0] http://osstest.xs.citrite.net/~osstest/testlogs/logs/66910/
[1] http://osstest.xs.citrite.net/~osstest/testlogs/logs/66916/
[2] <1470418894-11358-1-git-send-email-wei.liu2@citrix.com>
[3] <1470060258-20084-1-git-send-email-wei.liu2@citrix.com>
[4] http://osstest.xs.citrite.net/~osstest/testlogs/logs/66926/

[0] and [1] are from v1 of this series, [4] is from v2 (this version).

* Currently all logs are only accessible from within Citrix. Sorry. :-/

Wei Liu (14):
  ts-xen-build: always compile in FEP support
  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
  BuildSupport: move buildcmd_stamped_logged here
  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/BuildSupport.pm |  15 ++++++
 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              |  15 ++++++
 ts-leak-check           |   3 ++
 ts-xen-build            |  25 ++++------
 ts-xtf-build            |  54 +++++++++++++++++++++
 ts-xtf-fep              |  37 +++++++++++++++
 ts-xtf-install          |  37 +++++++++++++++
 ts-xtf-run              | 122 ++++++++++++++++++++++++++++++++++++++++++++++++
 17 files changed, 386 insertions(+), 18 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

-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [OSSTEST PATCH RFC v2 01/14] ts-xen-build: always compile in FEP support
  2016-08-08  9:22 [OSSTEST PATCH RFC v2 00/14] Integrate XTF into OSSTest Wei Liu
@ 2016-08-08  9:22 ` Wei Liu
  2016-08-08 14:46   ` Ian Jackson
  2016-08-08  9:22 ` [OSSTEST PATCH RFC v2 02/14] DO NOT APPLY ts-leak-check: sleep 5 seconds before collecting stuff Wei Liu
                   ` (12 subsequent siblings)
  13 siblings, 1 reply; 31+ messages in thread
From: Wei Liu @ 2016-08-08  9:22 UTC (permalink / raw)
  To: Xen-devel; +Cc: ian.jackson, Wei Liu

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 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.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
 ts-xen-build | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/ts-xen-build b/ts-xen-build
index 5933dd4..58670f1 100755
--- a/ts-xen-build
+++ b/ts-xen-build
@@ -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
                );
 }
 
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [OSSTEST PATCH RFC v2 02/14] DO NOT APPLY ts-leak-check: sleep 5 seconds before collecting stuff
  2016-08-08  9:22 [OSSTEST PATCH RFC v2 00/14] Integrate XTF into OSSTest Wei Liu
  2016-08-08  9:22 ` [OSSTEST PATCH RFC v2 01/14] ts-xen-build: always compile in FEP support Wei Liu
@ 2016-08-08  9:22 ` Wei Liu
  2016-08-08  9:22 ` [OSSTEST PATCH RFC v2 03/14] ap-common: add xtf tree Wei Liu
                   ` (11 subsequent siblings)
  13 siblings, 0 replies; 31+ messages in thread
From: Wei Liu @ 2016-08-08  9:22 UTC (permalink / raw)
  To: Xen-devel; +Cc: ian.jackson, Wei Liu

The system could be in the process of freeing up resources. Give it some
time to finish.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
This won't be necessary once we fix all synchronisation issues in
xtf-runner.
---
 ts-leak-check | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/ts-leak-check b/ts-leak-check
index 8a97971..1f6d5b0 100755
--- a/ts-leak-check
+++ b/ts-leak-check
@@ -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" }();
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [OSSTEST PATCH RFC v2 03/14] ap-common: add xtf tree
  2016-08-08  9:22 [OSSTEST PATCH RFC v2 00/14] Integrate XTF into OSSTest Wei Liu
  2016-08-08  9:22 ` [OSSTEST PATCH RFC v2 01/14] ts-xen-build: always compile in FEP support Wei Liu
  2016-08-08  9:22 ` [OSSTEST PATCH RFC v2 02/14] DO NOT APPLY ts-leak-check: sleep 5 seconds before collecting stuff Wei Liu
@ 2016-08-08  9:22 ` Wei Liu
  2016-08-08 14:46   ` Ian Jackson
  2016-08-08  9:22 ` [OSSTEST PATCH RFC v2 04/14] DO NOT APPLY point xtf to my personal tree Wei Liu
                   ` (10 subsequent siblings)
  13 siblings, 1 reply; 31+ messages in thread
From: Wei Liu @ 2016-08-08  9:22 UTC (permalink / raw)
  To: Xen-devel; +Cc: ian.jackson, Wei Liu

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
 ap-common | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/ap-common b/ap-common
index 19c7580..46523f3 100644
--- a/ap-common
+++ b/ap-common
@@ -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}
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [OSSTEST PATCH RFC v2 04/14] DO NOT APPLY point xtf to my personal tree
  2016-08-08  9:22 [OSSTEST PATCH RFC v2 00/14] Integrate XTF into OSSTest Wei Liu
                   ` (2 preceding siblings ...)
  2016-08-08  9:22 ` [OSSTEST PATCH RFC v2 03/14] ap-common: add xtf tree Wei Liu
@ 2016-08-08  9:22 ` Wei Liu
  2016-08-08  9:22 ` [OSSTEST PATCH RFC v2 05/14] BuildSupport: move buildcmd_stamped_logged here Wei Liu
                   ` (9 subsequent siblings)
  13 siblings, 0 replies; 31+ messages in thread
From: Wei Liu @ 2016-08-08  9:22 UTC (permalink / raw)
  To: Xen-devel; +Cc: ian.jackson, Wei Liu

---
 ap-common | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/ap-common b/ap-common
index 46523f3..e544605 100644
--- a/ap-common
+++ b/ap-common
@@ -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}
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [OSSTEST PATCH RFC v2 05/14] BuildSupport: move buildcmd_stamped_logged here
  2016-08-08  9:22 [OSSTEST PATCH RFC v2 00/14] Integrate XTF into OSSTest Wei Liu
                   ` (3 preceding siblings ...)
  2016-08-08  9:22 ` [OSSTEST PATCH RFC v2 04/14] DO NOT APPLY point xtf to my personal tree Wei Liu
@ 2016-08-08  9:22 ` Wei Liu
  2016-08-08 14:47   ` Ian Jackson
  2016-08-08  9:22 ` [OSSTEST PATCH RFC v2 06/14] Introduce ts-xtf-build Wei Liu
                   ` (8 subsequent siblings)
  13 siblings, 1 reply; 31+ messages in thread
From: Wei Liu @ 2016-08-08  9:22 UTC (permalink / raw)
  To: Xen-devel; +Cc: ian.jackson, Wei Liu

... so that other build scripts can use it, too.

It now accepts one more parameter called "component" to be useful in
other build scripts.

No functional change.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
v2: new
---
 Osstest/BuildSupport.pm | 15 +++++++++++++++
 ts-xen-build            | 18 ++----------------
 2 files changed, 17 insertions(+), 16 deletions(-)

diff --git a/Osstest/BuildSupport.pm b/Osstest/BuildSupport.pm
index a183546..dfdf2e4 100644
--- a/Osstest/BuildSupport.pm
+++ b/Osstest/BuildSupport.pm
@@ -36,6 +36,7 @@ BEGIN {
                       $whhost $ho
 
                       builddirsprops
+                      buildcmd_stamped_logged
                       $builddir $makeflags
 
                       prepbuilddirs
@@ -56,6 +57,20 @@ our ($whhost,$ho);
 our ($builddir,$makeflags);
 our ($xendist);
 
+sub buildcmd_stamped_logged ($$$$$$) {
+    my ($timeout, $component, $stampname, $prefix, $cmd, $suffix) = @_;
+    target_cmd_build($ho, $timeout, $builddir, <<END);
+        cd $component
+        $prefix
+        ( $cmd 2>&1 &&             touch ../$stampname-ok-stamp
+        ) |tee ../$stampname-log
+        test -f ../$stampname-ok-stamp
+        $suffix
+        echo ok.
+END
+#/;
+}
+
 sub selectbuildhost {
     # pass \@ARGV
     my ($av) = @_;
diff --git a/ts-xen-build b/ts-xen-build
index 58670f1..5e076d7 100755
--- a/ts-xen-build
+++ b/ts-xen-build
@@ -95,20 +95,6 @@ END
                );
 }
 
-sub buildcmd_stamped_logged ($$$$$) {
-    my ($timeout, $stampname, $prefix, $cmd, $suffix) = @_;
-    target_cmd_build($ho, $timeout, $builddir, <<END);
-        cd xen
-        $prefix
-        ( $cmd 2>&1 &&             touch ../$stampname-ok-stamp
-        ) |tee ../$stampname-log
-        test -f ../$stampname-ok-stamp
-        $suffix
-        echo ok.
-END
-#/;
-}
-
 sub build () {
     my $xend_opt= $r{enable_xend} =~ m/true/ ? "--enable-xend" : "--disable-xend";
     my $ovmf_opt= $r{enable_ovmf} =~ m/true/ ? "--enable-ovmf" : "--disable-ovmf";
@@ -116,7 +102,7 @@ sub build () {
     my $configure_prefix = $r{cmdprefix_configure} // '';
     my $make_prefix =      $r{cmdprefix_make}      // '';
 
-    buildcmd_stamped_logged(600, 'configure', <<END,<<END,<<END);
+    buildcmd_stamped_logged(600, 'xen', 'configure', <<END,<<END,<<END);
             if test -f configure; then
                 if grep -q -- $xend_opt tools/configure ; then
 		    xend=$xend_opt
@@ -130,7 +116,7 @@ END
             fi
 END
 #/;
-    buildcmd_stamped_logged(9000, 'build', '',<<END,'');
+    buildcmd_stamped_logged(9000, 'xen', 'build', '',<<END,'');
             if test -f xen/Kconfig; then
                 $make_prefix make -C xen olddefconfig
             fi
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [OSSTEST PATCH RFC v2 06/14] Introduce ts-xtf-build
  2016-08-08  9:22 [OSSTEST PATCH RFC v2 00/14] Integrate XTF into OSSTest Wei Liu
                   ` (4 preceding siblings ...)
  2016-08-08  9:22 ` [OSSTEST PATCH RFC v2 05/14] BuildSupport: move buildcmd_stamped_logged here Wei Liu
@ 2016-08-08  9:22 ` Wei Liu
  2016-08-08 14:48   ` Ian Jackson
  2016-08-08  9:22 ` [OSSTEST PATCH RFC v2 07/14] sg-run-job: create xtf build recipe Wei Liu
                   ` (7 subsequent siblings)
  13 siblings, 1 reply; 31+ messages in thread
From: Wei Liu @ 2016-08-08  9:22 UTC (permalink / raw)
  To: Xen-devel; +Cc: ian.jackson, Wei Liu

Clone, build and package XTF for later use.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
v2:
1. use buildcmd_stamped_logged
2. pass @ARGV to make
3. use /home/xtf
---
 ts-xtf-build | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 54 insertions(+)
 create mode 100755 ts-xtf-build

diff --git a/ts-xtf-build b/ts-xtf-build
new file mode 100755
index 0000000..1af1b4e
--- /dev/null
+++ b/ts-xtf-build
@@ -0,0 +1,54 @@
+#!/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 () {
+
+    buildcmd_stamped_logged(300, 'xtf', 'build', '', <<END, '');
+        make xtfdir=/home/xtf @ARGV
+END
+
+    buildcmd_stamped_logged(300, 'xtf', 'dist', '', <<END, '');
+        make xtfdir=/home/xtf DESTDIR=$builddir/xtfdist install
+END
+}
+
+sub stash () {
+    built_stash($ho, $builddir, "xtfdist", "xtfdist");
+}
+
+checkout();
+build_and_install();
+stash();
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [OSSTEST PATCH RFC v2 07/14] sg-run-job: create xtf build recipe
  2016-08-08  9:22 [OSSTEST PATCH RFC v2 00/14] Integrate XTF into OSSTest Wei Liu
                   ` (5 preceding siblings ...)
  2016-08-08  9:22 ` [OSSTEST PATCH RFC v2 06/14] Introduce ts-xtf-build Wei Liu
@ 2016-08-08  9:22 ` Wei Liu
  2016-08-08  9:22 ` [OSSTEST PATCH RFC v2 08/14] Introduce ts-xtf-install Wei Liu
                   ` (6 subsequent siblings)
  13 siblings, 0 replies; 31+ messages in thread
From: Wei Liu @ 2016-08-08  9:22 UTC (permalink / raw)
  To: Xen-devel; +Cc: ian.jackson, Wei Liu

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 sg-run-job | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/sg-run-job b/sg-run-job
index 259fc3b..240b265 100755
--- a/sg-run-job
+++ b/sg-run-job
@@ -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
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [OSSTEST PATCH RFC v2 08/14] Introduce ts-xtf-install
  2016-08-08  9:22 [OSSTEST PATCH RFC v2 00/14] Integrate XTF into OSSTest Wei Liu
                   ` (6 preceding siblings ...)
  2016-08-08  9:22 ` [OSSTEST PATCH RFC v2 07/14] sg-run-job: create xtf build recipe Wei Liu
@ 2016-08-08  9:22 ` Wei Liu
  2016-08-08 14:49   ` Ian Jackson
  2016-08-08  9:22 ` [OSSTEST PATCH RFC v2 09/14] mfi-common: create xtf build job for 4.8 onwards Wei Liu
                   ` (5 subsequent siblings)
  13 siblings, 1 reply; 31+ messages in thread
From: Wei Liu @ 2016-08-08  9:22 UTC (permalink / raw)
  To: Xen-devel; +Cc: ian.jackson, Wei Liu

Extract XTF to the desire location.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
v2: remove reference of runvar xtfdir
---
 ts-xtf-install | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)
 create mode 100755 ts-xtf-install

diff --git a/ts-xtf-install b/ts-xtf-install
new file mode 100755
index 0000000..040772e
--- /dev/null
+++ b/ts-xtf-install
@@ -0,0 +1,37 @@
+#!/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 %distpath;
+
+    target_extract_jobdistpath($ho, "xtf", "path_xtfdist",
+                               $r{xtfbuildjob}, \%distpath);
+}
+
+extract();
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [OSSTEST PATCH RFC v2 09/14] mfi-common: create xtf build job for 4.8 onwards
  2016-08-08  9:22 [OSSTEST PATCH RFC v2 00/14] Integrate XTF into OSSTest Wei Liu
                   ` (7 preceding siblings ...)
  2016-08-08  9:22 ` [OSSTEST PATCH RFC v2 08/14] Introduce ts-xtf-install Wei Liu
@ 2016-08-08  9:22 ` Wei Liu
  2016-08-08 14:51   ` Ian Jackson
  2016-08-08  9:22 ` [OSSTEST PATCH RFC v2 10/14] Introduce ts-xtf-fep Wei Liu
                   ` (4 subsequent siblings)
  13 siblings, 1 reply; 31+ messages in thread
From: Wei Liu @ 2016-08-08  9:22 UTC (permalink / raw)
  To: Xen-devel; +Cc: ian.jackson, Wei Liu

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
 mfi-common | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/mfi-common b/mfi-common
index 971ded3..b1e8dab 100644
--- a/mfi-common
+++ b/mfi-common
@@ -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
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [OSSTEST PATCH RFC v2 10/14] Introduce ts-xtf-fep
  2016-08-08  9:22 [OSSTEST PATCH RFC v2 00/14] Integrate XTF into OSSTest Wei Liu
                   ` (8 preceding siblings ...)
  2016-08-08  9:22 ` [OSSTEST PATCH RFC v2 09/14] mfi-common: create xtf build job for 4.8 onwards Wei Liu
@ 2016-08-08  9:22 ` Wei Liu
  2016-08-08 14:52   ` Ian Jackson
  2016-08-08  9:22 ` [OSSTEST PATCH RFC v2 11/14] Introduce ts-xtf-run Wei Liu
                   ` (3 subsequent siblings)
  13 siblings, 1 reply; 31+ messages in thread
From: Wei Liu @ 2016-08-08  9:22 UTC (permalink / raw)
  To: Xen-devel; +Cc: ian.jackson, Wei Liu

Test the availability of FEP during runtime.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
v2:
1. use target_cmd_output_root to get output
2. die if the output is not in expected format
3. use fep test result as exit code of the script
4. remove the use of  xtfdir runvar
---
 ts-xtf-fep | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)
 create mode 100755 ts-xtf-fep

diff --git a/ts-xtf-fep b/ts-xtf-fep
new file mode 100755
index 0000000..c5222e0
--- /dev/null
+++ b/ts-xtf-fep
@@ -0,0 +1,37 @@
+#!/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');
+
+sub fep_test () {
+    my $output = target_cmd_output_root($ho, <<END);
+        /home/xtf/xtf-runner fep 1>&2; echo \$?
+END
+
+    $output =~ m/^(\d+)$/ or die "$output ?";
+
+    return $1;
+}
+
+exit fep_test();
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [OSSTEST PATCH RFC v2 11/14] Introduce ts-xtf-run
  2016-08-08  9:22 [OSSTEST PATCH RFC v2 00/14] Integrate XTF into OSSTest Wei Liu
                   ` (9 preceding siblings ...)
  2016-08-08  9:22 ` [OSSTEST PATCH RFC v2 10/14] Introduce ts-xtf-fep Wei Liu
@ 2016-08-08  9:22 ` Wei Liu
  2016-08-08 14:55   ` Ian Jackson
  2016-08-08 16:29   ` Andrew Cooper
  2016-08-08  9:22 ` [OSSTEST PATCH RFC v2 12/14] sg-run-job: test-xtf recipe Wei Liu
                   ` (2 subsequent siblings)
  13 siblings, 2 replies; 31+ messages in thread
From: Wei Liu @ 2016-08-08  9:22 UTC (permalink / raw)
  To: Xen-devel; +Cc: ian.jackson, Wei Liu

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.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
 ts-xtf-run | 122 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 122 insertions(+)
 create mode 100755 ts-xtf-run

diff --git a/ts-xtf-run b/ts-xtf-run
new file mode 100755
index 0000000..c72ac18
--- /dev/null
+++ b/ts-xtf-run
@@ -0,0 +1,122 @@
+#!/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 = "/home/xtf/xtf-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
+#
+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 result $xret";
+}
+
+sub get_environments () {
+    my $output = target_cmd_output_root($ho, <<END);
+        $runner --list --environments
+END
+    push @all_environments, split /\n/, $output;
+}
+
+# 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";
+    my $output;
+    my $ret;
+    my $osstest_result;
+
+    substep_start($tid, $cmd);
+
+    if (! eval {
+            $output = target_cmd_output_root($ho, <<END, 600);
+                $runner $name 1>&2; echo \$?
+END
+            $output =~ m/^(\d+)$/ or die "$output ?";
+            $ret = $1;
+
+            target_cmd_output_root($ho, 'echo ok.');
+            $osstest_result = xtf_result_to_osstest_result($ret);
+            1;
+        }) {
+        logm("XTF test threw exception:\n$@");
+        substep_finish($tid, "fail");
+        exit 0;
+    }
+
+    logm("Test $name, XTF returned $ret -> OSSTest $osstest_result");
+    substep_finish($tid, $osstest_result);
+
+    return $ret;
+}
+
+# Run selftest for each environment, record the ones that are
+# functional 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
+        push @tests, split /\n/, $output;
+    }
+}
+
+sub do_all_tests () {
+    foreach my $t (sort @tests) {
+        do_one_test($t);
+    }
+}
+
+get_environments();
+do_selftest();
+get_tests_list();
+do_all_tests();
+exit 0;
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [OSSTEST PATCH RFC v2 12/14] sg-run-job: test-xtf recipe
  2016-08-08  9:22 [OSSTEST PATCH RFC v2 00/14] Integrate XTF into OSSTest Wei Liu
                   ` (10 preceding siblings ...)
  2016-08-08  9:22 ` [OSSTEST PATCH RFC v2 11/14] Introduce ts-xtf-run Wei Liu
@ 2016-08-08  9:22 ` Wei Liu
  2016-08-08 14:56   ` Ian Jackson
  2016-08-08  9:22 ` [OSSTEST PATCH RFC v2 13/14] make-flight: create 5 xtf jobs Wei Liu
  2016-08-08  9:22 ` [OSSTEST PATCH RFC v2 14/14] Create XTF branch Wei Liu
  13 siblings, 1 reply; 31+ messages in thread
From: Wei Liu @ 2016-08-08  9:22 UTC (permalink / raw)
  To: Xen-devel; +Cc: ian.jackson, Wei Liu

Install XTF, run FEP test and then run all available tests.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
v2: spawn and reap ts-xtf-fep to make it non-fatal
---
 sg-run-job | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/sg-run-job b/sg-run-job
index 240b265..c9773ab 100755
--- a/sg-run-job
+++ b/sg-run-job
@@ -411,6 +411,16 @@ 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
+
+    # Spawn and reap fep test to make it non-fatal
+    reap-ts [spawn-ts . = ts-xtf-fep]
+
+    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]
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [OSSTEST PATCH RFC v2 13/14] make-flight: create 5 xtf jobs
  2016-08-08  9:22 [OSSTEST PATCH RFC v2 00/14] Integrate XTF into OSSTest Wei Liu
                   ` (11 preceding siblings ...)
  2016-08-08  9:22 ` [OSSTEST PATCH RFC v2 12/14] sg-run-job: test-xtf recipe Wei Liu
@ 2016-08-08  9:22 ` Wei Liu
  2016-08-08 14:56   ` Ian Jackson
  2016-08-08  9:22 ` [OSSTEST PATCH RFC v2 14/14] Create XTF branch Wei Liu
  13 siblings, 1 reply; 31+ messages in thread
From: Wei Liu @ 2016-08-08  9:22 UTC (permalink / raw)
  To: Xen-devel; +Cc: ian.jackson, Wei Liu

Create jobs only for x86 and set host flag diverse-xtf-x86.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
 make-flight | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/make-flight b/make-flight
index 18e5bc3..613b3d0 100755
--- a/make-flight
+++ b/make-flight
@@ -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
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [OSSTEST PATCH RFC v2 14/14] Create XTF branch
  2016-08-08  9:22 [OSSTEST PATCH RFC v2 00/14] Integrate XTF into OSSTest Wei Liu
                   ` (12 preceding siblings ...)
  2016-08-08  9:22 ` [OSSTEST PATCH RFC v2 13/14] make-flight: create 5 xtf jobs Wei Liu
@ 2016-08-08  9:22 ` Wei Liu
  13 siblings, 0 replies; 31+ messages in thread
From: Wei Liu @ 2016-08-08  9:22 UTC (permalink / raw)
  To: Xen-devel; +Cc: ian.jackson, Wei Liu

This branch contains Xen and Linux build jobs and all jobs which contain
xtf in their name.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
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(-)

diff --git a/ap-fetch-version b/ap-fetch-version
index f26d60a..fa78d51 100755
--- a/ap-fetch-version
+++ b/ap-fetch-version
@@ -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
diff --git a/ap-print-url b/ap-print-url
index 4088852..8c5e604 100755
--- a/ap-print-url
+++ b/ap-print-url
@@ -58,6 +58,9 @@ rumpuserxen)
 seabios)
 	echo $TREE_SEABIOS_UPSTREAM
 	;;
+xtf)
+	echo $TREE_XTF_UPSTREAM
+	;;
 ovmf)
 	echo $TREE_OVMF_UPSTREAM
 	;;
diff --git a/ap-push b/ap-push
index e33a803..63b7f80 100755
--- a/ap-push
+++ b/ap-push
@@ -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
diff --git a/cr-daily-branch b/cr-daily-branch
index 21780b8..3f74e2e 100755
--- a/cr-daily-branch
+++ b/cr-daily-branch
@@ -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
diff --git a/cr-for-branches b/cr-for-branches
index 6a161d4..5e8b1a4 100755
--- a/cr-for-branches
+++ b/cr-for-branches
@@ -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
diff --git a/cri-common b/cri-common
index cdee48d..6d5545c 100644
--- a/cri-common
+++ b/cri-common
@@ -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 ;;
diff --git a/make-flight b/make-flight
index 613b3d0..8aec1a7 100755
--- a/make-flight
+++ b/make-flight
@@ -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) ;;
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* Re: [OSSTEST PATCH RFC v2 03/14] ap-common: add xtf tree
  2016-08-08  9:22 ` [OSSTEST PATCH RFC v2 03/14] ap-common: add xtf tree Wei Liu
@ 2016-08-08 14:46   ` Ian Jackson
  0 siblings, 0 replies; 31+ messages in thread
From: Ian Jackson @ 2016-08-08 14:46 UTC (permalink / raw)
  To: Wei Liu; +Cc: Xen-devel

Wei Liu writes ("[OSSTEST PATCH RFC v2 03/14] ap-common: add xtf tree"):
> Signed-off-by: Wei Liu <wei.liu2@citrix.com>

Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [OSSTEST PATCH RFC v2 01/14] ts-xen-build: always compile in FEP support
  2016-08-08  9:22 ` [OSSTEST PATCH RFC v2 01/14] ts-xen-build: always compile in FEP support Wei Liu
@ 2016-08-08 14:46   ` Ian Jackson
  0 siblings, 0 replies; 31+ messages in thread
From: Ian Jackson @ 2016-08-08 14:46 UTC (permalink / raw)
  To: Wei Liu; +Cc: Xen-devel

Wei Liu writes ("[OSSTEST PATCH RFC v2 01/14] ts-xen-build: always compile in FEP support"):
> 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.

Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [OSSTEST PATCH RFC v2 05/14] BuildSupport: move buildcmd_stamped_logged here
  2016-08-08  9:22 ` [OSSTEST PATCH RFC v2 05/14] BuildSupport: move buildcmd_stamped_logged here Wei Liu
@ 2016-08-08 14:47   ` Ian Jackson
  0 siblings, 0 replies; 31+ messages in thread
From: Ian Jackson @ 2016-08-08 14:47 UTC (permalink / raw)
  To: Wei Liu; +Cc: Xen-devel

Wei Liu writes ("[OSSTEST PATCH RFC v2 05/14] BuildSupport: move buildcmd_stamped_logged here"):
> ... so that other build scripts can use it, too.
> 
> It now accepts one more parameter called "component" to be useful in
> other build scripts.

Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [OSSTEST PATCH RFC v2 06/14] Introduce ts-xtf-build
  2016-08-08  9:22 ` [OSSTEST PATCH RFC v2 06/14] Introduce ts-xtf-build Wei Liu
@ 2016-08-08 14:48   ` Ian Jackson
  0 siblings, 0 replies; 31+ messages in thread
From: Ian Jackson @ 2016-08-08 14:48 UTC (permalink / raw)
  To: Wei Liu; +Cc: Xen-devel

Wei Liu writes ("[OSSTEST PATCH RFC v2 06/14] Introduce ts-xtf-build"):
> Clone, build and package XTF for later use.
> 
> Signed-off-by: Wei Liu <wei.liu2@citrix.com>

Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [OSSTEST PATCH RFC v2 08/14] Introduce ts-xtf-install
  2016-08-08  9:22 ` [OSSTEST PATCH RFC v2 08/14] Introduce ts-xtf-install Wei Liu
@ 2016-08-08 14:49   ` Ian Jackson
  0 siblings, 0 replies; 31+ messages in thread
From: Ian Jackson @ 2016-08-08 14:49 UTC (permalink / raw)
  To: Wei Liu; +Cc: Xen-devel

Wei Liu writes ("[OSSTEST PATCH RFC v2 08/14] Introduce ts-xtf-install"):
> Extract XTF to the desire location.
                           ^d

Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [OSSTEST PATCH RFC v2 09/14] mfi-common: create xtf build job for 4.8 onwards
  2016-08-08  9:22 ` [OSSTEST PATCH RFC v2 09/14] mfi-common: create xtf build job for 4.8 onwards Wei Liu
@ 2016-08-08 14:51   ` Ian Jackson
  2016-08-08 16:21     ` Wei Liu
  0 siblings, 1 reply; 31+ messages in thread
From: Ian Jackson @ 2016-08-08 14:51 UTC (permalink / raw)
  To: Wei Liu; +Cc: Xen-devel, ian.jackson

Wei Liu writes ("[OSSTEST PATCH RFC v2 09/14] mfi-common: create xtf build job for 4.8 onwards"):
> Signed-off-by: Wei Liu <wei.liu2@citrix.com>

FAOD I am expecting xtf to be useable for older branches by the time
this patch series is non-RFC.

Thanks,
Ian.



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [OSSTEST PATCH RFC v2 10/14] Introduce ts-xtf-fep
  2016-08-08  9:22 ` [OSSTEST PATCH RFC v2 10/14] Introduce ts-xtf-fep Wei Liu
@ 2016-08-08 14:52   ` Ian Jackson
  0 siblings, 0 replies; 31+ messages in thread
From: Ian Jackson @ 2016-08-08 14:52 UTC (permalink / raw)
  To: Wei Liu; +Cc: Xen-devel

Wei Liu writes ("[OSSTEST PATCH RFC v2 10/14] Introduce ts-xtf-fep"):
> Test the availability of FEP during runtime.
...
> +    $output =~ m/^(\d+)$/ or die "$output ?";
> +
> +    return $1;
> +}
> +
> +exit fep_test();

I think something in this script should log the exit status.  Digging
the exit status out of the logs is not particularly easy.

Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [OSSTEST PATCH RFC v2 11/14] Introduce ts-xtf-run
  2016-08-08  9:22 ` [OSSTEST PATCH RFC v2 11/14] Introduce ts-xtf-run Wei Liu
@ 2016-08-08 14:55   ` Ian Jackson
  2016-08-09  8:11     ` Wei Liu
  2016-08-08 16:29   ` Andrew Cooper
  1 sibling, 1 reply; 31+ messages in thread
From: Ian Jackson @ 2016-08-08 14:55 UTC (permalink / raw)
  To: Wei Liu; +Cc: Xen-devel

Wei Liu writes ("[OSSTEST PATCH RFC v2 11/14] Introduce ts-xtf-run"):
> This is the main script for running XTF.  It will first perform
> selftest, and then run each XTF test case as a substep.
...
> +# XTF results (runner returned numeric values) and OSStest results:
> +#
> +# SUCCESS(0)  -> pass
> +# SKIP(3)     -> skip
> +# ERROR(4)    -> fail
> +# FAILURE(5)  -> fail
> +#
> +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 result $xret";

Wouldn't it be nicer to delete the separate comment and write

  +    return "pass" if $xret == 0; # XTF SUCCESS

etc. ?

> +    if (! eval {
            ^
This space is anomalous coding style.


Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [OSSTEST PATCH RFC v2 12/14] sg-run-job: test-xtf recipe
  2016-08-08  9:22 ` [OSSTEST PATCH RFC v2 12/14] sg-run-job: test-xtf recipe Wei Liu
@ 2016-08-08 14:56   ` Ian Jackson
  0 siblings, 0 replies; 31+ messages in thread
From: Ian Jackson @ 2016-08-08 14:56 UTC (permalink / raw)
  To: Wei Liu; +Cc: Xen-devel

Wei Liu writes ("[OSSTEST PATCH RFC v2 12/14] sg-run-job: test-xtf recipe"):
> Install XTF, run FEP test and then run all available tests.

Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [OSSTEST PATCH RFC v2 13/14] make-flight: create 5 xtf jobs
  2016-08-08  9:22 ` [OSSTEST PATCH RFC v2 13/14] make-flight: create 5 xtf jobs Wei Liu
@ 2016-08-08 14:56   ` Ian Jackson
  0 siblings, 0 replies; 31+ messages in thread
From: Ian Jackson @ 2016-08-08 14:56 UTC (permalink / raw)
  To: Wei Liu; +Cc: Xen-devel

Wei Liu writes ("[OSSTEST PATCH RFC v2 13/14] make-flight: create 5 xtf jobs"):
> Create jobs only for x86 and set host flag diverse-xtf-x86.

I think I acked this one previously.  Anyway,

Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [OSSTEST PATCH RFC v2 09/14] mfi-common: create xtf build job for 4.8 onwards
  2016-08-08 14:51   ` Ian Jackson
@ 2016-08-08 16:21     ` Wei Liu
  2016-08-08 16:26       ` Andrew Cooper
  0 siblings, 1 reply; 31+ messages in thread
From: Wei Liu @ 2016-08-08 16:21 UTC (permalink / raw)
  To: Ian Jackson; +Cc: Xen-devel, Wei Liu, Andrew Cooper

On Mon, Aug 08, 2016 at 03:51:06PM +0100, Ian Jackson wrote:
> Wei Liu writes ("[OSSTEST PATCH RFC v2 09/14] mfi-common: create xtf build job for 4.8 onwards"):
> > Signed-off-by: Wei Liu <wei.liu2@citrix.com>
> 
> FAOD I am expecting xtf to be useable for older branches by the time
> this patch series is non-RFC.
> 

Andrew, I think you have thought about this?

Wei.

> Thanks,
> Ian.
> 
> 

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [OSSTEST PATCH RFC v2 09/14] mfi-common: create xtf build job for 4.8 onwards
  2016-08-08 16:21     ` Wei Liu
@ 2016-08-08 16:26       ` Andrew Cooper
  2016-08-08 16:58         ` Wei Liu
  0 siblings, 1 reply; 31+ messages in thread
From: Andrew Cooper @ 2016-08-08 16:26 UTC (permalink / raw)
  To: Wei Liu, Ian Jackson; +Cc: Xen-devel

On 08/08/16 17:21, Wei Liu wrote:
> On Mon, Aug 08, 2016 at 03:51:06PM +0100, Ian Jackson wrote:
>> Wei Liu writes ("[OSSTEST PATCH RFC v2 09/14] mfi-common: create xtf build job for 4.8 onwards"):
>>> Signed-off-by: Wei Liu <wei.liu2@citrix.com>
>> FAOD I am expecting xtf to be useable for older branches by the time
>> this patch series is non-RFC.
>>
> Andrew, I think you have thought about this?

We should aim for that.

IIRC, all we need is the ./xtf-runner mode to read from xenconsoled log
files rather than using `xl console` ?

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [OSSTEST PATCH RFC v2 11/14] Introduce ts-xtf-run
  2016-08-08  9:22 ` [OSSTEST PATCH RFC v2 11/14] Introduce ts-xtf-run Wei Liu
  2016-08-08 14:55   ` Ian Jackson
@ 2016-08-08 16:29   ` Andrew Cooper
  2016-08-08 16:56     ` Ian Jackson
  1 sibling, 1 reply; 31+ messages in thread
From: Andrew Cooper @ 2016-08-08 16:29 UTC (permalink / raw)
  To: Wei Liu, Xen-devel; +Cc: ian.jackson

On 08/08/16 10:22, Wei Liu wrote:
> 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.

What is OSSTests general approach to recovering crashed hosts?

XenRT recovers the host and continues testing, so subsequent steps are
not blocked.  (especially in a case like this, where there is a
distinctly more likely chance that the host might crash.)

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [OSSTEST PATCH RFC v2 11/14] Introduce ts-xtf-run
  2016-08-08 16:29   ` Andrew Cooper
@ 2016-08-08 16:56     ` Ian Jackson
  0 siblings, 0 replies; 31+ messages in thread
From: Ian Jackson @ 2016-08-08 16:56 UTC (permalink / raw)
  To: Andrew Cooper; +Cc: Xen-devel, Wei Liu

Andrew Cooper writes ("Re: [Xen-devel] [OSSTEST PATCH RFC v2 11/14] Introduce ts-xtf-run"):
> On 08/08/16 10:22, Wei Liu wrote:
...
> > The script may exit early if it detects the test host is down or
> > xtf-runner returns non-recognisable exit code.
> 
> What is OSSTests general approach to recovering crashed hosts?

osstest will attempt to recover the host by power cycling it, for the
purposes of capturing logs.

It won't resume the test job where it left off.  I don't think that's
desirable.

> XenRT recovers the host and continues testing, so subsequent steps are
> not blocked.  (especially in a case like this, where there is a
> distinctly more likely chance that the host might crash.)

The effect of Wei's patch is that, if one of the XTF tests causes the
host to crash:
 - this will be treated as a failure of that specific XTF test
- the osstest log capture will initially fail and the host will be
    power cycled in an attempt to be able to capture logs stored on
    the host hard disk
 - the remaining XTF tests in that job will not be run
 - the other jobs in the same flight will run (and perhaps experience
    the same bug, or perhaps not)
 - the next flight to allocate the crashed host will wipe it by
    power cycling it and netbooting debian-installer

Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [OSSTEST PATCH RFC v2 09/14] mfi-common: create xtf build job for 4.8 onwards
  2016-08-08 16:26       ` Andrew Cooper
@ 2016-08-08 16:58         ` Wei Liu
  0 siblings, 0 replies; 31+ messages in thread
From: Wei Liu @ 2016-08-08 16:58 UTC (permalink / raw)
  To: Andrew Cooper; +Cc: Ian Jackson, Wei Liu, Xen-devel

On Mon, Aug 08, 2016 at 05:26:16PM +0100, Andrew Cooper wrote:
> On 08/08/16 17:21, Wei Liu wrote:
> > On Mon, Aug 08, 2016 at 03:51:06PM +0100, Ian Jackson wrote:
> >> Wei Liu writes ("[OSSTEST PATCH RFC v2 09/14] mfi-common: create xtf build job for 4.8 onwards"):
> >>> Signed-off-by: Wei Liu <wei.liu2@citrix.com>
> >> FAOD I am expecting xtf to be useable for older branches by the time
> >> this patch series is non-RFC.
> >>
> > Andrew, I think you have thought about this?
> 
> We should aim for that.
> 
> IIRC, all we need is the ./xtf-runner mode to read from xenconsoled log
> files rather than using `xl console` ?
> 

Yes.

Wei.

> ~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [OSSTEST PATCH RFC v2 11/14] Introduce ts-xtf-run
  2016-08-08 14:55   ` Ian Jackson
@ 2016-08-09  8:11     ` Wei Liu
  0 siblings, 0 replies; 31+ messages in thread
From: Wei Liu @ 2016-08-09  8:11 UTC (permalink / raw)
  To: Ian Jackson; +Cc: Xen-devel, Wei Liu

On Mon, Aug 08, 2016 at 03:55:15PM +0100, Ian Jackson wrote:
> Wei Liu writes ("[OSSTEST PATCH RFC v2 11/14] Introduce ts-xtf-run"):
> > This is the main script for running XTF.  It will first perform
> > selftest, and then run each XTF test case as a substep.
> ...
> > +# XTF results (runner returned numeric values) and OSStest results:
> > +#
> > +# SUCCESS(0)  -> pass
> > +# SKIP(3)     -> skip
> > +# ERROR(4)    -> fail
> > +# FAILURE(5)  -> fail
> > +#
> > +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 result $xret";
> 
> Wouldn't it be nicer to delete the separate comment and write
> 
>   +    return "pass" if $xret == 0; # XTF SUCCESS
> 
> etc. ?
> 
> > +    if (! eval {
>             ^
> This space is anomalous coding style.
> 
> 
> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>

Fixed both issues and added your ack. Thanks.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2016-08-09  8:11 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-08  9:22 [OSSTEST PATCH RFC v2 00/14] Integrate XTF into OSSTest Wei Liu
2016-08-08  9:22 ` [OSSTEST PATCH RFC v2 01/14] ts-xen-build: always compile in FEP support Wei Liu
2016-08-08 14:46   ` Ian Jackson
2016-08-08  9:22 ` [OSSTEST PATCH RFC v2 02/14] DO NOT APPLY ts-leak-check: sleep 5 seconds before collecting stuff Wei Liu
2016-08-08  9:22 ` [OSSTEST PATCH RFC v2 03/14] ap-common: add xtf tree Wei Liu
2016-08-08 14:46   ` Ian Jackson
2016-08-08  9:22 ` [OSSTEST PATCH RFC v2 04/14] DO NOT APPLY point xtf to my personal tree Wei Liu
2016-08-08  9:22 ` [OSSTEST PATCH RFC v2 05/14] BuildSupport: move buildcmd_stamped_logged here Wei Liu
2016-08-08 14:47   ` Ian Jackson
2016-08-08  9:22 ` [OSSTEST PATCH RFC v2 06/14] Introduce ts-xtf-build Wei Liu
2016-08-08 14:48   ` Ian Jackson
2016-08-08  9:22 ` [OSSTEST PATCH RFC v2 07/14] sg-run-job: create xtf build recipe Wei Liu
2016-08-08  9:22 ` [OSSTEST PATCH RFC v2 08/14] Introduce ts-xtf-install Wei Liu
2016-08-08 14:49   ` Ian Jackson
2016-08-08  9:22 ` [OSSTEST PATCH RFC v2 09/14] mfi-common: create xtf build job for 4.8 onwards Wei Liu
2016-08-08 14:51   ` Ian Jackson
2016-08-08 16:21     ` Wei Liu
2016-08-08 16:26       ` Andrew Cooper
2016-08-08 16:58         ` Wei Liu
2016-08-08  9:22 ` [OSSTEST PATCH RFC v2 10/14] Introduce ts-xtf-fep Wei Liu
2016-08-08 14:52   ` Ian Jackson
2016-08-08  9:22 ` [OSSTEST PATCH RFC v2 11/14] Introduce ts-xtf-run Wei Liu
2016-08-08 14:55   ` Ian Jackson
2016-08-09  8:11     ` Wei Liu
2016-08-08 16:29   ` Andrew Cooper
2016-08-08 16:56     ` Ian Jackson
2016-08-08  9:22 ` [OSSTEST PATCH RFC v2 12/14] sg-run-job: test-xtf recipe Wei Liu
2016-08-08 14:56   ` Ian Jackson
2016-08-08  9:22 ` [OSSTEST PATCH RFC v2 13/14] make-flight: create 5 xtf jobs Wei Liu
2016-08-08 14:56   ` Ian Jackson
2016-08-08  9:22 ` [OSSTEST PATCH RFC v2 14/14] Create XTF branch Wei Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).