Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp10512901pxu; Wed, 30 Dec 2020 05:01:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJwuZwhBo39pu5AqJP0QRWRbwoUTbQn0kPdBmKeUdQf+yq6zmNiZZEcK1HKgY3KYVrAppoDN X-Received: by 2002:aa7:d511:: with SMTP id y17mr50529246edq.249.1609333292712; Wed, 30 Dec 2020 05:01:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609333292; cv=none; d=google.com; s=arc-20160816; b=hcS6Q8HyBbew7RAAGsWnOqPMsiWz9or/xH6MrobZkvEII7YrTqEmDQkiMfysOWSe3b ef0WlF/3WsA4PL6n+4qmKDz/WxMF7h7nmI8vdOeJV+T6L5aX30qUBlQPS4h+aiLkyg2Q eUfOKB3EeSNRWmNuRTQJ3l4iPUIa9Ipi5+PK8q2cvX7Hhsf2MQ/Wc4DC9WDskC1xy9Tf fKLLG2Jh+FmDUhQ2ZOw0C3C/33s0IseuoTnDz4Qn83azU35oFlFTMkRjL+J6Z/uGXOeY MO30UOjC0FUXJFoLn5jgYJpbQKmO85YSKvCRMs5eMyF0OMfvWxP/XW8GhGo2XNXEWlVf RuWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=Zp9sqjLhCXKKagsj6QilveJALCfv95sq/nmSspXldvI=; b=eQYdu3KFwZObN5viYsB5g7rJG/TI7YqZesPHmafvJEorGWq9Iabld1f3p1nHcVVMAN X5E8EAJRP3sdgdzZ1ygWEsd4HPOxHriJP6bZkm4JmZNFF/V4evRMaLO0I1PyHfKwstE2 vGshJTjJVPnYz1XCX/Ma/2qsGdmuxM+nJHe0cdyNDNCaiUMe4fKiCaKKBAByoPU3dUKc u5X73lkG+/vA0Vk4TwMS7zdSmmGr1dldfpr7mQdrNfB8qtuVlPao9WFpoG24TYJNqLBE hs9SfXMKwXWanBg7nff4SFFCpUvudb7PT07l6icfoTgC66gQqUmkriN38mRAfRuxf5SV RSfQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id rh9si22909771ejb.507.2020.12.30.05.01.09; Wed, 30 Dec 2020 05:01:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726773AbgL3M7U (ORCPT + 99 others); Wed, 30 Dec 2020 07:59:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39476 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726662AbgL3M7U (ORCPT ); Wed, 30 Dec 2020 07:59:20 -0500 Received: from Chamillionaire.breakpoint.cc (Chamillionaire.breakpoint.cc [IPv6:2a0a:51c0:0:12e:520::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CCCC4C06179C; Wed, 30 Dec 2020 04:58:39 -0800 (PST) Received: from fw by Chamillionaire.breakpoint.cc with local (Exim 4.92) (envelope-from ) id 1kub3m-0005X8-DR; Wed, 30 Dec 2020 13:58:38 +0100 Date: Wed, 30 Dec 2020 13:58:38 +0100 From: Florian Westphal To: Po-Hsu Lin Cc: netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, davem@davemloft.net, kuba@kernel.org, shuah@kernel.org, steffen.klassert@secunet.com, fw@strlen.de Subject: Re: [PATCH] selftests: xfrm: fix test return value override issue in xfrm_policy.sh Message-ID: <20201230125838.GC30823@breakpoint.cc> References: <20201230095204.21467-1-po-hsu.lin@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201230095204.21467-1-po-hsu.lin@canonical.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Po-Hsu Lin wrote: > When running this xfrm_policy.sh test script, even with some cases > marked as FAIL, the overall test result will still be PASS: > > $ sudo ./xfrm_policy.sh > PASS: policy before exception matches > FAIL: expected ping to .254 to fail (exceptions) > PASS: direct policy matches (exceptions) > PASS: policy matches (exceptions) > FAIL: expected ping to .254 to fail (exceptions and block policies) > PASS: direct policy matches (exceptions and block policies) > PASS: policy matches (exceptions and block policies) > FAIL: expected ping to .254 to fail (exceptions and block policies after hresh changes) > PASS: direct policy matches (exceptions and block policies after hresh changes) > PASS: policy matches (exceptions and block policies after hresh changes) > FAIL: expected ping to .254 to fail (exceptions and block policies after hthresh change in ns3) > PASS: direct policy matches (exceptions and block policies after hthresh change in ns3) > PASS: policy matches (exceptions and block policies after hthresh change in ns3) > FAIL: expected ping to .254 to fail (exceptions and block policies after htresh change to normal) > PASS: direct policy matches (exceptions and block policies after htresh change to normal) > PASS: policy matches (exceptions and block policies after htresh change to normal) > PASS: policies with repeated htresh change > $ echo $? > 0 > > This is because the $lret in check_xfrm() is not a local variable. Acked-by: Florian Westphal