netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ido Schimmel <idosch@idosch.org>
To: Hangbin Liu <liuhangbin@gmail.com>
Cc: netdev@vger.kernel.org, Guillaume Nault <gnault@redhat.com>,
	David Ahern <dsahern@kernel.org>,
	Stephen Hemminger <stephen@networkplumber.org>
Subject: Re: [PATCHv3 iproute2-next] rtnetlink: add new function rtnl_echo_talk()
Date: Tue, 8 Nov 2022 11:40:06 +0200	[thread overview]
Message-ID: <Y2oj9gNmsy0LhvjA@shredder> (raw)
In-Reply-To: <Y2ocsXykgqIHCcrF@Laptop-X1>

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

  reply	other threads:[~2022-11-08  9:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-29  8:10 [PATCHv3 iproute2-next] rtnetlink: add new function rtnl_echo_talk() Hangbin Liu
2022-09-29 15:10 ` patchwork-bot+netdevbpf
2022-11-08  8:40 ` Ido Schimmel
2022-11-08  9:09   ` Hangbin Liu
2022-11-08  9:40     ` Ido Schimmel [this message]
2022-11-08 12:43       ` Hangbin Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y2oj9gNmsy0LhvjA@shredder \
    --to=idosch@idosch.org \
    --cc=dsahern@kernel.org \
    --cc=gnault@redhat.com \
    --cc=liuhangbin@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).