[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <67045d6eb9340_1635eb294e@willemb.c.googlers.com.notmuch>
Date: Mon, 07 Oct 2024 18:15:10 -0400
From: Willem de Bruijn <willemdebruijn.kernel@...il.com>
To: Gur Stavi <gur.stavi@...wei.com>,
Gur Stavi <gur.stavi@...wei.com>
Cc: netdev@...r.kernel.org,
linux-kernel@...r.kernel.org,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>
Subject: Re: [PATCH net-next v01 3/4] selftests: net/psock_fanout: restore
loopback up/down state on exit
Gur Stavi wrote:
> Minimize the risk that psock_fanout leaves loopback device in a different
> state than the start state.
>
> Restore loopback up/down state when test reaches end of main.
> For abort on errors, globally replace all 'exit' with 'cleanup_and_exit'
> that restores loopback up/down state.
Luckily tools/testing/selftests/net/run_afpackettests already runs
this test in a network namespace, so nothing terrible will happen if
it leaves lo down on exit.
I'd like to avoid this many code changes. As long as the test exits
with failure, it's fine if this particular state is left.
And prefer separate set_loopback_up and .._down helpers, rather than
a toggle whose behavior depends on current state.
> Signed-off-by: Gur Stavi <gur.stavi@...wei.com>
Powered by blists - more mailing lists