[LTP] [PATCH] lib/tst_test.sh: fix ROD_SILENT command return status check
Petr Vorel
pvorel@suse.cz
Thu Aug 19 18:03:19 CEST 2021
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
Kind regards,
Petr
More information about the ltp
mailing list