From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [OSSTEST PATCH 2/2] cs-adjust-flight: runvar-perlop: Do not report non-changes Date: Fri, 14 Nov 2014 16:29:22 +0000 Message-ID: <1415982562.7113.24.camel@citrix.com> References: <1415982424-7007-1-git-send-email-ian.jackson@eu.citrix.com> <1415982424-7007-2-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.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XpJkY-0002N5-0o for xen-devel@lists.xenproject.org; Fri, 14 Nov 2014 16:29:30 +0000 In-Reply-To: <1415982424-7007-2-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: Ian Jackson Cc: xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org On Fri, 2014-11-14 at 16:27 +0000, Ian Jackson wrote: > With -v, runvar-perlop would unconditionally print a message about the > changed variable. Instead, only call runvar_set if the value is to > change. > > Signed-off-by: Ian Jackson Acked-by: Ian Campbell > --- > cs-adjust-flight | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/cs-adjust-flight b/cs-adjust-flight > index 7ec17e3..d6cab1a 100755 > --- a/cs-adjust-flight > +++ b/cs-adjust-flight > @@ -268,7 +268,8 @@ sub change__runvar_perlop { > my ($job, $name, $varrow) = @_; > my $oldval = $varrow->{val}; > my $newval = perlop_value($job, $name, $op, $oldval); > - runvar_set($job, $name, $newval, " (modified from \`$oldval')"); > + runvar_set($job, $name, $newval, " (modified from \`$oldval')") > + if $newval ne $oldval; > }, 'IGNORE'); > } >