From: Eric Sandeen Date: Wed, 21 Jan 2015 05:19:33 +0000 (+1100) Subject: check: log running test to dmesg X-Git-Tag: v2022.05.01~2969 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=39cbe0484ce9bb2e63db8563753c06a14de5c06e;p=xfstests-dev.git check: log running test to dmesg We already log the running test to system logs via "logger" but viro pointed out that we can use /dev/kmsg to insert it into dmesg as well. When looking at the serial console that could be pretty useful. Thanks to viro for the test -w suggestion too. [Eryu Guan adds timestamp to dmesg too] Signed-off-by: Eryu Guan Signed-off-by: Eric Sandeen Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner --- diff --git a/check b/check index 10f4a18b..3d42a8ba 100755 --- a/check +++ b/check @@ -561,6 +561,10 @@ for section in $HOST_OPTIONS_SECTIONS; do $timestamp && echo -n " ["`date "+%T"`"]" [ ! -x $seq ] && chmod u+x $seq # ensure we can run it $LOGGER_PROG "run xfstest $seqnum" + if [ -w /dev/kmsg ]; then + date_time=`date +"%F %T"` + echo "run fstests $seqnum at $date_time" > /dev/kmsg + fi ./$seq >$tmp.rawout 2>&1 sts=$? $timestamp && _timestamp