[Intel-gfx] [i-g-t PATCH v2] tests: do snd_hda_intel unbind before unload in module reload test

Yang, Libin libin.yang at intel.com
Tue Nov 1 01:45:28 UTC 2016


Reviewed-by: Libin Yang <libin.yang at intel.com>

Regards,
Libin


> -----Original Message-----
> From: Nikula, Jani
> Sent: Monday, October 31, 2016 7:00 PM
> To: Nikula, Jani <jani.nikula at intel.com>; intel-gfx at lists.freedesktop.org
> Cc: Zhang, Keqiao <keqiao.zhang at intel.com>; Yang, Libin
> <libin.yang at intel.com>
> Subject: [i-g-t PATCH v2] tests: do snd_hda_intel unbind before unload in
> module reload test
> 
> Try to make sure the snd_hda_intel module is not in use, and can be
> unloaded.
> 
> v2: unbind all cards (Libin)
> 
> Cc: Keqiao Zhang <keqiao.zhang at intel.com>
> Cc: Libin Yang <libin.yang at intel.com>
> Signed-off-by: Jani Nikula <jani.nikula at intel.com>
> 
> ---
> 
> Keqiao, Libin, here's the script this patch is against:
> 
> https://cgit.freedesktop.org/drm/igt-gpu-
> tools/tree/tests/drv_module_reload_basic
> ---
>  tests/drv_module_reload_basic | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/tests/drv_module_reload_basic b/tests/drv_module_reload_basic
> index b8cad88133e9..105852a56b46 100755
> --- a/tests/drv_module_reload_basic
> +++ b/tests/drv_module_reload_basic
> @@ -33,6 +33,11 @@ function reload() {
>  	pkill alsactl
>  	snd_hda_intel_unloaded=0
>  	if mod_loaded snd_hda_intel; then
> +		# unbind sound cards
> +		for card in $(find /sys/bus/pci/drivers/snd_hda_intel -name
> "0000:*" -printf "%f\n"); do
> +			echo $card >
> /sys/bus/pci/drivers/snd_hda_intel/unbind
> +		done
> +
>  		if rmmod snd_hda_intel; then
>  			snd_hda_intel_unloaded=1
>  		else
> --
> 2.1.4



More information about the Intel-gfx mailing list