All of lore.kernel.org
 help / color / mirror / Atom feed
* [i-g-t PATCH] tests: debug log lsmod on module unload failure
@ 2016-10-18  7:07 Jani Nikula
  2016-10-21 11:18 ` Petri Latvala
  0 siblings, 1 reply; 3+ messages in thread
From: Jani Nikula @ 2016-10-18  7:07 UTC (permalink / raw)
  To: intel-gfx; +Cc: jani.nikula

It's a bit verbose, but should only happen on errors. This should help
debug the snd_hda_intel unload issues.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>

---

UNTESTED!!!
---
 tests/drv_module_reload_basic | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/tests/drv_module_reload_basic b/tests/drv_module_reload_basic
index a8d628dd96bd..b8cad88133e9 100755
--- a/tests/drv_module_reload_basic
+++ b/tests/drv_module_reload_basic
@@ -33,14 +33,22 @@ function reload() {
 	pkill alsactl
 	snd_hda_intel_unloaded=0
 	if mod_loaded snd_hda_intel; then
-		rmmod snd_hda_intel && snd_hda_intel_unloaded=1
+		if rmmod snd_hda_intel; then
+			snd_hda_intel_unloaded=1
+		else
+			lsmod >&2
+		fi
 	fi
 
 	# gen5 only
 	if mod_loaded intel_ips; then
 		rmmod intel_ips
 	fi
-	rmmod i915 || return $IGT_EXIT_SKIP
+
+	if ! rmmod i915; then
+		lsmod >&2
+		return $IGT_EXIT_SKIP
+	fi
 	#ignore errors in intel-gtt, often built-in
 	rmmod intel-gtt &> /dev/null
 	# drm may be used by other devices (nouveau, radeon, udl, etc)
-- 
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] 3+ messages in thread

* Re: [i-g-t PATCH] tests: debug log lsmod on module unload failure
  2016-10-18  7:07 [i-g-t PATCH] tests: debug log lsmod on module unload failure Jani Nikula
@ 2016-10-21 11:18 ` Petri Latvala
  2016-10-21 12:23   ` Jani Nikula
  0 siblings, 1 reply; 3+ messages in thread
From: Petri Latvala @ 2016-10-21 11:18 UTC (permalink / raw)
  To: Jani Nikula; +Cc: intel-gfx

On Tue, Oct 18, 2016 at 10:07:04AM +0300, Jani Nikula wrote:
> It's a bit verbose, but should only happen on errors. This should help
> debug the snd_hda_intel unload issues.
> 
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> 
> ---
> 
> UNTESTED!!!

This sounds scary but LGTM.

Reviewed-by: Petri Latvala <petri.latvala@intel.com>


> ---
>  tests/drv_module_reload_basic | 12 ++++++++++--
>  1 file changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/drv_module_reload_basic b/tests/drv_module_reload_basic
> index a8d628dd96bd..b8cad88133e9 100755
> --- a/tests/drv_module_reload_basic
> +++ b/tests/drv_module_reload_basic
> @@ -33,14 +33,22 @@ function reload() {
>  	pkill alsactl
>  	snd_hda_intel_unloaded=0
>  	if mod_loaded snd_hda_intel; then
> -		rmmod snd_hda_intel && snd_hda_intel_unloaded=1
> +		if rmmod snd_hda_intel; then
> +			snd_hda_intel_unloaded=1
> +		else
> +			lsmod >&2
> +		fi
>  	fi
>  
>  	# gen5 only
>  	if mod_loaded intel_ips; then
>  		rmmod intel_ips
>  	fi
> -	rmmod i915 || return $IGT_EXIT_SKIP
> +
> +	if ! rmmod i915; then
> +		lsmod >&2
> +		return $IGT_EXIT_SKIP
> +	fi
>  	#ignore errors in intel-gtt, often built-in
>  	rmmod intel-gtt &> /dev/null
>  	# drm may be used by other devices (nouveau, radeon, udl, etc)
> -- 
> 2.1.4
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [i-g-t PATCH] tests: debug log lsmod on module unload failure
  2016-10-21 11:18 ` Petri Latvala
@ 2016-10-21 12:23   ` Jani Nikula
  0 siblings, 0 replies; 3+ messages in thread
From: Jani Nikula @ 2016-10-21 12:23 UTC (permalink / raw)
  To: Petri Latvala; +Cc: intel-gfx

On Fri, 21 Oct 2016, Petri Latvala <petri.latvala@intel.com> wrote:
> On Tue, Oct 18, 2016 at 10:07:04AM +0300, Jani Nikula wrote:
>> It's a bit verbose, but should only happen on errors. This should help
>> debug the snd_hda_intel unload issues.
>> 
>> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>> 
>> ---
>> 
>> UNTESTED!!!
>
> This sounds scary but LGTM.
>
> Reviewed-by: Petri Latvala <petri.latvala@intel.com>

Thanks, I gave this a bit of testing, and pushed.

BR,
Jani.

>
>
>> ---
>>  tests/drv_module_reload_basic | 12 ++++++++++--
>>  1 file changed, 10 insertions(+), 2 deletions(-)
>> 
>> diff --git a/tests/drv_module_reload_basic b/tests/drv_module_reload_basic
>> index a8d628dd96bd..b8cad88133e9 100755
>> --- a/tests/drv_module_reload_basic
>> +++ b/tests/drv_module_reload_basic
>> @@ -33,14 +33,22 @@ function reload() {
>>  	pkill alsactl
>>  	snd_hda_intel_unloaded=0
>>  	if mod_loaded snd_hda_intel; then
>> -		rmmod snd_hda_intel && snd_hda_intel_unloaded=1
>> +		if rmmod snd_hda_intel; then
>> +			snd_hda_intel_unloaded=1
>> +		else
>> +			lsmod >&2
>> +		fi
>>  	fi
>>  
>>  	# gen5 only
>>  	if mod_loaded intel_ips; then
>>  		rmmod intel_ips
>>  	fi
>> -	rmmod i915 || return $IGT_EXIT_SKIP
>> +
>> +	if ! rmmod i915; then
>> +		lsmod >&2
>> +		return $IGT_EXIT_SKIP
>> +	fi
>>  	#ignore errors in intel-gtt, often built-in
>>  	rmmod intel-gtt &> /dev/null
>>  	# drm may be used by other devices (nouveau, radeon, udl, etc)
>> -- 
>> 2.1.4
>> 
>> _______________________________________________
>> Intel-gfx mailing list
>> Intel-gfx@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2016-10-21 12:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-18  7:07 [i-g-t PATCH] tests: debug log lsmod on module unload failure Jani Nikula
2016-10-21 11:18 ` Petri Latvala
2016-10-21 12:23   ` Jani Nikula

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.