From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9B70CC433FE for ; Tue, 8 Nov 2022 09:40:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233762AbiKHJkO (ORCPT ); Tue, 8 Nov 2022 04:40:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53724 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233712AbiKHJkN (ORCPT ); Tue, 8 Nov 2022 04:40:13 -0500 Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D5112C67F for ; Tue, 8 Nov 2022 01:40:12 -0800 (PST) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id DDFCB320092D; Tue, 8 Nov 2022 04:40:10 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Tue, 08 Nov 2022 04:40:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1667900410; x=1667986810; bh=uMjjANNaLOOv9SWMIXjvBglaHGnM qGIGwHfKQwUNn7A=; b=v95cUEyNuABQM9lHjkP2lBqL/p4MQOA9vm+NdpTjNMp0 z7HkSijdFsJTOJF3gXW0h3ZhBZOEO6HfzIr51BBLOPbQeyIrJYY2lIzjUg3DVE0i LoLI1Kd0LMuMFVXia7enio+c3AipMP60fShcp+8mtswLvZTbwhN4oLGJFnvKU5Sb Gfl6jFq7rXnb1ebbIYrStrfzasxpzzlbJHP4sxuRThZp4+O7n7kEhFrV+U6xh45Z ukWG6ygvTrbWUEA7zHamWDcw9UGQNz6u3bU/0GpFOPQZssMxAF5FEo7u7oZ1TL45 4KZE7CeRN856JGowxzk60gH7fJHPZhhVvHPM/cbeVQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvgedrfedtgddtjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvvefukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpefkughoucfu tghhihhmmhgvlhcuoehiughoshgthhesihguohhstghhrdhorhhgqeenucggtffrrghtth gvrhhnpedvudefveekheeugeeftddvveefgfduieefudeifefgleekheegleegjeejgeeg hfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehiug hoshgthhesihguohhstghhrdhorhhg X-ME-Proxy: Feedback-ID: i494840e7:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 8 Nov 2022 04:40:09 -0500 (EST) Date: Tue, 8 Nov 2022 11:40:06 +0200 From: Ido Schimmel To: Hangbin Liu Cc: netdev@vger.kernel.org, Guillaume Nault , David Ahern , Stephen Hemminger Subject: Re: [PATCHv3 iproute2-next] rtnetlink: add new function rtnl_echo_talk() Message-ID: References: <20220929081016.479323-1-liuhangbin@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Tue, Nov 08, 2022 at 05:09:05PM +0800, Hangbin Liu wrote: > On Tue, Nov 08, 2022 at 10:40:45AM +0200, Ido Schimmel wrote: > > > + return rtnl_talk(&rth, &req.n, NULL); > > > } > > > > Hangbin, > > > > This change breaks the nexthop selftest: > > tools/testing/selftests/net/fib_nexthops.sh > > > > Which is specifically checking for "2" as the error code. Example: > > Hi Ido, > > Thanks for the report. > > > > > # attempt to create nh without a device or gw - fails > > run_cmd "$IP nexthop add id 1" > > log_test $? 2 "Nexthop with no device or gateway" > > > > I think it's better to restore the original error code than "fixing" all > > the tests / applications that rely on it. > > I can fix this either in iproute2 or in the selftests. > I'd perfer ask David's opinion. Sure, but note that: 1. Other than the 4 selftests that we know about and can easily patch, there might be a lot of other applications that invoke iproute2 and expect this return code. It is used by iproute2 since at least 2004. 2. There is already precedence for restoring the original code. See commit d58ba4ba2a53 ("ip: return correct exit code on route failure"). > > > > > The return code of other subcommands was also changed by this patch, but > > so far all the failures I have seen are related to "nexthop" subcommand. > > I grep "log_test \$? 2" in selftest/net folder and found the following tests > would use it > > fib_tests.sh > test_vxlan_vnifiltering.sh > fcnal-test.sh > fib_nexthops.sh > > Thanks > Hangbin