tests/drv_module_reload_basic: Leave basic breadcrumbs in dmesg
PATCH 1/1 tests/drv_module_reload_basic: Leave basic breadcrumbs in dmesg
From: Ville Syrjälä <[email protected]>
Leave the normal "executing" and "exiting" breadcrumbs into dmesg when running the test.
--- tests/drv_module_reload_basic | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+)
tests/drv_module_reload_basic +27 -0
@@ -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
Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 25 lines · On Thu, 06 Oct 2016, [email protected] wrote:
From: Ville Syrjälä <[email protected]>
Leave the normal "executing" and "exiting" breadcrumbs into dmesg when running the test.
Signed-off-by Ville Syrjälä <[email protected]>--- tests/drv_module_reload_basic | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+)tests/drv_module_reload_basic +7
-0@@ -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>"
tests/drv_module_reload_basic line 25
Quoted 10 lines
tests/drv_module_reload_basic +10
-0+KERN_WARNING="<4>" +KERN_NOTICE="<5>" +KERN_INFO="<6>" +KERN_DEBUG="<7>" + +function kmsg() +{ + echo "$1" > /dev/kmsg +} +
Seems like these would belong in drm_lib.sh. Or do you really need to do the kmsg *before* sourcing drm_lib.sh?
BR,
Jani.
Quoted 13 lines
tests/drv_module_reload_basic +10
-0+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
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 31 lines · Jani Nikula
Quoted 30 lines · On Thu, 06 Oct 2016, [email protected] wrote:
From: Ville Syrjälä <[email protected]>
Leave the normal "executing" and "exiting" breadcrumbs into dmesg when running the test.
Signed-off-by Ville Syrjälä <[email protected]>--- tests/drv_module_reload_basic | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+)tests/drv_module_reload_basic +12
-0@@ -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>" +
Quoted 8 lines
tests/drv_module_reload_basic line 25
Quoted 5 lines
tests/drv_module_reload_basic +5
-0+function kmsg() +{ + echo "$1" > /dev/kmsg +} +Seems like these would belong in
drm_lib.sh. Or do you really need to do the kmsg *before* sourcingdrm_lib.sh?
drm_lib.sh can itself exit, so the trap needs to be done before sourcing it. And drm_lib.sh isn't a bash script, so I didn't dare to put it there.
Quoted 20 lines
BR,
Jani.Quoted 13 lines
tests/drv_module_reload_basic +10
-0+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 unbindSignature · 1 line
Jani Nikula, Intel Open Source Technology Center
Signature · 6 lines
Ville Syrjälä Intel OTC _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 41 lines · Ville Syrjälä
Quoted 31 lines · Jani Nikula
Quoted 30 lines · On Thu, 06 Oct 2016, [email protected] wrote:
From: Ville Syrjälä <[email protected]>
Leave the normal "executing" and "exiting" breadcrumbs into dmesg when running the test.
Signed-off-by Ville Syrjälä <[email protected]>--- tests/drv_module_reload_basic | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+)tests/drv_module_reload_basic +12
-0@@ -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>" +Quoted 8 lines
tests/drv_module_reload_basic line 25
Quoted 5 lines
tests/drv_module_reload_basic +5
-0+function kmsg() +{ + echo "$1" > /dev/kmsg +} +Seems like these would belong in
drm_lib.sh. Or do you really need to do the kmsg *before* sourcingdrm_lib.sh?
Quoted 3 lines
drm_lib.shcan itself exit, so the trap needs to be done before sourcing it. Anddrm_lib.shisn't a bash script, so I didn't dare to put it there.
Actuall it's a bash script, and I guess trap isn't even a bashism. Not sure why I have that idea. Anyway, new series posted with all the magic happening in drm_lib.sh \o/
Quoted 29 lines
Quoted 21 lines
BR,
Jani.Quoted 13 lines
tests/drv_module_reload_basic +10
-0+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 unbindSignature · 1 line
Jani Nikula, Intel Open Source Technology CenterSignature · 6 lines
Ville Syrjälä Intel OTC _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 6 lines
Ville Syrjälä Intel OTC _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx