public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Andre Carvalho <asantostc@gmail.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: Breno Leitao <leitao@debian.org>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	 "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	 Paolo Abeni <pabeni@redhat.com>, Shuah Khan <shuah@kernel.org>,
	Simon Horman <horms@kernel.org>,
	 netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-kselftest@vger.kernel.org
Subject: Re: [PATCH net-next v11 7/7] selftests: netconsole: validate target resume
Date: Wed, 21 Jan 2026 22:04:23 +0000	[thread overview]
Message-ID: <aXFIk1L8G_dHF6od@archlinux> (raw)
In-Reply-To: <20260120172057.6600eefe@kernel.org>

Hi Jakub,

On Tue, Jan 20, 2026 at 05:20:57PM -0800, Jakub Kicinski wrote:
> On Sun, 18 Jan 2026 11:00:27 +0000 Andre Carvalho wrote:
> > +++ b/tools/testing/selftests/drivers/net/netcons_resume.sh
> 
> There's too many of them now and they keep failing on real HW.

Since these tests are only using netdevsim I was a bit surprised about the failures
on real HW runs.

I'm suspecting a race on my workaround to trigger reactivation and these runs
potentially running on a host with systemd with MACAddressPolicy=persistent as
I'm able to produce a similar error on this conditions. Any chance these are
running with different configuration then SW runs?

When the device is recreated with the same MAC address as before, there is a race
between my workaround and the resume. netconsole will immediately resume and UP
the device, then my workaround goes and:

ip link set dev "${SRCIF}" down
ip link set dev "${SRCIF}" address "${SAVED_SRCMAC}"
# Rename device in order to trigger target resume, as initial
# when device was recreated it didn't have correct mac address.
ip link set dev "${SRCIF}" name "${TARGET}"

The problem is that the rename won't resume, as the target has already not deactivated
and nothing will UP the device. 

Doing "ip link set dev "${TARGET}" up" at this point should address this gap. Alternative,
we can skip restoring the mac addresses if they are the same.

Does this make sense? Perhaps there are other conditions that can trigger this, but
running it with MACAddressPolicy=persistent is a reliable way for me to reproduce it.

> We'll keep this series in the queue but I think it's time to move 
> the netcons tests out to their own target or move them to netdevsim.

Given the above, let me know if you prefer I send v12 with the proposed fixes or
a separated follow up patch to fix the test on HW runs. Since you mentioned keeping
on the queue I want to make sure a new version of this series won't mess up your process.

> With absolutely no error message getting printed :|

Yes, debugging these has been quite challenging. I'd like to improve all netconsole
selftests debuggability in a future series, looking to work on this as soon as I wrap
this one up.

> 
> TAP version 13
> 1..1
> # overriding timeout to 360
> # selftests: drivers/net: netcons_resume.sh
> # Running with bind mode: ifname
> # ifname : Test passed
> # Running with bind mode: mac
> not ok 1 selftests: drivers/net: netcons_resume.sh # exit=1
> 
> https://netdev-3.bots.linux.dev/vmksft-drv-hw-dbg/results/482560/4-netcons-resume-sh/stdout

-- 
Andre Carvalho

  reply	other threads:[~2026-01-21 22:04 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-18 11:00 [PATCH net-next v11 0/7] netconsole: support automatic target recovery Andre Carvalho
2026-01-18 11:00 ` [PATCH net-next v11 1/7] netconsole: add target_state enum Andre Carvalho
2026-01-18 11:00 ` [PATCH net-next v11 2/7] netconsole: convert 'enabled' flag to enum for clearer state management Andre Carvalho
2026-01-18 11:00 ` [PATCH net-next v11 3/7] netconsole: add STATE_DEACTIVATED to track targets disabled by low level Andre Carvalho
2026-01-18 11:00 ` [PATCH net-next v11 4/7] netconsole: clear dev_name for devices bound by mac Andre Carvalho
2026-01-19 13:06   ` Breno Leitao
2026-01-18 11:00 ` [PATCH net-next v11 5/7] netconsole: introduce helpers for dynamic_netconsole_mutex lock/unlock Andre Carvalho
2026-01-19 13:10   ` Breno Leitao
2026-01-18 11:00 ` [PATCH net-next v11 6/7] netconsole: resume previously deactivated target Andre Carvalho
2026-01-20 11:37   ` Breno Leitao
2026-01-18 11:00 ` [PATCH net-next v11 7/7] selftests: netconsole: validate target resume Andre Carvalho
2026-01-21  1:20   ` Jakub Kicinski
2026-01-21 22:04     ` Andre Carvalho [this message]
2026-01-22  1:45       ` Jakub Kicinski
2026-01-22 17:51         ` Andre Carvalho
2026-01-20 11:39 ` [PATCH net-next v11 0/7] netconsole: support automatic target recovery Breno Leitao
2026-01-22  3:20 ` patchwork-bot+netdevbpf

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=aXFIk1L8G_dHF6od@archlinux \
    --to=asantostc@gmail.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=leitao@debian.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=shuah@kernel.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