public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH] commands/logrotate:run the case once again will failed
@ 2015-05-05 12:12 Cui Bixuan
       [not found] ` <555D8E94.20605@huawei.com>
  2015-07-01 12:47 ` Cui Bixuan
  0 siblings, 2 replies; 15+ messages in thread
From: Cui Bixuan @ 2015-05-05 12:12 UTC (permalink / raw)
  To: ltp-list; +Cc: zhuyanpeng, zhanyongming

For the first time,case do 'logrotate -fv tst_logrotate.conf' that will
create the 'half-rotated' file(messages-20150416.gz). When run case again,
the case will fail:
'error: destination /var/log/messages-20150416.gz already exists,skipping
rotation'

'Logrotate' does't expect to find an already existing "half-rotated" file
(http://centos.1050465.n5.nabble.com/CentOS-Logrotate-errors-td5725868.html).
Clean the "half-rotated" file,and the case will pass all the time.

Signed-off-by: Cui Bixuan <cuibixuan@huawei.com>
---
 testcases/commands/logrotate/logrotate_tests.sh |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/testcases/commands/logrotate/logrotate_tests.sh b/testcases/commands/logrotate/logrotate_tests.sh
index 2a793cc..5b14ca0 100755
--- a/testcases/commands/logrotate/logrotate_tests.sh
+++ b/testcases/commands/logrotate/logrotate_tests.sh
@@ -191,6 +191,7 @@ test01()
 	do
 		rm -f $files > /dev/null 2>&1
 	done
+	rm -f /var/log/*`date '+%Y%m%d'`* > /dev/null 2>&1
 
 	chmod 644 $LTPTMP/tst_logrotate.conf
 	logrotate -fv $LTPTMP/tst_logrotate.conf > $LTPTMP/tst_logrotate.out 2>&1 \
-- 
1.6.0.2


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2015-07-13  9:08 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-05 12:12 [LTP] [PATCH] commands/logrotate:run the case once again will failed Cui Bixuan
     [not found] ` <555D8E94.20605@huawei.com>
2015-05-21  9:28   ` s00318865
2015-05-29  1:25     ` Cui Bixuan
2015-05-30  7:01       ` Yuan Sun
2015-06-01  2:46         ` Li Wang
2015-06-01  3:44           ` Yuan Sun
2015-07-01 12:47 ` Cui Bixuan
2015-07-01 14:10   ` Alexey Kodanev
2015-07-02 12:06     ` Cui Bixuan
2015-07-02 14:22       ` Alexey Kodanev
2015-07-04  3:03         ` Cui Bixuan
2015-07-06 14:31           ` Alexey Kodanev
2015-07-07  9:13             ` [LTP] [PATCH v2] " Cui Bixuan
2015-07-09  5:59               ` Alexey Kodanev
2015-07-13  8:59                 ` Cui Bixuan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox