Skip to contentSkip to conversation

xfstests: log running test to dmesg

PATCH In review Eric Sandeen 3 participants 4 messages Apr 16, 2014 – Jul 18, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xfstests: 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.

---

check +1 -0
index 268417c..09b2320 100755
@@ -457,6 +457,7 @@ do
 	$timestamp && echo -n "	["`date "+%T"`"]"
 	[ ! -x $seq ] && chmod u+x $seq # ensure we can run it
 	$LOGGER_PROG "run xfstest $seqnum"
+	test -w /dev/kmsg && echo "run xfstest $seqnum" > /dev/kmsg
 	./$seq >$tmp.rawout 2>&1
 	sts=$?
 	$timestamp && _timestamp

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#1 lore raw
Quoted 15 lines · Eric Sandeen

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.

---

check +0 -0
index 268417c..09b2320 100755

check do · line 463

Quoted 7 lines
check +1 -0
@@ -457,6 +457,7 @@ do
 	$timestamp && echo -n "	["`date "+%T"`"]"
 	[ ! -x $seq ] && chmod u+x $seq # ensure we can run it
 	$LOGGER_PROG "run xfstest $seqnum"
+	test -w /dev/kmsg && echo "run xfstest $seqnum" > /dev/kmsg
 	./$seq >$tmp.rawout 2>&1
 	sts=$?
 	$timestamp && _timestamp

Might it be worthwhile adding a "_log" function that can take an arbitrary string so in future it is easy to add new log messages?

Cheers,

Dave.

Signature · 7 lines
Dave Chinner
[email protected]

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
#2 lore raw
Quoted 11 lines · Dave Chinner
Quoted 10 lines · Eric Sandeen

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.

---

Quoted 15 lines

check do · line 463

Quoted 12 lines
check +1 -0
index 268417c..09b2320 100755
@@ -457,6 +457,7 @@ do
 	$timestamp && echo -n "	["`date "+%T"`"]"
 	[ ! -x $seq ] && chmod u+x $seq # ensure we can run it
 	$LOGGER_PROG "run xfstest $seqnum"
+	test -w /dev/kmsg && echo "run xfstest $seqnum" > /dev/kmsg
 	./$seq >$tmp.rawout 2>&1
 	sts=$?
 	$timestamp && _timestamp

Might it be worthwhile adding a "_log" function that can take an arbitrary string so in future it is easy to add new log messages?

*shrug* I guess... nobody logs anything but here, today...

-Eric

Quoted 4 lines

Cheers,

Dave.

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#3 lore raw
In reply to Eric Sandeen
Quoted 8 lines · Eric Sandeen

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.

can we get this one in? Dave asked for a generic helper, but no test needs to print to kmsg, and nobody else uses LOGGER_PROG.

All we use either one for is logging the test run.

If somebody needs it for another purpose, it makes sense to add a helper...

-Eric

Quoted 16 lines

---

check +1 -0
index 268417c..09b2320 100755
@@ -457,6 +457,7 @@ do
 	$timestamp && echo -n "	["`date "+%T"`"]"
 	[ ! -x $seq ] && chmod u+x $seq # ensure we can run it
 	$LOGGER_PROG "run xfstest $seqnum"
+	test -w /dev/kmsg && echo "run xfstest $seqnum" > /dev/kmsg
 	./$seq >$tmp.rawout 2>&1
 	sts=$?
 	$timestamp && _timestamp
Quoted 5 lines

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs