Re: [RFC PATCH net-next mlxsw 09/14] selftests: forwarding: Have RET track kselftest framework constants

2024-03-26 Thread Petr Machata
Jakub Kicinski writes: > On Mon, 25 Mar 2024 18:29:16 +0100 Petr Machata wrote: >> +set_ret() >> +{ >> +local nret=$1; shift > > May be worth throwing in a comment that $1 must be a legal ksft ret > code, not any exit code from random commands. Hmm, yeah. I'll rename to ret_set_ksft_status

Re: [RFC PATCH net-next mlxsw 09/14] selftests: forwarding: Have RET track kselftest framework constants

2024-03-25 Thread Jakub Kicinski
On Mon, 25 Mar 2024 18:29:16 +0100 Petr Machata wrote: > +set_ret() > +{ > + local nret=$1; shift May be worth throwing in a comment that $1 must be a legal ksft ret code, not any exit code from random commands.

[RFC PATCH net-next mlxsw 09/14] selftests: forwarding: Have RET track kselftest framework constants

2024-03-25 Thread Petr Machata
The variable RET keeps track of whether the test under execution has so far failed or not. Currently it works in binary fashion: zero means everything is fine, non-zero means something failed. log_test() then uses the value to given a human-readable message. In order to allow log_test() to report