[LTP] [PATCH] lib/tst_test.sh: fix ROD_SILENT command return status check
Alexey Kodanev
aleksei.kodanev@bell-sw.com
Fri Aug 20 11:00:11 CEST 2021
On 19.08.2021 19:03, Petr Vorel wrote:
> Hi Alexey,
>
>> "local tst_out=$(some_command)" always returns status 0, i.e.
>> not the return status of the command in the assignment, but the
>> status for 'local' builtin command, which creates a new local
>> variable inside the function.
>
>> As a result, the library calls and tests that invoke ROD_SILENT
>> don't actually check the return status of commands passed to it.
>
> Reviewed-by: Petr Vorel <pvorel@suse.cz>
> Very good catch, thanks!
>
> Tested-by: Petr Vorel <pvorel@suse.cz>
> Working the same in: bash, dash, busybox sh, mksh (android).
>
>> The old API library function is also fixed.
> +1
>
Applied. Thanks Petr!
More information about the ltp
mailing list