Message ID | 1500052463-30085-1-git-send-email-daniel.vetter@ffwll.ch (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
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);
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 --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);
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(-)