[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <662fb69baa4b7_2e6aae2947c@willemb.c.googlers.com.notmuch>
Date: Mon, 29 Apr 2024 11:02:51 -0400
From: Willem de Bruijn <willemdebruijn.kernel@...il.com>
To: Jakub Kicinski <kuba@...nel.org>,
Willem de Bruijn <willemdebruijn.kernel@...il.com>
Cc: davem@...emloft.net,
netdev@...r.kernel.org,
edumazet@...gle.com,
pabeni@...hat.com,
linux-kselftest@...r.kernel.org
Subject: Re: [PATCH net-next 6/6] selftests: drv-net-hw: add test for memory
allocation failures with page pool
Jakub Kicinski wrote:
> On Sat, 27 Apr 2024 09:49:28 -0400 Willem de Bruijn wrote:
> > Eventually probably want a more generic fault injection class.
> >
> > And for both fault injection and background traffic the with object
> > construct to ensure cleanup in all cases.
> >
> > Maybe even the same for ethtool, as ip and ethtool config changes that
> > need to be reverted to original state will be common.
>
> Agreed, the nice way of wrapping all that has not revealed itself to me
> yet. When we discussed it with Petr a while back he was suggesting
> "with", and I was thinking of creating an object with test as the
> parent. The with is nicer but here we'd end up doing:
>
> with a():
> # some code
> with b():
> # more code
> with c():
> # check traffic
>
> which offends my sensibilities.
>
> There are many options, hard to say which one is best without having
> a bunch of tests to convert as a litmus test :S So I stuck to "finally"
Entirely reasonable.
Btw, I have a preliminary tools/testing/selftests/net/csum test on
top of this series.
The only interesting points so far are the use of deploy (which I
assume you have on some internal patch already) and that with bkg
would not fail the test if the background process exits with error.
Powered by blists - more mailing lists