[PATCH i-g-t] tests/drv_module_reload_basic: Leave basic breadcrumbs in dmesg

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

 



From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>

Leave the normal "executing" and "exiting" breadcrumbs into dmesg when
running the test.

Signed-off-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
---
 tests/drv_module_reload_basic | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/tests/drv_module_reload_basic b/tests/drv_module_reload_basic
index 93cf7c005638..4c75f0e9614a 100755
--- a/tests/drv_module_reload_basic
+++ b/tests/drv_module_reload_basic
@@ -6,6 +6,33 @@
 #
 
 SOURCE_DIR="$( dirname "${BASH_SOURCE[0]}" )"
+
+NAME=$(basename "$0")
+
+KERN_EMER="<0>"
+KERN_ALERT="<1>"
+KERN_CRIT="<2>"
+KERN_ERR="<3>"
+KERN_WARNING="<4>"
+KERN_NOTICE="<5>"
+KERN_INFO="<6>"
+KERN_DEBUG="<7>"
+
+function kmsg()
+{
+	echo "$1" > /dev/kmsg
+}
+
+function finish()
+{
+	exitcode=$?
+	kmsg "$KERN_INFO$NAME: exiting, ret=$exitcode"
+	exit $exitcode
+}
+trap finish EXIT
+
+kmsg "$KERN_INFO$NAME: executing"
+
 . $SOURCE_DIR/drm_lib.sh
 
 # no other drm service should be running, so we can just unbind
-- 
2.7.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux