xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [OSSTEST PATCH v4 00/11] livepatch test support
@ 2017-06-07 17:48 Ian Jackson
  2017-06-07 17:48 ` [OSSTEST PATCH 01/11] TestSupport: target_cmd_root_status: New sub which returns return code Ian Jackson
                   ` (12 more replies)
  0 siblings, 13 replies; 17+ messages in thread
From: Ian Jackson @ 2017-06-07 17:48 UTC (permalink / raw)
  To: xen-devel

Thanks to Konrad, who passed me his git branch under the table.
I have tidied up some loose ends, and tested it with my xen.git
Makefile patches.

Konrad, would you please take a look at this to make sure you don't
think I've broken anything and that my changes look sane ?  In
particlar the patches I have marked with `#' below.

 m  01   TestSupport: target_cmd_root_status: New sub which returns return code.
 -  02   TestSupport: target_cmd_*: Add some doc comments
 -  03   TestSupport: target_cmd_output_root_status: New sub
 *# 04   mfi-common: Add an enable_livepatch runvar to the Xen build jobs
 *# 05   ts-xen-build: Build livepatches test-cases
 -  06   ts-livepatch: Initial test-cases.
 -  07   sg-run-job: Add the test-livepatch.
 m  08   make-flight: Add livepatch build/test target in the matrix.
 *# 09   PDU/lab: Similar to xenuse
 +  10   cs-adjust-flight: Rework runvar-build-set new value handling
 +  11   sg-check-tested: Provide --flight option

Key:
 m   Changed only the commit message
 -   Very minor changes
 *   Actual changes
 +   Added patch (not really related, TBH)
  #  Konrad, please review this! 
(All compared to Konrad's v3)

Thanks,
Ian.

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

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

* [OSSTEST PATCH 01/11] TestSupport: target_cmd_root_status: New sub which returns return code.
  2017-06-07 17:48 [OSSTEST PATCH v4 00/11] livepatch test support Ian Jackson
@ 2017-06-07 17:48 ` Ian Jackson
  2017-06-07 17:48 ` [OSSTEST PATCH 02/11] TestSupport: target_cmd_*: Add some doc comments Ian Jackson
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 17+ messages in thread
From: Ian Jackson @ 2017-06-07 17:48 UTC (permalink / raw)
  To: xen-devel

From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>

All the different target_cmd_* end up calling tcmdex
which has the unfortunate side-effect of calling 'die' if
the SSH sessions results in any return code not zero.

That is fine, except for tests where we want to get a non-zero
return value.

This patch adds the $badstatusok to tcmdex - and makes all
the existing callers pass in the value of zero to it. This
way the commands behave the normal old way.
to all the other functions which use tcmdex.

The only exposed function that does it differently
is target_cmd_root_status.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
v1: New submission
v2: Change to target_cmd_root_status
    Continue doing the 'die' in tcmdex, but only if $badstatusok is zero.
    Plumb the $badstatusok through to tcmd.
v3: Removed the extra space in tcmdex
    Added Ian's Ack
v4: Edited commit message a bit
---
 Osstest/TestSupport.pm | 23 +++++++++++++----------
 1 file changed, 13 insertions(+), 10 deletions(-)

diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index c23ac13..c36dc76 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -52,6 +52,7 @@ BEGIN {
                       unique_incrementing_runvar next_unique_name
                       stashfilecontents
 
+                      target_cmd_root_status
                       target_cmd_root target_cmd target_cmd_build
                       target_cmd_output_root target_cmd_output
                       target_cmd_inputfh_root sshuho
@@ -441,20 +442,21 @@ sub sshopts () {
 }
 
 sub tcmdex {
-    my ($timeout,$stdin,$stdout,$cmd,$optsref,@args) = @_;
+    my ($timeout,$stdin,$stdout,$badstatusok,$cmd,$optsref,@args) = @_;
     logm("executing $cmd ... @args");
     # We use timeout(1) as a backstop, in case $cmd doesn't die.  We
     # need $cmd to die because we won't release the resources we own
     # until all of our children are dead.
     my $r= cmd($timeout,$stdin,$stdout,
 	       'timeout',$timeout+30, $cmd,@$optsref,@args);
+    return $r if $badstatusok;
     $r and die "status $r";
 }
 
 sub tgetfileex {
     my ($ruser, $ho,$timeout, $rsrc,$ldst) = @_;
     unlink $ldst or $!==&ENOENT or die "$ldst $!";
-    tcmdex($timeout,undef,undef,
+    tcmdex($timeout,undef,undef, 0,
            'scp', sshopts(),
            sshuho($ruser,$ho).":$rsrc", $ldst);
 } 
@@ -471,12 +473,12 @@ sub tputfileex {
     my ($ruser, $ho,$timeout, $lsrc,$rdst, $rsync) = @_;
     my @args= ($lsrc, sshuho($ruser,$ho).":$rdst");
     if (!defined $rsync) {
-        tcmdex($timeout,undef,undef,
+        tcmdex($timeout,undef,undef, 0,
                'scp', sshopts(),
                @args);
     } else {
         unshift @args, $rsync if length $rsync;
-        tcmdex($timeout,undef,undef,
+        tcmdex($timeout,undef,undef, 0,
                'rsync', [ '-e', 'ssh '.join(' ',@{ sshopts() }) ],
                @args);
     }
@@ -682,20 +684,21 @@ sub target_await_down ($$) {
 }    
 
 sub tcmd { # $tcmd will be put between '' but not escaped
-    my ($stdin,$stdout,$user,$ho,$tcmd,$timeout,$extrasshopts) = @_;
+    my ($stdin,$stdout,$badstatusok,$user,$ho,$tcmd,$timeout,$extrasshopts) = @_;
     $timeout=30 if !defined $timeout;
     target_adjust_timeout($ho,\$timeout);
     $tcmd = ' ' if $tcmd eq ''; # ssh host '' logs in !
-    tcmdex($timeout,$stdin,$stdout,
+    tcmdex($timeout,$stdin,$stdout, $badstatusok,
            'ssh', sshopts(), @{ $extrasshopts || [] },
            sshuho($user,$ho), $tcmd);
 }
-sub target_cmd ($$;$$) { tcmd(undef,undef,'osstest',@_); }
-sub target_cmd_root ($$;$$) { tcmd(undef,undef,'root',@_); }
+sub target_cmd ($$;$$) { tcmd(undef,undef,0, 'osstest',@_); }
+sub target_cmd_root ($$;$$) { tcmd(undef,undef,0, 'root',@_); }
+sub target_cmd_root_status ($$;$$) { tcmd(undef,undef,1, 'root',@_); }
 
 sub tcmdout {
     my $stdout= IO::File::new_tmpfile();
-    tcmd(undef,$stdout,@_);
+    tcmd(undef,$stdout,0,@_);
     $stdout->seek(0,0) or die "$stdout $!";
     my $r;
     { local ($/) = undef;
@@ -710,7 +713,7 @@ sub target_cmd_output_root ($$;$) { tcmdout('root',@_); }
 
 sub target_cmd_inputfh_root ($$$;$$) {
     my ($tho,$stdinfh,$tcmd,@rest) = @_;
-    tcmd($stdinfh,undef,'root',$tho,$tcmd,@rest);
+    tcmd($stdinfh,undef,0,'root',$tho,$tcmd,@rest);
 }
 
 sub poll_loop ($$$&) {
-- 
2.1.4


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

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

* [OSSTEST PATCH 02/11] TestSupport: target_cmd_*: Add some doc comments
  2017-06-07 17:48 [OSSTEST PATCH v4 00/11] livepatch test support Ian Jackson
  2017-06-07 17:48 ` [OSSTEST PATCH 01/11] TestSupport: target_cmd_root_status: New sub which returns return code Ian Jackson
@ 2017-06-07 17:48 ` Ian Jackson
  2017-06-07 17:48 ` [OSSTEST PATCH 03/11] TestSupport: target_cmd_output_root_status: New sub Ian Jackson
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 17+ messages in thread
From: Ian Jackson @ 2017-06-07 17:48 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
v4: Split off from the patch introducing target_cmd_output_root_status.
    Rewrote all the comments to be true.
---
 Osstest/TestSupport.pm | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index c36dc76..f54962a 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -692,8 +692,18 @@ sub tcmd { # $tcmd will be put between '' but not escaped
            'ssh', sshopts(), @{ $extrasshopts || [] },
            sshuho($user,$ho), $tcmd);
 }
+
+# target_cmd[_VARIANT]($ho, $cmd, [ $timeout, \@EXTRASSHOPTS ]);
+#
+# target_cmd executes $cmd with the shell as the osstest user on $ho.
+# stdout goes to our own stdout.  dies if the command exits nonzero.
 sub target_cmd ($$;$$) { tcmd(undef,undef,0, 'osstest',@_); }
+
+# Like target_cmd but as root.
 sub target_cmd_root ($$;$$) { tcmd(undef,undef,0, 'root',@_); }
+
+# Like target_cmd_root, but does not die if the command fails.
+# Instead, returns the wait status (ie, what came in $?)
 sub target_cmd_root_status ($$;$$) { tcmd(undef,undef,1, 'root',@_); }
 
 sub tcmdout {
@@ -708,6 +718,7 @@ sub tcmdout {
     return $r;
 }
 
+# Like target_cmd[_root], but collect the stdout and return it as a string.
 sub target_cmd_output ($$;$) { tcmdout('osstest',@_); }
 sub target_cmd_output_root ($$;$) { tcmdout('root',@_); }
 
-- 
2.1.4


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

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

* [OSSTEST PATCH 03/11] TestSupport: target_cmd_output_root_status: New sub
  2017-06-07 17:48 [OSSTEST PATCH v4 00/11] livepatch test support Ian Jackson
  2017-06-07 17:48 ` [OSSTEST PATCH 01/11] TestSupport: target_cmd_root_status: New sub which returns return code Ian Jackson
  2017-06-07 17:48 ` [OSSTEST PATCH 02/11] TestSupport: target_cmd_*: Add some doc comments Ian Jackson
@ 2017-06-07 17:48 ` Ian Jackson
  2017-06-07 17:48 ` [OSSTEST PATCH 04/11] mfi-common: Add an enable_livepatch runvar to the Xen build jobs Ian Jackson
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 17+ messages in thread
From: Ian Jackson @ 2017-06-07 17:48 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson

From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>

Similar to target_cmd_root_status except it outputs both output _and_
status.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
v2: Initial posting
v3: Sprinkle some comments.
v4: Move doc comments out of this patch (and rewrite them).
    Edit commit message.
---
 Osstest/TestSupport.pm | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index f54962a..fc1aa7d 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -52,7 +52,7 @@ BEGIN {
                       unique_incrementing_runvar next_unique_name
                       stashfilecontents
 
-                      target_cmd_root_status
+                      target_cmd_root_status target_cmd_output_root_status
                       target_cmd_root target_cmd target_cmd_build
                       target_cmd_output_root target_cmd_output
                       target_cmd_inputfh_root sshuho
@@ -708,19 +708,25 @@ sub target_cmd_root_status ($$;$$) { tcmd(undef,undef,1, 'root',@_); }
 
 sub tcmdout {
     my $stdout= IO::File::new_tmpfile();
-    tcmd(undef,$stdout,0,@_);
+    my $badstatusok = $_[1];
+    my $rc = tcmd(undef,$stdout,@_);
     $stdout->seek(0,0) or die "$stdout $!";
     my $r;
     { local ($/) = undef;
       $r= <$stdout>; }
     die "$stdout $!" if !defined $r or $stdout->error or !close $stdout;
     chomp($r);
+    return ($rc, $r) if $badstatusok;
     return $r;
 }
 
 # Like target_cmd[_root], but collect the stdout and return it as a string.
-sub target_cmd_output ($$;$) { tcmdout('osstest',@_); }
-sub target_cmd_output_root ($$;$) { tcmdout('root',@_); }
+# Like target_cmd[_root], but collects the stdout and returns it as a string.
+sub target_cmd_output ($$;$) { tcmdout(0, 'osstest',@_); }
+sub target_cmd_output_root ($$;$) { tcmdout(0, 'root',@_); }
+
+# Like target_cmd_root_status but returns a tuple ($?, $stdout_data).
+sub target_cmd_output_root_status ($$;$$) { tcmdout(1, 'root',@_); }
 
 sub target_cmd_inputfh_root ($$$;$$) {
     my ($tho,$stdinfh,$tcmd,@rest) = @_;
-- 
2.1.4


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

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

* [OSSTEST PATCH 04/11] mfi-common: Add an enable_livepatch runvar to the Xen build jobs
  2017-06-07 17:48 [OSSTEST PATCH v4 00/11] livepatch test support Ian Jackson
                   ` (2 preceding siblings ...)
  2017-06-07 17:48 ` [OSSTEST PATCH 03/11] TestSupport: target_cmd_output_root_status: New sub Ian Jackson
@ 2017-06-07 17:48 ` Ian Jackson
  2017-06-07 17:48 ` [OSSTEST PATCH 05/11] ts-xen-build: Build livepatches test-cases Ian Jackson
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 17+ messages in thread
From: Ian Jackson @ 2017-06-07 17:48 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson

From: Konrad Rzeszutek Wilk <konrad@kernel.org>

Set it to true on branches that support livepatching (Xen versions 4.9
and higher).  Currently nothing reads this variable, so no overall
functional change.

Changes to the flights are as follows.  On these branches:
        osstest
	xen-4.8-testing
	xen-4.9-testing
	xen-unstable
	xen-unstable-smoke
in these jobs:
	build-amd64    build-amd64-xsm
	build-arm64    build-arm64-xsm
	build-armhf    build-armhf-xsm
	build-i386     build-i386-xsm
add the runvar setting `enable_livepatch=true'.

Signed-off-by: Konrad Rzeszutek Wilk <konrad@kernel.org>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>

---
v3: New patch
v4: Regularise branch_wants_livepatch exit status
      (shell functions return 0 for true and non-0 for false).
    Use the `livepatch_runvars' pattern, so that we do not add
      enable_livepatch=false to any jobs.
    Enable livepatch testing on osstest branch and disable it
      on all other non-Xen branches.
    Rewrote commit message.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
 mfi-common | 25 +++++++++++++++++++++++--
 1 file changed, 23 insertions(+), 2 deletions(-)

diff --git a/mfi-common b/mfi-common
index ec31e2e..7b1e60c 100644
--- a/mfi-common
+++ b/mfi-common
@@ -76,6 +76,23 @@ branch_wants_xtf_tests () {
   esac
 }
 
+branch_wants_livepatch () {
+  case "$branch" in
+    xen-3.*)    return 1;;
+    xen-4.0*)   return 1;;
+    xen-4.1*)   return 1;;
+    xen-4.2*)   return 1;;
+    xen-4.3*)   return 1;;
+    xen-4.4*)   return 1;;
+    xen-4.5*)   return 1;;
+    xen-4.6*)   return 1;;
+    xen-4.7*)   return 1;;
+    xen-*)      return 0;;
+    osstest*)   return 0;;
+    *)          return 1;;
+  esac
+}
+
 job_create_build () {
   job_create_build_filter_callback "$@" || return 0
 
@@ -104,6 +121,7 @@ create_build_jobs () {
   local want_xend build_defxend build_extraxend
   local enable_ovmf
   local build_hostflags
+  local livepatch_runvars
 
   if [ "x$BUILD_LVEXTEND_MAX" != x ]; then
      BUILD_RUNVARS+=" build_lvextend_max=$BUILD_LVEXTEND_MAX "
@@ -197,6 +215,9 @@ create_build_jobs () {
         fi
     fi
 
+    if branch_wants_livepatch; then
+       livepatch_runvars='enable_livepatch=true'
+    fi
     eval "
         arch_runvars=\"\$ARCH_RUNVARS_$arch\"
     "
@@ -211,7 +232,7 @@ create_build_jobs () {
       fi
       job_create_build build-$arch$xsm_suffix build                          \
                 arch=$arch enable_xend=$build_defxend enable_ovmf=$enable_ovmf\
-                enable_xsm=$enable_xsm                                       \
+                enable_xsm=$enable_xsm $livepatch_runvars		     \
         tree_qemu=$TREE_QEMU                                                 \
         tree_qemuu=$TREE_QEMU_UPSTREAM                                       \
         tree_xen=$TREE_XEN                                                   \
@@ -239,7 +260,7 @@ create_build_jobs () {
         # $REVISION_PREVXEN.
         job_create_build build-$arch-prev build                       \
                     arch=$arch enable_xend=false enable_ovmf=$enable_prevovmf\
-                    enable_xsm=false                                         \
+                    enable_xsm=false $livepatch_runvars                      \
             tree_xen=$TREE_XEN                                               \
                     $RUNVARS $BUILD_RUNVARS $BUILD_XEN_RUNVARS $arch_runvars \
                     $hostos_runvars                                          \
-- 
2.1.4


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

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

* [OSSTEST PATCH 05/11] ts-xen-build: Build livepatches test-cases
  2017-06-07 17:48 [OSSTEST PATCH v4 00/11] livepatch test support Ian Jackson
                   ` (3 preceding siblings ...)
  2017-06-07 17:48 ` [OSSTEST PATCH 04/11] mfi-common: Add an enable_livepatch runvar to the Xen build jobs Ian Jackson
@ 2017-06-07 17:48 ` Ian Jackson
  2017-06-07 17:48 ` [OSSTEST PATCH 06/11] ts-livepatch: Initial test-cases Ian Jackson
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 17+ messages in thread
From: Ian Jackson @ 2017-06-07 17:48 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson

From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>

Livepatch compiles and works on x86/ARM{32|64} so we can enable it
in the Xen config when requested by the enable_livepatch runvar.

When we are trying to build with enable_livepatch, run `make
dist-tests' as well, to ship the test cases.  This depends on a
corresponding change to xen.git.

Finally, split the livepatch tests into their own stashed deliverable
from this job.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>

---
v1: New posting
v2: Put the livepatch test-cases in xentlpdist.tar.gz file
v3: Use enable_livepatch to gate the build and tarring the test-cases.
v4: Call `make dist-tests' rather than calling directly deep
     into the xen.git build system.
    Split the output ourselves in `divide' (since make dist-tests
     puts things into dist/install/.)
    Expect the livepath output in DESTDIR/usr/lib/debug/xen-livepatch
     rather than directly in DESTDIR/usr/lib/debug.
    Minor style fix.
    Rewrote the commit message.
---
 ts-xen-build | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/ts-xen-build b/ts-xen-build
index 31acb9d..eaf44b1 100755
--- a/ts-xen-build
+++ b/ts-xen-build
@@ -51,6 +51,7 @@ $dashdashdash //= -1;
 builddirsprops();
 
 my $enable_xsm = ($r{enable_xsm}//'false') =~ m/true/ ? 1 : 0;
+my $enable_livepatch = ($r{enable_livepatch}//'false') =~ m/true/ ? 1 : 0;
 
 $buildcmd_global_prefix= <<END;
     export XEN_CONFIG_EXPERT=y
@@ -95,6 +96,12 @@ sub checkout () {
 	echo >>.config LIBLEAFDIR_x86_64=lib
 	echo >>.config KERNELS=''
 END
+               (${enable_livepatch} ? <<END : '').
+	if test -f xen/Kconfig; then
+		echo >>xen/.config CONFIG_LIVEPATCH=y
+		echo >>xen/.config CONFIG_FAST_SYMBOL_LOOKUP=y
+    fi
+END
                (nonempty($r{enable_xsm}) ? <<END : '').
 	if test -f xen/Kconfig; then
 		echo >>xen/.config CONFIG_XSM='${build_xsm}'
@@ -164,6 +171,12 @@ END
 END
 	store_runvar("flaskpolicy", "xenpolicy-" . $xen_version);
     }
+
+    if ($enable_livepatch) {
+        buildcmd_stamped_logged(600, 'xen', 'xenlpt', '',<<END,'')
+            $make_prefix make $makeflags dist-tests
+END
+    }
 }
 
 sub divide () {
@@ -193,6 +206,12 @@ sub divide () {
                 mv \$mvfiles xeninstall/boot/.
             fi
         fi
+        lp=usr/lib/debug/xen-livepatch
+        mkdir -p xenlpt/\$lp
+        if test -d install/\$lp; then
+            mvfiles=`find install/\$lp '(' -name 'xen-syms*' -o -name '*.map' -o -name '*.livepatch' ')' -print`
+            mv \$mvfiles xenlpt/\$lp/.
+        fi
 	if test -d install/usr/lib64/efi/; then
             if test -f install/usr/lib64/efi/xen.efi; then
                 mkdir -p xeninstall/usr/lib64/efi
@@ -209,6 +228,8 @@ sub stash () {
                     "xen/dist/${part}install",
                     "${part}dist");
     }
+    built_stash($ho, $builddir, "xen/dist/xenlpt", "xenlptdist")
+	if $enable_livepatch;
     built_stash_file($ho, $builddir, "xen-syms", "xen/xen/xen-syms", 1);
     built_stash_file($ho, $builddir, "xen-config", "xen/.config", 1);
     built_stash_file($ho, $builddir, "xen-hv-config", "xen/xen/.config", 1);
-- 
2.1.4


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

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

* [OSSTEST PATCH 06/11] ts-livepatch: Initial test-cases.
  2017-06-07 17:48 [OSSTEST PATCH v4 00/11] livepatch test support Ian Jackson
                   ` (4 preceding siblings ...)
  2017-06-07 17:48 ` [OSSTEST PATCH 05/11] ts-xen-build: Build livepatches test-cases Ian Jackson
@ 2017-06-07 17:48 ` Ian Jackson
  2017-06-07 17:48 ` [OSSTEST PATCH 07/11] sg-run-job: Add the test-livepatch Ian Jackson
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 17+ messages in thread
From: Ian Jackson @ 2017-06-07 17:48 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson

From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>

There are 37 of the test-cases in there. Before we run
any of them we verify that the payload files are present
in /usr/lib/debug.

If so we go through all of the test-cases.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
v1: Initial submission.
v2: Add ts-livepatch-install
    Rename ts-livepatch to ts-livepatch-run
    Use target_cmd_root_status instead of target_cmd_root_rc
    Use target_cmd_output_status as well
    Remove tabs, replace with spaces
    Use Perl for string matching :-)
    Use subroutines for more complex string testing
    Use proper style for variable
v4: Expect the livepath output in DESTDIR/usr/lib/debug/xen-livepatch
     rather than directly in DESTDIR/usr/lib/debug.
    Very minor style changes.
---
 ts-livepatch-install |  37 +++++++++++
 ts-livepatch-run     | 171 +++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 208 insertions(+)
 create mode 100755 ts-livepatch-install
 create mode 100755 ts-livepatch-run

diff --git a/ts-livepatch-install b/ts-livepatch-install
new file mode 100755
index 0000000..d25d482
--- /dev/null
+++ b/ts-livepatch-install
@@ -0,0 +1,37 @@
+#!/usr/bin/perl -w
+# This is part of "osstest", an automated testing framework for Xen.
+# Copyright (c) 2017 Oracle and/or its affiliates. All rights reserved.
+#
+# 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, "xen", "path_xenlptdist",
+            $r{"$ho->{Ident}_xenbuildjob"} // $r{"xenbuildjob"},
+             \%distpath);
+}
+
+extract();
diff --git a/ts-livepatch-run b/ts-livepatch-run
new file mode 100755
index 0000000..f119458
--- /dev/null
+++ b/ts-livepatch-run
@@ -0,0 +1,171 @@
+#!/usr/bin/perl -w
+# This is part of "osstest", an automated testing framework for Xen.
+# Copyright (c) 2017 Oracle and/or its affiliates. All rights reserved.
+#
+# 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
+# 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();
+
+my @livepatch_files = qw(xen_hello_world.livepatch
+			 xen_replace_world.livepatch
+                         xen_bye_world.livepatch
+			 xen_nop.livepatch);
+
+my $xen_extra_info;
+my $xen_minor_ver;
+
+sub populate_data {
+    my @lines = split('\n', $_);
+    foreach my $line (@lines) {
+        my ($key, $values) = split /:/, $line;
+        $values = join("", $values);
+        chomp($values);
+        if ($key =~ m/xen_extra/) {
+            $xen_extra_info = $values;
+        }
+        if ($key =~ m/xen_minor/) {
+            $xen_minor_ver = $values;
+        }
+    }
+    return 1 if $xen_extra_info && $xen_minor_ver;
+    return 0;
+}
+
+sub check_for_hello_world {
+    return m/xen_extra/ && m/Hello World/;
+}
+
+sub check_for_stock {
+    return m/xen_extra/ && m/$xen_extra_info/;
+}
+
+# Make sure the xen_major or xen_minor are not the same as
+# $xen_major_ver or $xen_minor_ver
+sub check_versions {
+    my @lines = split('\n', $_);
+    foreach my $line (@lines) {
+        my ($key, $values) = split /:/, $line;
+        $values = join("", $values);
+        chomp($values);
+        if ($key =~ m/xen_minor/) {
+            if ($values ne $xen_minor_ver ) {
+                return 1;
+            }
+        }
+    }
+    return 0;
+}
+
+my @livepatch_tests = (
+    # Whether we can actually execute it.
+    { C => "xen-livepatch list" },
+    # And we better have a clean slate..
+    { C => "xen-livepatch list", OutputCheck => sub { return !m/xen_/; } },
+    # Sets the default values
+    { C => "xl info", OutputCheck => \&populate_data },
+    # Sanity check that populate_data did its job.
+    { C => "xl info",
+      OutputCheck => \&check_for_stock },
+    # Let it rip!
+    { C => "xen-livepatch revert xen_hello_world", rc => 256 },
+    { C => "xen-livepatch load xen_hello_world.livepatch" },
+    { C => "xen-livepatch load xen_hello_world.livepatch", rc => 256 },
+    { C => "xen-livepatch list",
+      OutputCheck => sub { m/xen_hello_world/ } },
+    { C => "xl info",
+      OutputCheck => \&check_for_hello_world },
+    { C => "xen-livepatch revert xen_hello_world" },
+    { C => "xl info",
+      OutputCheck => \&check_for_stock },
+    { C => "xen-livepatch unload xen_hello_world" },
+    { C => "xen-livepatch unload xen_hello_world", rc => 256 },
+    { C => "xl info",
+      OutputCheck => \&check_for_stock },
+    { C => "xen-livepatch load xen_hello_world.livepatch" },
+    { C => "xl info",
+      OutputCheck => \&check_for_hello_world },
+    { C => "xen-livepatch load xen_bye_world.livepatch" },
+    { C => "xl info",
+      OutputCheck => sub { m/xen_extra/ && m/Bye World/ } },
+    { C => "xen-livepatch upload xen_replace xen_replace_world.livepatch" },
+    { C => "xen-livepatch replace xen_replace" },
+    { C => "xl info",
+      OutputCheck => sub { m/xen_extra/ && m/Hello Again Wo/ } },
+    { C => "xen-livepatch apply xen_hello_world", rc => 256 },
+    { C => "xen-livepatch apply xen_bye_world", rc => 256 },
+    { C => "xen-livepatch apply xen_replace" },
+    { C => "xen-livepatch revert xen_replace" },
+    { C => "xen-livepatch unload xen_replace" },
+    { C => "xen-livepatch unload xen_hello_world" },
+    { C => "xen-livepatch unload xen_bye_world" },
+    { C => "xen-livepatch list",
+      OutputCheck => sub { !m/xen_/ } },
+    { C => "xl info",
+      OutputCheck => \&check_for_stock },
+    { C => "xen-livepatch load xen_nop.livepatch" },
+    { C => "xen-livepatch revert xen_nop" },
+    { C => "xen-livepatch apply xen_nop" },
+    { C => "xl info",
+      OutputCheck => \&check_versions },
+    { C => "xen-livepatch unload xen_nop", rc => 256 },
+    { C => "xen-livepatch revert xen_nop" },
+    { C => "xen-livepatch unload xen_nop" },
+    );
+
+our $ho = selecthost('host');
+
+sub livepatch_test () {
+    logm "Have ".(scalar @livepatch_tests)." test-cases\n";
+    my $rc;
+    my $output;
+
+    foreach my $test (@livepatch_tests) {
+        # Default rc is zero.
+        my $expected_rc = defined($test->{rc}) ? $test->{rc} : 0;
+        my $cmd = "(set -e;cd /usr/lib/debug/xen-livepatch;$test->{C})";
+        my ($rc, $output) = target_cmd_output_root_status($ho, $cmd);
+
+        if ($rc != $expected_rc) {
+            logm "FAILED (got $rc, expected: $expected_rc): \n";
+            die $rc;
+        }
+        if (defined($test->{OutputCheck})) {
+            $_ = $output;
+            $rc=$test->{OutputCheck}->();
+            if ($rc ne 1) {
+                die "FAILED! OutputCheck=$test->{OutputCheck}, input=$output\n";
+            }
+        }
+   }
+   return 0;
+}
+
+sub livepatch_check () {
+    foreach my $file (@livepatch_files) {
+        if (!target_file_exists($ho, "/usr/lib/debug/xen-livepatch/$$file")) {
+            die "$file is missing!\n";
+        }
+    }
+}
+
+
+livepatch_check();
+my $livepatch_result = livepatch_test();
+logm("Livepatch test returned $livepatch_result");
+exit $livepatch_result;
-- 
2.1.4


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

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

* [OSSTEST PATCH 07/11] sg-run-job: Add the test-livepatch.
  2017-06-07 17:48 [OSSTEST PATCH v4 00/11] livepatch test support Ian Jackson
                   ` (5 preceding siblings ...)
  2017-06-07 17:48 ` [OSSTEST PATCH 06/11] ts-livepatch: Initial test-cases Ian Jackson
@ 2017-06-07 17:48 ` Ian Jackson
  2017-06-07 17:48 ` [OSSTEST PATCH 08/11] make-flight: Add livepatch build/test target in the matrix Ian Jackson
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 17+ messages in thread
From: Ian Jackson @ 2017-06-07 17:48 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson

From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
v4: Tiny style change.
---
 sg-run-job | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/sg-run-job b/sg-run-job
index ceb7980..35bc785 100755
--- a/sg-run-job
+++ b/sg-run-job
@@ -441,6 +441,12 @@ proc run-job/test-xtf {} {
     run-ts . = ts-xtf-run
 }
 
+proc need-hosts/test-livepatch {} { return host }
+proc run-job/test-livepatch {} {
+    run-ts . = ts-livepatch-install + host
+    run-ts . = ts-livepatch-run     + host
+}
+
 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] 17+ messages in thread

* [OSSTEST PATCH 08/11] make-flight: Add livepatch build/test target in the matrix.
  2017-06-07 17:48 [OSSTEST PATCH v4 00/11] livepatch test support Ian Jackson
                   ` (6 preceding siblings ...)
  2017-06-07 17:48 ` [OSSTEST PATCH 07/11] sg-run-job: Add the test-livepatch Ian Jackson
@ 2017-06-07 17:48 ` Ian Jackson
  2017-06-07 17:49 ` [OSSTEST PATCH 09/11] PDU/lab: Similar to xenuse Ian Jackson
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 17+ messages in thread
From: Ian Jackson @ 2017-06-07 17:48 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson

From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>

So we can have "test-amd64-amd64-livepatch" or such.

Changes to the flights are as follows.  In these branches:
    osstest
    xen-4.8-testing
    xen-4.9-testing
    xen-unstable
add the new jobs:
    test-amd64-amd64-livepatch
    test-amd64-i386-livepatch
which look a bit like this (test-amd64-amd64-livepatch example):
    all_host_di_version     current
    all_host_suite          jessie
    all_hostflags           arch-amd64,arch-xen-amd64,suite-jessie,purpose-test
    arch                    amd64
    buildjob                build-amd64
    kernbuildjob            build-amd64-pvops
    kernkind                pvops
    toolstack               xl
    xen_boot_append         loglvl=all
    xenbuildjob             build-amd64

Note that we do not add these jobs to xen-unstable-smoke of course,
although we did (earlier) turn livepatching for the Xen build
configuration in those flights, and try building the livepatch test
cases (since those things are cheap).

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
v4: Added flight changes info to the commit message.
---
 make-flight | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/make-flight b/make-flight
index 7833605..11cc01e 100755
--- a/make-flight
+++ b/make-flight
@@ -517,6 +517,17 @@ do_xtf_tests () {
   done
 }
 
+do_livepatch_tests () {
+  if ! branch_wants_livepatch; then
+      return
+  fi
+
+  job_create_test test-$xenarch$kern-$dom0arch-livepatch             \
+       test-livepatch xl $xenarch $dom0arch                          \
+       xen_boot_append='loglvl=all'                                  \
+       all_hostflags=$most_hostflags
+}
+
 do_multivcpu_tests () {
   if [ $xenarch != $dom0arch ]; then
     return
@@ -817,6 +828,7 @@ test_matrix_do_one () {
   do_pvgrub_tests
 
   do_xtf_tests
+  do_livepatch_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] 17+ messages in thread

* [OSSTEST PATCH 09/11] PDU/lab: Similar to xenuse
  2017-06-07 17:48 [OSSTEST PATCH v4 00/11] livepatch test support Ian Jackson
                   ` (7 preceding siblings ...)
  2017-06-07 17:48 ` [OSSTEST PATCH 08/11] make-flight: Add livepatch build/test target in the matrix Ian Jackson
@ 2017-06-07 17:49 ` Ian Jackson
  2017-06-07 17:49 ` [OSSTEST PATCH 10/11] cs-adjust-flight: Rework runvar-build-set new value handling Ian Jackson
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 17+ messages in thread
From: Ian Jackson @ 2017-06-07 17:49 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson

From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>

But a bit different. Here is the syntax:

usage:  lab [-v] arguments
arguments are: {on|off|reboot|info|clear|pxe} tstXXX
           or: pxe     tstXXX [baudrate]
           or: connect tstXXX [baudrate]
           or: speed   tstXXX baudrate
           or: setpxe  tstXXX pxeYYY
           or: setmac  tstXXX xx:xx:xx:xx:xx:xx
  where tstXXX is a system name;  e.g. tst180
        pxeYYY is a pxeboot directory in pxeboot:/shares/tftpboot/lab/; e.g. pxe-bug6512
        xx:xx:xx:xx:xx:xx is a mac address; e.g. 00:e0:81:75:e3:fe
        baudrate is one of [300, 600, 1200, 2400, 4800, 9600, 19200, 38400]
        -v for verbose

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
v4: Change config setting names from XenUse* to OracleLab*

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
 Osstest/PDU/lab.pm | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 56 insertions(+)
 create mode 100644 Osstest/PDU/lab.pm

diff --git a/Osstest/PDU/lab.pm b/Osstest/PDU/lab.pm
new file mode 100644
index 0000000..5d95fc9
--- /dev/null
+++ b/Osstest/PDU/lab.pm
@@ -0,0 +1,56 @@
+# This is part of "osstest", an automated testing framework for Xen.
+# Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
+# 
+# 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/>.
+
+
+package Osstest::PDU::lab;
+
+use strict;
+use warnings;
+
+use Osstest;
+use Osstest::TestSupport;
+use IO::File;
+
+BEGIN {
+    use Exporter ();
+    our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
+    $VERSION     = 1.00;
+    @ISA         = qw(Exporter);
+    @EXPORT      = qw();
+    %EXPORT_TAGS = ( );
+
+    @EXPORT_OK   = qw();
+}
+
+sub new {
+    my ($class, $ho) = @_;
+    return bless { Host => $ho }, $class;
+}
+
+sub pdu_power_state {
+    my ($mo, $on) = @_;
+    my $onoff= $on ? "on" : "off";
+    my $lab= $c{OracleLabPath} || "lab";
+    my $user= get_host_property($mo->{Host}, "OracleLabUser", $c{OracleLabUser} || undef);
+
+    (
+	logm("lab overriding \$USER to $user"),
+	local $ENV{USER} = $user
+    ) if $user;
+    system_checked($lab, "$onoff", "$mo->{Host}{Name}");
+}
+
+1;
-- 
2.1.4


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

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

* [OSSTEST PATCH 10/11] cs-adjust-flight: Rework runvar-build-set new value handling
  2017-06-07 17:48 [OSSTEST PATCH v4 00/11] livepatch test support Ian Jackson
                   ` (8 preceding siblings ...)
  2017-06-07 17:49 ` [OSSTEST PATCH 09/11] PDU/lab: Similar to xenuse Ian Jackson
@ 2017-06-07 17:49 ` Ian Jackson
  2017-06-07 17:49 ` [OSSTEST PATCH 11/11] sg-check-tested: Provide --flight option Ian Jackson
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 17+ messages in thread
From: Ian Jackson @ 2017-06-07 17:49 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson

Previously, if it didn't contain a `.', it would be taken as a flight
name and completed with the old job name.  (This was not documented.)

This meant that there was no way to adjust to refer to a differnet job
in the flight being manipulated without specifying the flight number
(which is not desirable, nor even possible with new:)

Instead, we adopt the convention that a trailing . completes the value
with the old job name.  Values without a . are taken literally as a
job name, resulting in intra-flight references to that job.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
v4: New patch, which helps with issues I tripped over while trying
     to ad-hoc test the livepatch series.
---
 cs-adjust-flight | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/cs-adjust-flight b/cs-adjust-flight
index 9812d12..03257a6 100755
--- a/cs-adjust-flight
+++ b/cs-adjust-flight
@@ -32,6 +32,8 @@
 #                   and, <old-value> is matched against a value
 #                    containing the being-manipulated flight name
 #                    even if the actual runvar value omits it
+#                   and, if <new-value> ends in ., it is
+#                    completed with the <old-value>'s job name
 #
 # <dst-flight>:
 #   <flight>
@@ -361,12 +363,11 @@ sub change__runvar_build_set {
 	return unless $name =~ m/buildjob$/;
 
 	my $oldval = $varrow->{val};
-	$oldval = flight_otherjob($dstflight,$oldval);
-	return unless $oldvalok_fn->($oldval);
+	my ($oldflt,$oldjob) = flight_otherjob($dstflight,$oldval);
+	return unless $oldvalok_fn->("$oldflt.$oldjob");
 
 	$matches++;
-	$oldval =~ s/^\d+\.//; # strip out previous flight
-	my $newval = $specval =~ m/\./ ? $specval : "$specval.$oldval";
+	my $newval = $specval =~ m/\.$/ ? "$specval$oldjob": $specval;
         runvar_set($job, $name, $newval, " (modified from \`$oldval')")
 	    if $newval ne $oldval;
     }, 'IGNORE');
-- 
2.1.4


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

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

* [OSSTEST PATCH 11/11] sg-check-tested: Provide --flight option
  2017-06-07 17:48 [OSSTEST PATCH v4 00/11] livepatch test support Ian Jackson
                   ` (9 preceding siblings ...)
  2017-06-07 17:49 ` [OSSTEST PATCH 10/11] cs-adjust-flight: Rework runvar-build-set new value handling Ian Jackson
@ 2017-06-07 17:49 ` Ian Jackson
  2017-06-07 18:54 ` [OSSTEST PATCH v4 00/11] livepatch test support Ian Jackson
  2017-06-08  0:50 ` Konrad Rzeszutek Wilk
  12 siblings, 0 replies; 17+ messages in thread
From: Ian Jackson @ 2017-06-07 17:49 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson

This is mostly useful in ad-hoc situations.  For example, it can be
usefully used with ./mg-adjust-flight-makexrefs.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
v4: New patch, which helps with issues I tripped over while trying
     to ad-hoc test the livepatch series.
---
 sg-check-tested | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/sg-check-tested b/sg-check-tested
index 3c09aac..a0a2db7 100755
--- a/sg-check-tested
+++ b/sg-check-tested
@@ -98,6 +98,10 @@ END
                 AND j.flight = flights.flight
                 AND j.status = 'pass')
 END
+    } elsif (m/^--flight=(.*)$/) {
+	my @flts = split /,/, $1;
+	push @conds_vars, @flts;
+	push @conds, "(".(join " OR ", map { "flight=?" } @flts).")";
     } elsif (m/^--print-revision=(.*)$/) {
         die if $prrev;
         $prrev= $1;
-- 
2.1.4


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

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

* Re: [OSSTEST PATCH v4 00/11] livepatch test support
  2017-06-07 17:48 [OSSTEST PATCH v4 00/11] livepatch test support Ian Jackson
                   ` (10 preceding siblings ...)
  2017-06-07 17:49 ` [OSSTEST PATCH 11/11] sg-check-tested: Provide --flight option Ian Jackson
@ 2017-06-07 18:54 ` Ian Jackson
  2017-06-08  0:50 ` Konrad Rzeszutek Wilk
  12 siblings, 0 replies; 17+ messages in thread
From: Ian Jackson @ 2017-06-07 18:54 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk; +Cc: xen-devel

Ian Jackson writes ("[OSSTEST PATCH v4 00/11] livepatch test support"):
> Thanks to Konrad, who passed me his git branch under the table.
> I have tidied up some loose ends, and tested it with my xen.git
> Makefile patches.

Oh, I should probably share this test report.
(Sorry, the log url is still broken.)

Ian.

From: Ian Jackson <Ian.Jackson@eu.citrix.com>
To: <ian.jackson@eu.citrix.com>
Subject: [adhoc test] 71531: all pass
Date: Wed, 7 Jun 2017 18:38:28 +0100

[adhoc play] <3testing.git (detached from 4f6660d) /dev/pts/82>
harness 4f6660d: FIX
71531: all pass

flight 71531 xen-unstable play [adhoc]
http://osstest.xs.citrite.net/~osstest/testlogs/logs/71531/

Perfect :-)
All tests in this flight passed as required
baseline version:
 flight               71387

jobs:
 build-amd64                                                  pass    
 build-i386                                                   pass    
 test-amd64-amd64-livepatch                                   pass    
 test-amd64-i386-livepatch                                    pass    

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

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

* Re: [OSSTEST PATCH v4 00/11] livepatch test support
  2017-06-07 17:48 [OSSTEST PATCH v4 00/11] livepatch test support Ian Jackson
                   ` (11 preceding siblings ...)
  2017-06-07 18:54 ` [OSSTEST PATCH v4 00/11] livepatch test support Ian Jackson
@ 2017-06-08  0:50 ` Konrad Rzeszutek Wilk
  2017-06-09 11:01   ` Ian Jackson
  2017-06-09 14:35   ` Ian Jackson
  12 siblings, 2 replies; 17+ messages in thread
From: Konrad Rzeszutek Wilk @ 2017-06-08  0:50 UTC (permalink / raw)
  To: Ian Jackson; +Cc: xen-devel

On Wed, Jun 07, 2017 at 06:48:51PM +0100, Ian Jackson wrote:
> Thanks to Konrad, who passed me his git branch under the table.
> I have tidied up some loose ends, and tested it with my xen.git
> Makefile patches.

Yeey! Thank you for taking them over.
> 
> Konrad, would you please take a look at this to make sure you don't
> think I've broken anything and that my changes look sane ?  In

They look splendid!

> particlar the patches I have marked with `#' below.
> 
>  m  01   TestSupport: target_cmd_root_status: New sub which returns return code.
>  -  02   TestSupport: target_cmd_*: Add some doc comments
>  -  03   TestSupport: target_cmd_output_root_status: New sub
>  *# 04   mfi-common: Add an enable_livepatch runvar to the Xen build jobs
>  *# 05   ts-xen-build: Build livepatches test-cases

Both Reviewed-by (albeit they have my SoB so that is kind of silly, but
eh).

>  -  06   ts-livepatch: Initial test-cases.
>  -  07   sg-run-job: Add the test-livepatch.
>  m  08   make-flight: Add livepatch build/test target in the matrix.
>  *# 09   PDU/lab: Similar to xenuse

I would ditch that one. That 'lab' thing is what I use at home and
I am OK keeping it in my local branch.

>  +  10   cs-adjust-flight: Rework runvar-build-set new value handling
>  +  11   sg-check-tested: Provide --flight option
> 
> Key:
>  m   Changed only the commit message
>  -   Very minor changes
>  *   Actual changes
>  +   Added patch (not really related, TBH)
>   #  Konrad, please review this! 

Done. I am satisfied with them.
> (All compared to Konrad's v3)
> 
> Thanks,
> Ian.

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

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

* Re: [OSSTEST PATCH v4 00/11] livepatch test support
  2017-06-08  0:50 ` Konrad Rzeszutek Wilk
@ 2017-06-09 11:01   ` Ian Jackson
  2017-06-11  0:19     ` Konrad Rzeszutek Wilk
  2017-06-09 14:35   ` Ian Jackson
  1 sibling, 1 reply; 17+ messages in thread
From: Ian Jackson @ 2017-06-09 11:01 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk; +Cc: xen-devel

Konrad Rzeszutek Wilk writes ("Re: [OSSTEST PATCH v4 00/11] livepatch test support"):
> On Wed, Jun 07, 2017 at 06:48:51PM +0100, Ian Jackson wrote:
> >  -  06   ts-livepatch: Initial test-cases.
> >  -  07   sg-run-job: Add the test-livepatch.
> >  m  08   make-flight: Add livepatch build/test target in the matrix.
> >  *# 09   PDU/lab: Similar to xenuse
> 
> I would ditch that one. That 'lab' thing is what I use at home and
> I am OK keeping it in my local branch.

Ah.  Fair enough.  I'm happy to carry it (under a different name if
you like) though.  That way if we change the API it'll get fixed for
you (well, probably...)

> Done. I am satisfied with them.

Thanks,
Ian.

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

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

* Re: [OSSTEST PATCH v4 00/11] livepatch test support
  2017-06-08  0:50 ` Konrad Rzeszutek Wilk
  2017-06-09 11:01   ` Ian Jackson
@ 2017-06-09 14:35   ` Ian Jackson
  1 sibling, 0 replies; 17+ messages in thread
From: Ian Jackson @ 2017-06-09 14:35 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk; +Cc: xen-devel

Konrad Rzeszutek Wilk writes ("Re: [OSSTEST PATCH v4 00/11] livepatch test support"):
> Done. I am satisfied with them.

Great, thanks.  I have pushed this to osstest pretest.  I think it
should go through without regressions; the new tests will fail, of
course, on Xen branches that don't have the Makefile patches yet.

Ian.

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

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

* Re: [OSSTEST PATCH v4 00/11] livepatch test support
  2017-06-09 11:01   ` Ian Jackson
@ 2017-06-11  0:19     ` Konrad Rzeszutek Wilk
  0 siblings, 0 replies; 17+ messages in thread
From: Konrad Rzeszutek Wilk @ 2017-06-11  0:19 UTC (permalink / raw)
  To: Ian Jackson; +Cc: xen-devel

On Fri, Jun 09, 2017 at 12:01:46PM +0100, Ian Jackson wrote:
> Konrad Rzeszutek Wilk writes ("Re: [OSSTEST PATCH v4 00/11] livepatch test support"):
> > On Wed, Jun 07, 2017 at 06:48:51PM +0100, Ian Jackson wrote:
> > >  -  06   ts-livepatch: Initial test-cases.
> > >  -  07   sg-run-job: Add the test-livepatch.
> > >  m  08   make-flight: Add livepatch build/test target in the matrix.
> > >  *# 09   PDU/lab: Similar to xenuse
> > 
> > I would ditch that one. That 'lab' thing is what I use at home and
> > I am OK keeping it in my local branch.
> 
> Ah.  Fair enough.  I'm happy to carry it (under a different name if
> you like) though.  That way if we change the API it'll get fixed for
> you (well, probably...)

Let me redo it a bit. I never got it to capture the serial port
and that is something I would really want to work first.

> 
> > Done. I am satisfied with them.
> 
> Thanks,
> Ian.

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

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

end of thread, other threads:[~2017-06-11  0:19 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-07 17:48 [OSSTEST PATCH v4 00/11] livepatch test support Ian Jackson
2017-06-07 17:48 ` [OSSTEST PATCH 01/11] TestSupport: target_cmd_root_status: New sub which returns return code Ian Jackson
2017-06-07 17:48 ` [OSSTEST PATCH 02/11] TestSupport: target_cmd_*: Add some doc comments Ian Jackson
2017-06-07 17:48 ` [OSSTEST PATCH 03/11] TestSupport: target_cmd_output_root_status: New sub Ian Jackson
2017-06-07 17:48 ` [OSSTEST PATCH 04/11] mfi-common: Add an enable_livepatch runvar to the Xen build jobs Ian Jackson
2017-06-07 17:48 ` [OSSTEST PATCH 05/11] ts-xen-build: Build livepatches test-cases Ian Jackson
2017-06-07 17:48 ` [OSSTEST PATCH 06/11] ts-livepatch: Initial test-cases Ian Jackson
2017-06-07 17:48 ` [OSSTEST PATCH 07/11] sg-run-job: Add the test-livepatch Ian Jackson
2017-06-07 17:48 ` [OSSTEST PATCH 08/11] make-flight: Add livepatch build/test target in the matrix Ian Jackson
2017-06-07 17:49 ` [OSSTEST PATCH 09/11] PDU/lab: Similar to xenuse Ian Jackson
2017-06-07 17:49 ` [OSSTEST PATCH 10/11] cs-adjust-flight: Rework runvar-build-set new value handling Ian Jackson
2017-06-07 17:49 ` [OSSTEST PATCH 11/11] sg-check-tested: Provide --flight option Ian Jackson
2017-06-07 18:54 ` [OSSTEST PATCH v4 00/11] livepatch test support Ian Jackson
2017-06-08  0:50 ` Konrad Rzeszutek Wilk
2017-06-09 11:01   ` Ian Jackson
2017-06-11  0:19     ` Konrad Rzeszutek Wilk
2017-06-09 14:35   ` Ian Jackson

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