public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [i-g-t PATCH 0/3] igt/drv_module_reload_basic: let more error messages through
@ 2016-10-03 14:20 Jani Nikula
  2016-10-03 14:20 ` [i-g-t PATCH 1/3] igt/drv_module_reload_basic: add helper for checking module reloaded Jani Nikula
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Jani Nikula @ 2016-10-03 14:20 UTC (permalink / raw)
  To: intel-gfx; +Cc: jani.nikula

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(-)

-- 
2.1.4

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [i-g-t PATCH 1/3] igt/drv_module_reload_basic: add helper for checking module reloaded
  2016-10-03 14:20 [i-g-t PATCH 0/3] igt/drv_module_reload_basic: let more error messages through Jani Nikula
@ 2016-10-03 14:20 ` Jani Nikula
  2016-10-04  4:45   ` Joonas Lahtinen
  2016-10-03 14:20 ` [i-g-t PATCH 2/3] igt/drv_module_reload_basic: let snd_hda_intel removal errors through Jani Nikula
  2016-10-03 14:20 ` [i-g-t PATCH 3/3] igt/drv_module_reload_basic: let intel_ips " Jani Nikula
  2 siblings, 1 reply; 7+ messages in thread
From: Jani Nikula @ 2016-10-03 14:20 UTC (permalink / raw)
  To: intel-gfx; +Cc: 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 <jani.nikula@intel.com>
---
 tests/drv_module_reload_basic | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/tests/drv_module_reload_basic b/tests/drv_module_reload_basic
index 3bba796f0306..4f3172788eca 100755
--- a/tests/drv_module_reload_basic
+++ b/tests/drv_module_reload_basic
@@ -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
-- 
2.1.4

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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [i-g-t PATCH 2/3] igt/drv_module_reload_basic: let snd_hda_intel removal errors through
  2016-10-03 14:20 [i-g-t PATCH 0/3] igt/drv_module_reload_basic: let more error messages through Jani Nikula
  2016-10-03 14:20 ` [i-g-t PATCH 1/3] igt/drv_module_reload_basic: add helper for checking module reloaded Jani Nikula
@ 2016-10-03 14:20 ` Jani Nikula
  2016-10-04  4:46   ` Joonas Lahtinen
  2016-10-03 14:20 ` [i-g-t PATCH 3/3] igt/drv_module_reload_basic: let intel_ips " Jani Nikula
  2 siblings, 1 reply; 7+ messages in thread
From: Jani Nikula @ 2016-10-03 14:20 UTC (permalink / raw)
  To: intel-gfx; +Cc: 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.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 tests/drv_module_reload_basic | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tests/drv_module_reload_basic b/tests/drv_module_reload_basic
index 4f3172788eca..a221d65f725a 100755
--- a/tests/drv_module_reload_basic
+++ b/tests/drv_module_reload_basic
@@ -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
-- 
2.1.4

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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [i-g-t PATCH 3/3] igt/drv_module_reload_basic: let intel_ips removal errors through
  2016-10-03 14:20 [i-g-t PATCH 0/3] igt/drv_module_reload_basic: let more error messages through Jani Nikula
  2016-10-03 14:20 ` [i-g-t PATCH 1/3] igt/drv_module_reload_basic: add helper for checking module reloaded Jani Nikula
  2016-10-03 14:20 ` [i-g-t PATCH 2/3] igt/drv_module_reload_basic: let snd_hda_intel removal errors through Jani Nikula
@ 2016-10-03 14:20 ` Jani Nikula
  2016-10-04  4:47   ` Joonas Lahtinen
  2 siblings, 1 reply; 7+ messages in thread
From: Jani Nikula @ 2016-10-03 14:20 UTC (permalink / raw)
  To: intel-gfx; +Cc: jani.nikula

Only try removing intel_ips if it's actually loaded, and let the errors
through to the logs if removal fails.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 tests/drv_module_reload_basic | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tests/drv_module_reload_basic b/tests/drv_module_reload_basic
index a221d65f725a..93cf7c005638 100755
--- a/tests/drv_module_reload_basic
+++ b/tests/drv_module_reload_basic
@@ -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
-- 
2.1.4

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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [i-g-t PATCH 1/3] igt/drv_module_reload_basic: add helper for checking module reloaded
  2016-10-03 14:20 ` [i-g-t PATCH 1/3] igt/drv_module_reload_basic: add helper for checking module reloaded Jani Nikula
@ 2016-10-04  4:45   ` Joonas Lahtinen
  0 siblings, 0 replies; 7+ messages in thread
From: Joonas Lahtinen @ 2016-10-04  4:45 UTC (permalink / raw)
  To: Jani Nikula, intel-gfx

On ma, 2016-10-03 at 17:20 +0300, Jani Nikula wrote:
> Add a helper for checking whether a module is reloaded, using
> lsmod. Also make the grep stricter than before.
> 
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>

Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>

Regards, Joonas
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [i-g-t PATCH 2/3] igt/drv_module_reload_basic: let snd_hda_intel removal errors through
  2016-10-03 14:20 ` [i-g-t PATCH 2/3] igt/drv_module_reload_basic: let snd_hda_intel removal errors through Jani Nikula
@ 2016-10-04  4:46   ` Joonas Lahtinen
  0 siblings, 0 replies; 7+ messages in thread
From: Joonas Lahtinen @ 2016-10-04  4:46 UTC (permalink / raw)
  To: Jani Nikula, intel-gfx

On ma, 2016-10-03 at 17:20 +0300, Jani Nikula wrote:
> 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.
> 
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>

Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>

Regards, Joonas
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [i-g-t PATCH 3/3] igt/drv_module_reload_basic: let intel_ips removal errors through
  2016-10-03 14:20 ` [i-g-t PATCH 3/3] igt/drv_module_reload_basic: let intel_ips " Jani Nikula
@ 2016-10-04  4:47   ` Joonas Lahtinen
  0 siblings, 0 replies; 7+ messages in thread
From: Joonas Lahtinen @ 2016-10-04  4:47 UTC (permalink / raw)
  To: Jani Nikula, intel-gfx

On ma, 2016-10-03 at 17:20 +0300, Jani Nikula wrote:
> Only try removing intel_ips if it's actually loaded, and let the errors
> through to the logs if removal fails.
> 
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>

Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>

Regards, Joonas
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-10-04  4:47 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-03 14:20 [i-g-t PATCH 0/3] igt/drv_module_reload_basic: let more error messages through Jani Nikula
2016-10-03 14:20 ` [i-g-t PATCH 1/3] igt/drv_module_reload_basic: add helper for checking module reloaded Jani Nikula
2016-10-04  4:45   ` Joonas Lahtinen
2016-10-03 14:20 ` [i-g-t PATCH 2/3] igt/drv_module_reload_basic: let snd_hda_intel removal errors through Jani Nikula
2016-10-04  4:46   ` Joonas Lahtinen
2016-10-03 14:20 ` [i-g-t PATCH 3/3] igt/drv_module_reload_basic: let intel_ips " Jani Nikula
2016-10-04  4:47   ` Joonas Lahtinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox