diff mbox

[i-g-t] tests/drm_module_reload: Don't require hda dynamic debug

Message ID 1500052463-30085-1-git-send-email-daniel.vetter@ffwll.ch (mailing list archive)
State New, archived
Headers show

Commit Message

Daniel Vetter July 14, 2017, 5:14 p.m. UTC
I can live without those logs, and it avoids a kernel
recompile&reboot.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 tests/drv_module_reload.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Dhinakaran Pandiyan July 14, 2017, 9:03 p.m. UTC | #1
On Fri, 2017-07-14 at 19:14 +0200, Daniel Vetter wrote:
> I can live without those logs, and it avoids a kernel

> recompile&reboot.

> 


Sounds reasonable, having hda dynamic debug does not feel like a
necessity for module_reload testing.
Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>



> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>

> ---

>  tests/drv_module_reload.c | 5 ++++-

>  1 file changed, 4 insertions(+), 1 deletion(-)

> 

> diff --git a/tests/drv_module_reload.c b/tests/drv_module_reload.c

> index db2ad2cf0f43..be831851dec2 100644

> --- a/tests/drv_module_reload.c

> +++ b/tests/drv_module_reload.c

> @@ -285,7 +285,10 @@ hda_dynamic_debug(bool enable)

>  	const char snd_hda_core_off[] = "module snd_hda_intel =_";

>  

>  	fp = fopen("/sys/kernel/debug/dynamic_debug/control", "w");

> -	igt_assert(fp != NULL);

> +	if (!fp) {

> +		igt_debug("hda dynamic debug not available\n");

> +		return;

> +	}

>  

>  	if (enable) {

>  		fwrite(snd_hda_intel_on, 1, sizeof(snd_hda_intel_on), fp);
Daniel Vetter July 14, 2017, 9:22 p.m. UTC | #2
On Fri, Jul 14, 2017 at 11:03 PM, Pandiyan, Dhinakaran
<dhinakaran.pandiyan@intel.com> wrote:
> On Fri, 2017-07-14 at 19:14 +0200, Daniel Vetter wrote:
>> I can live without those logs, and it avoids a kernel
>> recompile&reboot.
>>
>
> Sounds reasonable, having hda dynamic debug does not feel like a
> necessity for module_reload testing.
> Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>

Thanks for your review, pushed.
-Daniel
diff mbox

Patch

diff --git a/tests/drv_module_reload.c b/tests/drv_module_reload.c
index db2ad2cf0f43..be831851dec2 100644
--- a/tests/drv_module_reload.c
+++ b/tests/drv_module_reload.c
@@ -285,7 +285,10 @@  hda_dynamic_debug(bool enable)
 	const char snd_hda_core_off[] = "module snd_hda_intel =_";
 
 	fp = fopen("/sys/kernel/debug/dynamic_debug/control", "w");
-	igt_assert(fp != NULL);
+	if (!fp) {
+		igt_debug("hda dynamic debug not available\n");
+		return;
+	}
 
 	if (enable) {
 		fwrite(snd_hda_intel_on, 1, sizeof(snd_hda_intel_on), fp);