From eb6459161394d763b116e55eaef22b6b0b6a09a8 Mon Sep 17 00:00:00 2001 From: Daniel Vetter Date: Sat, 14 Jan 2012 17:05:39 +0100 Subject: [PATCH] tests: add ZZ_check_dmesg This way the testsuit automatically fails if we hit a DRM_ERROR or a WARN/BUG somewhere. ... i.e. this is the Jesse Barnes catcher ... Signed-off-by: Daniel Vetter --- tests/Makefile.am | 3 +++ tests/ZZ_check_dmesg | 11 +++++++++++ 2 files changed, 14 insertions(+) create mode 100755 tests/ZZ_check_dmesg diff --git a/tests/Makefile.am b/tests/Makefile.am index 10678565..190d2d35 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -62,10 +62,13 @@ TESTS_progs = \ drm_vma_limiter_cached \ $(NULL) +# IMPORTANT: The ZZ_ tests need to be run last! +# ... and make can't deal with inlined comments ... TESTS_scripts = \ debugfs_reader \ debugfs_emon_crash \ sysfs_edid_timing \ + ZZ_check_dmesg \ $(NULL) kernel_tests = \ diff --git a/tests/ZZ_check_dmesg b/tests/ZZ_check_dmesg new file mode 100755 index 00000000..e28ba35f --- /dev/null +++ b/tests/ZZ_check_dmesg @@ -0,0 +1,11 @@ +#!/bin/sh + +if dmesg | grep '\*ERROR\*' > /dev/null ; then + echo "DRM_ERROR dirt in dmesg" + exit 1 +fi + +if dmesg | grep -- '------\[ cut here \]----' > /dev/null ; then + echo "found a backtrace in dmesg" + exit 1 +fi