Hi, On 07/02/2015 03:06 PM, Cui Bixuan wrote: > On 2015/7/1 22:10, Alexey Kodanev wrote: >> The test creates only tst_logfile, why it should remove 'messages-*' and >> other system logs? >> >> I see that its configuration file includes logrotate.d/, is it really needed >> by the test? >> > The tst_logfile of test created is 'messages-*' and the 'messages-*' will > cause the case failed, > so we should delete it if we want to the case run succeed at the second time.
OK, the test does the following basic steps: a. create tst_logfile, fill it with messages; b. ./logrotate c. if [ -f tst_logfile.1.gz ] then test passed. Therefore, why bother about 'messages-*' and other logs, the test doesn't check if they were rotated/compressed... so, may be, we should remove "include /etc/logrotate.d/" from the test configuration file so that logrotate rotated only "tst_logfile" and nothing else, what do you think? Thanks, Alexey > And the test creates tst_logfile base on day time. For example, the system > time is '2015 Jul 3', > then the case will create 'messages-20150703.gz'. So 'rm -r /var/log/*`date > '+%Y%m%d'`*' in patch > only delete the message file of case created (after running it) and not other > system logs. > > I think, if the logrotate testcase fail when run it the second time,it's a > problem of > testcase and we should fix it. ------------------------------------------------------------------------------ Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list