[LTP] [PATCH v2 1/1] cron: Rewrite and cleanup cron_tests.sh script

Cyril Hrubis chrubis@suse.cz
Thu Mar 9 17:43:00 CET 2017


Hi!
> Look for results into more possible log locations, look also into
> journalctl output.
> 
> This fixes systems with different cron log (Debian, Ubuntu and their
> derivates, see github issue #136) and systems which log into journalctl
> only (openSUSE Tumbleweed).

Looks good, pushed, thanks.

> +	sleep 10
> +
> +	grep_logs 'crontab.*REPLACE' \
> +		"cron activity not recorded" \
> +		"cron activity logged"

We can improve the grep_logs function and instead of sleeping for 10
seconds before we call it, we could grep the logs in a loop ten times,
do 1s sleep at the end of the loop and exit with pass once the expected
logs are found and with a failure once we are out of iterations. That
should save ~20 seconds of the test runtime.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list