[LTP] [PATCH 2/3] lib: tst_rhost_run: new option -B for saving background log

Petr Vorel pvorel@suse.cz
Tue Oct 31 11:18:48 CET 2017


> Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
> ---
>  testcases/lib/test_net.sh |   10 ++++++----
>  1 files changed, 6 insertions(+), 4 deletions(-)
<snip>

>  		case "$opt" in
> -		b) [ "$TST_USE_NETNS" ] && pre_cmd="" || pre_cmd="nohup"
> -		   post_cmd=" > /dev/null 2>&1 &"
> +		b|B) [ "$TST_USE_NETNS" ] && pre_cmd="" || pre_cmd="nohup"
Minor nit: use cmd=
		b|B) [ "$TST_USE_NETNS" ] && pre_cmd= || pre_cmd="nohup"

> +		   [ "$opt" = b ] && bg="/dev/null" || bg="$TST_TMPDIR/bg.cmd"
> +		   post_cmd=" > $bg 2>&1 &"
>  		   out="1> /dev/null"
>  		;;
>  		s) safe=1 ;;

LGTM.


Kind regards,
Petr


More information about the ltp mailing list