Skip to contentSkip to conversation

igt/drv_module_reload_basic: let more error messages through

PATCH In review Jani Nikula 2 participants 7 messages Oct 3, 2016 – Oct 4, 2016

lore
Share & tools
lore
#0 lore raw

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
#1 lore raw

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
index 3bba796f0306..4f3172788eca 100755
@@ -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
Reviewed-by on v1 1/3
#2 lore raw

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.

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
#3 lore raw

PATCH 2/3 igt/drv_module_reload_basic: let snd_hda_intel removal errors through

In reply to Jani Nikula

Only 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
index 4f3172788eca..a221d65f725a 100755
@@ -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
Reviewed-by on v1 2/3
#4 lore raw

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_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.

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
#5 lore raw

PATCH 3/3 igt/drv_module_reload_basic: let intel_ips removal errors through

In reply to Jani Nikula

Only 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
index a221d65f725a..93cf7c005638 100755
@@ -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
Reviewed-by on v1 3/3
#6 lore raw

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_ips if it's actually loaded, and let the errors through to the logs if removal fails.

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