From: Subrata <ris...@li...> - 2010-07-03 18:45:54
|
The branch, master, has been updated via e3bc3758d3e4d17a0e04009ef873df53819b9ec6 (commit) from 9e365e8e209904086b18420438b4792851c219b8 (commit) - Log ----------------------------------------------------------------- commit e3bc3758d3e4d17a0e04009ef873df53819b9ec6 Author: Subrata Modak <sub...@su...> Date: Sat Jul 3 23:32:27 2010 +0530 [PATCH v4] Remove files which does not have a dmesg entry The recently introduced option: -K DMESG_LOG_DIR Log Kernel messages generated for each test cases inside this directory, when used will generate huge no. of files inside the DMESG_DIR. Many of them will be ZERO size as we do not expect KERNEL MESSAGE to be generated against all the LTP TESTS that we will run. It is better to prune them, and let only those files exist which will have real entries. The following patch fixes the same. Signed-off-by: Subrata Modak <su...@li...>, ----------------------------------------------------------------------- Summary of changes: runltp | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/runltp b/runltp index 7a8ac28..b385984 100755 --- a/runltp +++ b/runltp @@ -858,6 +858,21 @@ main() cd .. echo "LTP Version: $version_date" + # $DMESG_DIR is used to cache messages obtained from dmesg after a test run. + # Proactively reap all of the 0-byte files in $DMESG_DIR as they have zero value + # and only clutter up the filesystem. + + if [ $ALT_DMESG_OUT -eq 1 ] ; then + if ! find "$DMESG_DIR" -size 0 -exec rm {} + ; then + echo "cd to $DMESG_DIR failed: $?" + fi + if [ -n "$(ls "$DMESG_DIR")" ] ; then + echo "Kernel messages were generated for LTP tests $version_date" + else + echo "No Kernel messages were generated for LTP tests $version_date" + fi + fi + if [ "$ALT_HTML_OUT" -eq 1 ] ; then #User wants the HTML output to be created, it then needs to be generated export LTP_VERSION=$version_date export TEST_START_TIME=$test_start_time hooks/post-receive -- ltp |