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
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.
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