From: Ian Jackson Subject: [OSSTEST PATCH 09/10] rump kernel tests: Cancel unneeded edits of guest config Date: Fri, 6 Feb 2015 19:17:54 +0000 Message-ID: <1423250275-20872-10-git-send-email-ian.jackson@eu.citrix.com> References: <1423250275-20872-1-git-send-email-ian.jackson@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YJoPw-0000ff-Mq for xen-devel@lists.xenproject.org; Fri, 06 Feb 2015 19:18:16 +0000 In-Reply-To: <1423250275-20872-1-git-send-email-ian.jackson@eu.citrix.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 Jackson , Ian Campbell List-Id: xen-devel@lists.xenproject.org If the guest config is already set up to preserve, cancel the edit. We are going to repeat this test, and this avoids creating many identical copies of the same file in the log output. Signed-off-by: Ian Jackson --- ts-rumpuserxen-demo-xenstorels | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ts-rumpuserxen-demo-xenstorels b/ts-rumpuserxen-demo-xenstorels index ed46843..a54fbf4 100755 --- a/ts-rumpuserxen-demo-xenstorels +++ b/ts-rumpuserxen-demo-xenstorels @@ -32,7 +32,11 @@ our $gn = $gho->{Guest}; sub arrangepreserve () { target_editfile_root($ho,$r{"$gho->{Guest}_cfgpath"}, sub { while () { - next if m/^\s*on_poweroff\s*=/; + if (m/^\s*on_poweroff\s*=/) { + target_editfile_cancel("already configured to preserve") + if m/\bpreserve\b/; + next; + } print EO or die $!; } print EO "\n","on_poweroff='preserve'\n" or die $!; -- 1.7.10.4