[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b12fdfeb-87b8-ef88-11c3-7a13a352fd00@gmail.com>
Date: Fri, 16 Mar 2018 11:06:07 -0700
From: David Ahern <dsahern@...il.com>
To: Stefano Brivio <sbrivio@...hat.com>,
"David S . Miller" <davem@...emloft.net>
Cc: Sabrina Dubroca <sd@...asysnail.net>,
Steffen Klassert <steffen.klassert@...unet.com>,
netdev@...r.kernel.org
Subject: Re: [PATCH net-next 3/9] selftests: pmtu: Introduce support for
multiple tests
On 3/15/18 9:18 AM, Stefano Brivio wrote:
> trap cleanup EXIT
>
> -test_pmtu_vti6_exception
> +exitcode=0
> +for name in ${tests}; do
> + echo "${name}: START"
> + eval test_${name}
> + ret=$?
> + cleanup
> +
> + if [ $ret -eq 0 ]; then echo "${name}: FAIL"; exitcode=1
ret = 0 == failure is counterintuitive for Linux.
> + elif [ $ret -eq 1 ]; then echo "${name}: PASS"
> + elif [ $ret -eq 2 ]; then echo "${name}: SKIP"
I use printf in other scripts so that the pass/fail verdict lineup. e.g.,
printf " %-60s [PASS]\n" "${name}"
> + fi
> +done
>
> -exit 0
> +exit ${exitcode}
>
Powered by blists - more mailing lists