public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] "logrotate01" has problem
@ 2010-02-15  6:33 Yuki Yao
  2010-02-17 15:02 ` Rishikesh K Rajak
  0 siblings, 1 reply; 6+ messages in thread
From: Yuki Yao @ 2010-02-15  6:33 UTC (permalink / raw)
  To: ltp-list

Hi,

I contributed following problem previously, but it's not yet revised.
So, I contribute this again.

After "./runltp" execution, all log files such as "/var/log/messages*" 
disappeared, and there is only new log file created after the test.

This seems a problem that occurs after the "logrotate01" test. 
I found that the past log files were deleted by forcing a "logrotate"
(logrotate -fv $LTPTMP/tst_logrotate.conf).

Besides, logrotate01's shell script "./testcases/commands/logrotate
/logrotate_tests.sh" creats logrotate configuration file ($LTPTMP
/tst_logrotate.conf) for the test, and this configration file includes
"/etc/logrotate.d" as follows:

[ ./testcases/commands/logrotate/logrotate_tests.sh line:156~ ]
----------
# create config file.
	cat >$LTPTMP/tst_logrotate.conf <<-EOF
	#****** Begin Config file *******
	# create new (empty) log files after rotating old ones
	create

	# compress the log files
	compress

	# RPM packages drop log rotation information into this directory
	include /etc/logrotate.d

	/var/log/tst_logfile {
		rotate 5
		weekly
	}
	#****** End Config file *******
	EOF
----------

By This, not only a log file for the test (/var/log/tst_logfile) 
but also 30 fies such as "/var/log/messages*" become "logrotate" 
command target.
Only a log file for this test must become a target of the forced 
execution of "logrotate".

To resolve this problem, we must change "/logrotate_tests.sh" not to 
include "/etc/logrotate.d", I think.

Signed-off-by: Yuki Yao<y_yao@ryobi.co.jp>

Index: ./testcases/commands/logrotate/logrotate_tests.sh
============
--- ./testcases/commands/logrotate/logrotate_tests.sh.orig	2008-10-21
15:54:15.000000000 +0900
+++ ./testcases/commands/logrotate/logrotate_tests.sh	2010-02-15
13:32:02.000000000 +0900
@@ -163,7 +163,7 @@
 	compress
 
 	# RPM packages drop log rotation information into this directory
-	include /etc/logrotate.d
+	# include /etc/logrotate.d
 
 	/var/log/tst_logfile {
 		rotate 5
@@ -200,7 +200,7 @@
 		# check if  /etc/logrotate.d is included/
 		# check if 5 rotations are forced.
         # check if compression is done.
-		grep "including /etc/logrotate.d" $LTPTMP/tst_logrotate.out
\
+		# grep "including /etc/logrotate.d"
$LTPTMP/tst_logrotate.out \
 			> $LTPTMP/tst_logrotate.err 2>&1 || RC=$?
 		grep "reading config file $LTPTMP/tst_logrotate.conf" \
 			$LTPTMP/tst_logrotate.out   >
$LTPTMP/tst_logrotate.err 2>&1 || RC=$?
============


I'm glad if I got some opinion about this.

Thank you,
-Yuki Yao



------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

end of thread, other threads:[~2010-03-05  9:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-15  6:33 [LTP] "logrotate01" has problem Yuki Yao
2010-02-17 15:02 ` Rishikesh K Rajak
2010-02-17 17:36   ` Garrett Cooper
2010-02-22  2:06     ` Yuki Yao
2010-02-22  7:10       ` Garrett Cooper
2010-03-05  9:20         ` Yuki Yao

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