All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sabrina Dubroca <sd@queasysnail.net>
To: Jakub Kicinski <kuba@kernel.org>, Ales Nezbeda <anezbeda@redhat.com>
Cc: netdev@vger.kernel.org, sdf@fomichev.me, davem@davemloft.net
Subject: Re: [PATCH net v2] selftests: rtnetlink: add 'ethtool' as a dependency
Date: Tue, 15 Oct 2024 13:47:18 +0200	[thread overview]
Message-ID: <Zw5WRhrNqJCZp1mf@hog> (raw)
In-Reply-To: <CAL_-bo0QJJJootMQysNSLNmu0Fps3dqjPE0F0_=R23h7GqAkfQ@mail.gmail.com>

Hi Jakub,

(this thread probably got buried in your inbox due to netconf/LPC)

2024-09-16, 11:18:13 +0200, Ales Nezbeda wrote:
> On Tue, Sep 10, 2024 at 2:17 AM Jakub Kicinski <kuba@kernel.org> wrote:
> > Don't think it qualifies as a fix, it's an improvement.
> 
> Well, if the `ethtool` is not present the test will fail with dubious
> results that would indicate that the test failed due to the system not
> supporting MACsec offload, which is not true. The error message
> doesn't reflect what went wrong, so I thought about it as an issue
> that is being fixed.

I also think it's a (pretty minor) fix, since the error message is
really misleading.

> If this is not the case please let me know,
> because based on the docs 'Fixes: tag indicates that the patch fixes
> an issue', which I would think that wrong error message is an issue. I
> might be wrong here though, so if the definition of 'issue' is more
> restrictive I can remove the 'Fixes:' tag.
> 
> > You can use net/forwarding's lib.sh in net/, altnames.sh already
> > uses it.
> 
> I see, the problem (and probably should have mentioned it in the patch
> itself) is that `rtnetlink.sh` is using one of the variables defined
> in the `net/lib.sh` - specifically `ksft_skip`.

net/forwarding/lib.sh seems to include net/lib.sh, and uses ksft_skip
too, so there should be no problem:

    source "$net_forwarding_dir/../lib.sh"
    
    ##############################################################################
    # Sanity checks
    
    check_tc_version()
    {
    	tc -j &> /dev/null
    	if [[ $? -ne 0 ]]; then
    		echo "SKIP: iproute2 too old; tc is missing JSON support"
    		exit $ksft_skip
    	fi
    }


> Furthermore, I felt
> like a more clean approach would be to add the `require_command()` to
> the `net/lib.sh` so that other tests down the road could potentially
> use it as well. Picking a different `lib.sh` would mean either

Moving require_command from net/forwarding/lib.sh to net/lib.sh also
seems pretty reasonable.

-- 
Sabrina


      reply	other threads:[~2024-10-15 11:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-09  8:34 [PATCH net v2] selftests: rtnetlink: add 'ethtool' as a dependency Ales Nezbeda
2024-09-10  0:07 ` Jakub Kicinski
2024-09-16  9:18   ` Ales Nezbeda
2024-10-15 11:47     ` Sabrina Dubroca [this message]

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=Zw5WRhrNqJCZp1mf@hog \
    --to=sd@queasysnail.net \
    --cc=anezbeda@redhat.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=sdf@fomichev.me \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.