igt/drv_module_reload_basic: let more error messages through
cover igt/drv_module_reload_basic: let more error messages through
Thes might leave us some more breadcrumbs on module removal errors.
BR,
Jani.
Jani Nikula (3):
igt/drv_module_reload_basic: add helper for checking module reloaded igt/drv_module_reload_basic: let snd_hda_intel removal errors through igt/drv_module_reload_basic: let intel_ips removal errors through
tests/drv_module_reload_basic | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-)
Signature · 6 lines
2.1.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 1/3 igt/drv_module_reload_basic: add helper for checking module reloaded
Add a helper for checking whether a module is reloaded, using lsmod. Also make the grep stricter than before.
--- tests/drv_module_reload_basic | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
tests/drv_module_reload_basic +7 -1
@@ -10,6 +10,12 @@ SOURCE_DIR="$( dirname "${BASH_SOURCE[0]}" )" # no other drm service should be running, so we can just unbind +# return 0 if module by name $1 is loaded according to lsmod +function mod_loaded() +{ + lsmod | grep -w "^$1" &> /dev/null +} + function reload() { local snd_hda_intel_unloaded
@@ -37,7 +43,7 @@ function reload() { rmmod drm_kms_helper &> /dev/null rmmod drm &> /dev/null - if lsmod | grep i915 &> /dev/null ; then + if mod_loaded i915; then echo WARNING: i915.ko still loaded! return $IGT_EXIT_FAILURE else
Signature · 6 lines
2.1.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [i-g-t PATCH 1/3] igt/drv_module_reload_basic: add helper for checking module reloaded
Quoted 4 lines · Jani Nikula
Add a helper for checking whether a module is reloaded, using lsmod. Also make the grep stricter than before.
Signed-off-by Jani Nikula <[email protected]>
Regards, Joonas
Signature · 7 lines
Joonas Lahtinen Open Source Technology Center Intel Corporation _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/3 igt/drv_module_reload_basic: let snd_hda_intel removal errors through
In reply to Jani NikulaOnly try removing snd_hda_intel if it's actually loaded, and let the errors through to the logs if removal fails. This is a clue if i915 removal fails later.
--- tests/drv_module_reload_basic | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
tests/drv_module_reload_basic +3 -1
@@ -32,7 +32,9 @@ function reload() { # The sound driver uses our power well pkill alsactl snd_hda_intel_unloaded=0 - rmmod snd_hda_intel &> /dev/null && snd_hda_intel_unloaded=1 + if mod_loaded snd_hda_intel; then + rmmod snd_hda_intel && snd_hda_intel_unloaded=1 + fi #ignore errors in ips - gen5 only rmmod intel_ips &> /dev/null
Signature · 6 lines
2.1.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [i-g-t PATCH 2/3] igt/drv_module_reload_basic: let snd_hda_intel removal errors through
Quoted 5 lines · Jani Nikula
Only try removing
snd_hda_intelif it's actually loaded, and let the errors through to the logs if removal fails. This is a clue if i915 removal fails later.Signed-off-by Jani Nikula <[email protected]>
Regards, Joonas
Signature · 7 lines
Joonas Lahtinen Open Source Technology Center Intel Corporation _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 3/3 igt/drv_module_reload_basic: let intel_ips removal errors through
In reply to Jani NikulaOnly try removing intel_ips if it's actually loaded, and let the errors through to the logs if removal fails.
--- tests/drv_module_reload_basic | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
tests/drv_module_reload_basic +4 -2
@@ -36,8 +36,10 @@ function reload() { rmmod snd_hda_intel && snd_hda_intel_unloaded=1 fi - #ignore errors in ips - gen5 only - rmmod intel_ips &> /dev/null + # gen5 only + if mod_loaded intel_ips; then + rmmod intel_ips + fi rmmod i915 || return $IGT_EXIT_SKIP #ignore errors in intel-gtt, often built-in rmmod intel-gtt &> /dev/null
Signature · 6 lines
2.1.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [i-g-t PATCH 3/3] igt/drv_module_reload_basic: let intel_ips removal errors through
Quoted 4 lines · Jani Nikula
Only try removing
intel_ipsif it's actually loaded, and let the errors through to the logs if removal fails.Signed-off-by Jani Nikula <[email protected]>
Regards, Joonas
Signature · 7 lines
Joonas Lahtinen Open Source Technology Center Intel Corporation _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx