Re: [RFC PATCH net-next 1/5] selftests: forwarding: Introduce deferred commands

2024-08-27 Thread Petr Machata
Jakub Kicinski writes: > On Tue, 27 Aug 2024 10:53:53 +0200 Petr Machata wrote: >> >> I can do it, but it's gonna be more pain in setting up those >> >> TEST_INCLUDES. People will forget. It will be a nuisance. >> >> I'm thinking of just moving it to net/lib.sh, from forwarding. >> > >> > wha

Re: [RFC PATCH net-next 1/5] selftests: forwarding: Introduce deferred commands

2024-08-27 Thread Jakub Kicinski
On Tue, 27 Aug 2024 10:53:53 +0200 Petr Machata wrote: > >> I can do it, but it's gonna be more pain in setting up those > >> TEST_INCLUDES. People will forget. It will be a nuisance. > >> I'm thinking of just moving it to net/lib.sh, from forwarding. > > > > what about separate file, but include

Re: [RFC PATCH net-next 1/5] selftests: forwarding: Introduce deferred commands

2024-08-27 Thread Petr Machata
Przemek Kitszel writes: > On 8/26/24 17:20, Petr Machata wrote: >> Przemek Kitszel writes: >> >>> On 8/22/24 15:49, Petr Machata wrote: In commit 8510801a9dbd ("selftests: drv-net: add ability to schedule cleanup with defer()"), a defer helper was added to Python selftests. The

Re: [RFC PATCH net-next 1/5] selftests: forwarding: Introduce deferred commands

2024-08-26 Thread Przemek Kitszel
On 8/26/24 17:20, Petr Machata wrote: Przemek Kitszel writes: On 8/22/24 15:49, Petr Machata wrote: In commit 8510801a9dbd ("selftests: drv-net: add ability to schedule cleanup with defer()"), a defer helper was added to Python selftests. The idea is to keep cleanup commands close to their d

Re: [RFC PATCH net-next 1/5] selftests: forwarding: Introduce deferred commands

2024-08-26 Thread Jakub Kicinski
On Mon, 26 Aug 2024 13:03:43 -0700 Jakub Kicinski wrote: > > > Does it make sense to place these helpers in net/lib.sh? > > > > Yeah, it does. > > Would it further make sense to split them to their own file > (net/lib_defer.sh?) and source that in net/lib.sh? > > Should be pretty self-cont

Re: [RFC PATCH net-next 1/5] selftests: forwarding: Introduce deferred commands

2024-08-26 Thread Jakub Kicinski
On Mon, 26 Aug 2024 16:25:47 +0200 Petr Machata wrote: > >> tools/testing/selftests/net/forwarding/lib.sh | 83 +++ > > > > Does it make sense to place these helpers in net/lib.sh? > > Yeah, it does. Would it further make sense to split them to their own file (net/lib_defer.sh

Re: [RFC PATCH net-next 1/5] selftests: forwarding: Introduce deferred commands

2024-08-26 Thread Petr Machata
Przemek Kitszel writes: > On 8/22/24 15:49, Petr Machata wrote: >> In commit 8510801a9dbd ("selftests: drv-net: add ability to schedule >> cleanup with defer()"), a defer helper was added to Python selftests. >> The idea is to keep cleanup commands close to their dirtying counterparts, >> there

Re: [RFC PATCH net-next 1/5] selftests: forwarding: Introduce deferred commands

2024-08-26 Thread Petr Machata
Ido Schimmel writes: > On Thu, Aug 22, 2024 at 03:49:40PM +0200, Petr Machata wrote: >> The following patches will convert several selftests to this new framework. > > The intention is to make sure new tests are using these helpers? Well, I sent this as RFC because I'm not sure how far to push

Re: [RFC PATCH net-next 1/5] selftests: forwarding: Introduce deferred commands

2024-08-26 Thread Przemek Kitszel
On 8/22/24 15:49, Petr Machata wrote: In commit 8510801a9dbd ("selftests: drv-net: add ability to schedule cleanup with defer()"), a defer helper was added to Python selftests. The idea is to keep cleanup commands close to their dirtying counterparts, thereby making it more transparent what is cl

Re: [RFC PATCH net-next 1/5] selftests: forwarding: Introduce deferred commands

2024-08-26 Thread Ido Schimmel
On Thu, Aug 22, 2024 at 03:49:40PM +0200, Petr Machata wrote: > In commit 8510801a9dbd ("selftests: drv-net: add ability to schedule > cleanup with defer()"), a defer helper was added to Python selftests. > The idea is to keep cleanup commands close to their dirtying counterparts, > thereby making

[RFC PATCH net-next 1/5] selftests: forwarding: Introduce deferred commands

2024-08-22 Thread Petr Machata
In commit 8510801a9dbd ("selftests: drv-net: add ability to schedule cleanup with defer()"), a defer helper was added to Python selftests. The idea is to keep cleanup commands close to their dirtying counterparts, thereby making it more transparent what is cleaning up what, making it harder to miss