intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH i-g-t] igt/pm_rpm: Close local fd before trying to unload module
@ 2018-08-15  9:25 Chris Wilson
  2018-08-15 11:01 ` [igt-dev] " Imre Deak
  2018-08-17 17:29 ` Antonio Argenziano
  0 siblings, 2 replies; 6+ messages in thread
From: Chris Wilson @ 2018-08-15  9:25 UTC (permalink / raw)
  To: igt-dev; +Cc: intel-gfx

Fixes: d8e78990aa2b ("igt/pm_rpm: Test reaquisition of runtime-pm after module reload")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 tests/pm_rpm.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/pm_rpm.c b/tests/pm_rpm.c
index 65489bcdb..a4f9f783e 100644
--- a/tests/pm_rpm.c
+++ b/tests/pm_rpm.c
@@ -2034,6 +2034,8 @@ int main(int argc, char *argv[])
 		teardown_environment();
 
 	igt_subtest("module-reload") {
+		teardown_environment();
+
 		igt_debug("Reload w/o display\n");
 		igt_i915_driver_unload();
 		igt_assert_eq(igt_i915_driver_load("disable_display=1"), 0);
-- 
2.18.0

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

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

* Re: [igt-dev] [PATCH i-g-t] igt/pm_rpm: Close local fd before trying to unload module
  2018-08-15  9:25 [PATCH i-g-t] igt/pm_rpm: Close local fd before trying to unload module Chris Wilson
@ 2018-08-15 11:01 ` Imre Deak
  2018-08-15 11:04   ` Chris Wilson
  2018-08-17 17:29 ` Antonio Argenziano
  1 sibling, 1 reply; 6+ messages in thread
From: Imre Deak @ 2018-08-15 11:01 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev, intel-gfx

On Wed, Aug 15, 2018 at 10:25:11AM +0100, Chris Wilson wrote:
> Fixes: d8e78990aa2b ("igt/pm_rpm: Test reaquisition of runtime-pm after module reload")
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>  tests/pm_rpm.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/tests/pm_rpm.c b/tests/pm_rpm.c
> index 65489bcdb..a4f9f783e 100644
> --- a/tests/pm_rpm.c
> +++ b/tests/pm_rpm.c
> @@ -2034,6 +2034,8 @@ int main(int argc, char *argv[])
>  		teardown_environment();
>  
>  	igt_subtest("module-reload") {
> +		teardown_environment();
> +

Why isn't the teardown_environment(); under igt_fixture enough?

>  		igt_debug("Reload w/o display\n");
>  		igt_i915_driver_unload();
>  		igt_assert_eq(igt_i915_driver_load("disable_display=1"), 0);
> -- 
> 2.18.0
> 
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [igt-dev] [PATCH i-g-t] igt/pm_rpm: Close local fd before trying to unload module
  2018-08-15 11:01 ` [igt-dev] " Imre Deak
@ 2018-08-15 11:04   ` Chris Wilson
  0 siblings, 0 replies; 6+ messages in thread
From: Chris Wilson @ 2018-08-15 11:04 UTC (permalink / raw)
  To: Imre Deak; +Cc: igt-dev, intel-gfx

Quoting Imre Deak (2018-08-15 12:01:31)
> On Wed, Aug 15, 2018 at 10:25:11AM +0100, Chris Wilson wrote:
> > Fixes: d8e78990aa2b ("igt/pm_rpm: Test reaquisition of runtime-pm after module reload")
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > ---
> >  tests/pm_rpm.c | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/tests/pm_rpm.c b/tests/pm_rpm.c
> > index 65489bcdb..a4f9f783e 100644
> > --- a/tests/pm_rpm.c
> > +++ b/tests/pm_rpm.c
> > @@ -2034,6 +2034,8 @@ int main(int argc, char *argv[])
> >               teardown_environment();
> >  
> >       igt_subtest("module-reload") {
> > +             teardown_environment();
> > +
> 
> Why isn't the teardown_environment(); under igt_fixture enough?

Hmm, looks like I thought about it earlier. I guess we leak an fd...
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [igt-dev] [PATCH i-g-t] igt/pm_rpm: Close local fd before trying to unload module
  2018-08-15  9:25 [PATCH i-g-t] igt/pm_rpm: Close local fd before trying to unload module Chris Wilson
  2018-08-15 11:01 ` [igt-dev] " Imre Deak
@ 2018-08-17 17:29 ` Antonio Argenziano
  2018-08-17 17:49   ` Chris Wilson
  1 sibling, 1 reply; 6+ messages in thread
From: Antonio Argenziano @ 2018-08-17 17:29 UTC (permalink / raw)
  To: Chris Wilson, igt-dev; +Cc: intel-gfx



On 15/08/18 02:25, Chris Wilson wrote:
> Fixes: d8e78990aa2b ("igt/pm_rpm: Test reaquisition of runtime-pm after module reload")
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>   tests/pm_rpm.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/tests/pm_rpm.c b/tests/pm_rpm.c
> index 65489bcdb..a4f9f783e 100644
> --- a/tests/pm_rpm.c
> +++ b/tests/pm_rpm.c
> @@ -2034,6 +2034,8 @@ int main(int argc, char *argv[])
>   		teardown_environment();
>   
>   	igt_subtest("module-reload") {
> +		teardown_environment();

There is already a fixture with a call to 'teardown_environment()' 
surrounding this test, is it missing a couple of subtests groups?

Antonio

> +
>   		igt_debug("Reload w/o display\n");
>   		igt_i915_driver_unload();
>   		igt_assert_eq(igt_i915_driver_load("disable_display=1"), 0);
> 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [igt-dev] [PATCH i-g-t] igt/pm_rpm: Close local fd before trying to unload module
  2018-08-17 17:29 ` Antonio Argenziano
@ 2018-08-17 17:49   ` Chris Wilson
  2018-08-17 18:27     ` Antonio Argenziano
  0 siblings, 1 reply; 6+ messages in thread
From: Chris Wilson @ 2018-08-17 17:49 UTC (permalink / raw)
  To: Antonio Argenziano, igt-dev; +Cc: intel-gfx

Quoting Antonio Argenziano (2018-08-17 18:29:09)
> 
> 
> On 15/08/18 02:25, Chris Wilson wrote:
> > Fixes: d8e78990aa2b ("igt/pm_rpm: Test reaquisition of runtime-pm after module reload")
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > ---
> >   tests/pm_rpm.c | 2 ++
> >   1 file changed, 2 insertions(+)
> > 
> > diff --git a/tests/pm_rpm.c b/tests/pm_rpm.c
> > index 65489bcdb..a4f9f783e 100644
> > --- a/tests/pm_rpm.c
> > +++ b/tests/pm_rpm.c
> > @@ -2034,6 +2034,8 @@ int main(int argc, char *argv[])
> >               teardown_environment();
> >   
> >       igt_subtest("module-reload") {
> > +             teardown_environment();
> 
> There is already a fixture with a call to 'teardown_environment()' 
> surrounding this test, is it missing a couple of subtests groups?

It was intended for sequential execution (and I had forgotten that I had
purposely placed it after the teardown_environment -- the confusion was
caused by teardown_environment being incomplete). Adding a subtest group
for the preceding bunch would have the debatable consequence of module-
reload reporting a FAIL if something else caused a wakeref leak. My
opinion is to prefer SKIP for external artefacts so that it is clear when
a test failed of its own accord (and so be useful for debugging). It just
so happens that this test was to reproduce the trigger for the external
failures elsewhere and so detect the wakeref leak.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [igt-dev] [PATCH i-g-t] igt/pm_rpm: Close local fd before trying to unload module
  2018-08-17 17:49   ` Chris Wilson
@ 2018-08-17 18:27     ` Antonio Argenziano
  0 siblings, 0 replies; 6+ messages in thread
From: Antonio Argenziano @ 2018-08-17 18:27 UTC (permalink / raw)
  To: Chris Wilson, igt-dev; +Cc: intel-gfx



On 17/08/18 10:49, Chris Wilson wrote:
> Quoting Antonio Argenziano (2018-08-17 18:29:09)
>>
>>
>> On 15/08/18 02:25, Chris Wilson wrote:
>>> Fixes: d8e78990aa2b ("igt/pm_rpm: Test reaquisition of runtime-pm after module reload")
>>> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
>>> ---
>>>    tests/pm_rpm.c | 2 ++
>>>    1 file changed, 2 insertions(+)
>>>
>>> diff --git a/tests/pm_rpm.c b/tests/pm_rpm.c
>>> index 65489bcdb..a4f9f783e 100644
>>> --- a/tests/pm_rpm.c
>>> +++ b/tests/pm_rpm.c
>>> @@ -2034,6 +2034,8 @@ int main(int argc, char *argv[])
>>>                teardown_environment();
>>>    
>>>        igt_subtest("module-reload") {
>>> +             teardown_environment();
>>
>> There is already a fixture with a call to 'teardown_environment()'
>> surrounding this test, is it missing a couple of subtests groups?
> 
> It was intended for sequential execution (and I had forgotten that I had
> purposely placed it after the teardown_environment -- the confusion was
> caused by teardown_environment being incomplete). Adding a subtest group
> for the preceding bunch would have the debatable consequence of module-
> reload reporting a FAIL if something else caused a wakeref leak. My
> opinion is to prefer SKIP for external artefacts so that it is clear when
> a test failed of its own accord (and so be useful for debugging). It just
> so happens that this test was to reproduce the trigger for the external
> failures elsewhere and so detect the wakeref leak.

Agreed. Maybe a comment would help, your choice.

Reviewed-by: Antonio Argenziano <antonio.argenziano@intel.com>

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

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

end of thread, other threads:[~2018-08-17 18:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-15  9:25 [PATCH i-g-t] igt/pm_rpm: Close local fd before trying to unload module Chris Wilson
2018-08-15 11:01 ` [igt-dev] " Imre Deak
2018-08-15 11:04   ` Chris Wilson
2018-08-17 17:29 ` Antonio Argenziano
2018-08-17 17:49   ` Chris Wilson
2018-08-17 18:27     ` Antonio Argenziano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).