[tip:core/rcu] torture: Check for nul bytes in console output

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Commit-ID:  bc51896da2ceef188f9cd708943d48c1259ebe84
Gitweb:     http://git.kernel.org/tip/bc51896da2ceef188f9cd708943d48c1259ebe84
Author:     Paul E. McKenney <paulmck@xxxxxxxxxxxxxxxxxx>
AuthorDate: Tue, 26 Aug 2014 11:35:43 -0700
Committer:  Paul E. McKenney <paulmck@xxxxxxxxxxxxxxxxxx>
CommitDate: Sun, 7 Sep 2014 16:24:49 -0700

torture: Check for nul bytes in console output

When starting a new torture run while an old one is still running, both
qemu processes can be outputting to the same console.out file.  This can
cause quite a bit of confusion, so this commit checks for this situation,
which is normally indicated by nul bytes in the console output.  Yes,
if your new run uses up an exact number of blocks of the file, this
check will be ineffective, but the odds are not bad.

Signed-off-by: Paul E. McKenney <paulmck@xxxxxxxxxxxxxxxxxx>
Reviewed-by: Pranith Kumar <bobby.prani@xxxxxxxxx>
---
 tools/testing/selftests/rcutorture/bin/parse-console.sh | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tools/testing/selftests/rcutorture/bin/parse-console.sh b/tools/testing/selftests/rcutorture/bin/parse-console.sh
index a0bde6c..f962ba4 100755
--- a/tools/testing/selftests/rcutorture/bin/parse-console.sh
+++ b/tools/testing/selftests/rcutorture/bin/parse-console.sh
@@ -32,6 +32,10 @@ title="$2"
 
 . functions.sh
 
+if grep -Pq '\x00' < $file
+then
+	print_warning Console output contains nul bytes, old qemu still running?
+fi
 egrep 'Badness|WARNING:|Warn|BUG|===========|Call Trace:|Oops:' < $file | grep -v 'ODEBUG: ' | grep -v 'Warning: unable to open an initial console' > $T
 if test -s $T
 then
--
To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Stable Commits]     [Linux Stable Kernel]     [Linux Kernel]     [Linux USB Devel]     [Linux Video &Media]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux