[LTP] [PATCH 1/1] cron: Rewrite and cleanup cron_tests.sh script
Cyril Hrubis
chrubis@suse.cz
Wed Mar 8 13:12:48 CET 2017
Hi!
> +fail_test()
> +{
> + tst_resm TFAIL "$@"
> + TFAILCNT=$(($TFAILCNT+1))
> +}
> +
> +break_test()
> +{
> + local file=$1
> + local err_msg="$2"
> + tst_brk TBROK $file NULL "$err_msg"
> + TFAILCNT=$(($TFAILCNT+1))
> +}
Why don't we convert the testcase to the test library (ideally the new
one) instead of hacking around and adding custom failure counters?
Seriously the exit $TFAILCNT at the end of the test is broken as it will
produce bogus exit values. In a case that number of failures adds up so
that the bottom bits are cleared we may as well exit the test with
TCONF.
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list