From: Ian Jackson Subject: [OSSTEST PATCH] ts-rumpuserxen-demo-xenstorels: set `on_poweroff="preserve"' Date: Thu, 13 Nov 2014 15:56:48 +0000 Message-ID: <1415894208-25516-1-git-send-email-ian.jackson@eu.citrix.com> References: <21604.39641.398785.791489@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Xowlw-0006uX-Ij for xen-devel@lists.xenproject.org; Thu, 13 Nov 2014 15:57:24 +0000 In-Reply-To: <21604.39641.398785.791489@mariner.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: ian.campbell@eu.citrix.com, rumpkernel-builds@lists.sourceforge.net, Ian Jackson List-Id: xen-devel@lists.xenproject.org We rely on the domain existing after xenstore-ls's main has called exit, so that we can do our own xenstore-ls in dom0 and check the results. Previously, this happened by accident because the rump kernel would, after _exit, call a minios function which crashes the domain. New rump kernels don't do this, and instead shut down cleanly. Setting `on_poweroff="preserve"' has the desired effect. Signed-off-by: Ian Jackson --- ts-rumpuserxen-demo-xenstorels | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ts-rumpuserxen-demo-xenstorels b/ts-rumpuserxen-demo-xenstorels index 19f3f0d..6db7024 100755 --- a/ts-rumpuserxen-demo-xenstorels +++ b/ts-rumpuserxen-demo-xenstorels @@ -29,6 +29,16 @@ our $domid; our $gn = $gho->{Guest}; +sub arrangepreserve () { + target_editfile_root($ho,$r{"$gho->{Guest}_cfgpath"}, sub { + while () { + next if m/^\s*on_poweroff\s*=/; + print EO or die $!; + } + print EO "\n","on_poweroff='preserve'\n" or die $!; + }); +} + sub start () { my $cmd= toolstack()->{Command}." create ". $r{ $gho->{Guest}.'_'. toolstack()->{CfgPathVar} }; @@ -105,6 +115,7 @@ sub check_output () { } } +arrangepreserve(); start(); await_end(); check_output(); -- 1.7.10.4