From 7f271a24882b112f6ac3983aa8bab4c1c66435a7 Mon Sep 17 00:00:00 2001 From: Sergey Cheremencev Date: Thu, 25 Jun 2015 12:52:11 +0300 Subject: [PATCH] LU-7227 tests: check dmesg for errors after test Add a check to t-f that dmesg doesn't have critical messages after test execution. The list of error messages in "check_dmesg_for_erros" should be updated by developers. Change-Id: If33ab73865121a56b9a21afd10fa1635f30dcbbe Xyratex-bug-id: MRP-2713 Signed-off-by: Sergey Cheremencev Reviewed-by: Elena V. Gryaznova Tested-by: Elena V. Gryaznova Reviewed-by: Alexander Zarochentsev Reviewed-on: http://review.whamcloud.com/16665 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: James Nunez Reviewed-by: Oleg Drokin --- lustre/tests/test-framework.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index 48795c0..eaa4878 100755 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -4932,6 +4932,18 @@ banner() { log "$msg== $(date +"%H:%M:%S (%s)")" } +check_dmesg_for_errors() { + local res + local errors="VFS: Busy inodes after unmount of\|\ +ldiskfs_check_descriptors: Checksum for group 0 failed\|\ +group descriptors corrupted" + + res=$(do_nodes $(comma_list $(nodes_list)) "dmesg" | grep "$errors") + [ -z "$res" ] && return 0 + echo "Kernel error detected: $res" + return 1 +} + # # Run a single test function and cleanup after it. # @@ -4953,6 +4965,7 @@ run_one() { reset_fail_loc check_grant ${testnum} || error "check_grant $testnum failed with $?" check_catastrophe || error "LBUG/LASSERT detected" + check_dmesg_for_errors || error "Error in dmesg detected" if [ "$PARALLEL" != "yes" ]; then ps auxww | grep -v grep | grep -q multiop && error "multiop still running" -- 1.8.3.1