intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH IGT] tests/chamelium: Close DRM file descriptor after tests
@ 2017-06-12 14:39 Paul Kocialkowski
  2017-06-12 15:21 ` Paul Kocialkowski
  0 siblings, 1 reply; 5+ messages in thread
From: Paul Kocialkowski @ 2017-06-12 14:39 UTC (permalink / raw)
  To: intel-gfx

This adds a call to close the DRM file descriptor. It is reauired as IGT
will attempt to become DRM master after running the test, resulting in a
failure.

Signed-off-by: Paul Kocialkowski <paul.kocialkowski@linux.intel.com>
---
 tests/chamelium.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tests/chamelium.c b/tests/chamelium.c
index acd17886..bd7772f8 100644
--- a/tests/chamelium.c
+++ b/tests/chamelium.c
@@ -749,4 +749,8 @@ igt_main
 		connector_subtest("vga-hpd-without-ddc", VGA)
 			test_hpd_without_ddc(&data, port);
 	}
+
+	igt_fixture {
+		close(data.drm_fd);
+	}
 }
-- 
2.13.1

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

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

* Re: [PATCH IGT] tests/chamelium: Close DRM file descriptor after tests
  2017-06-12 14:39 [PATCH IGT] tests/chamelium: Close DRM file descriptor after tests Paul Kocialkowski
@ 2017-06-12 15:21 ` Paul Kocialkowski
  2017-06-13 12:30   ` Arkadiusz Hiler
  2017-06-14  9:36   ` Chris Wilson
  0 siblings, 2 replies; 5+ messages in thread
From: Paul Kocialkowski @ 2017-06-12 15:21 UTC (permalink / raw)
  To: intel-gfx

On Mon, 2017-06-12 at 17:39 +0300, Paul Kocialkowski wrote:
> This adds a call to close the DRM file descriptor. It is reauired as IGT
> will attempt to become DRM master after running the test, resulting in a
> failure.

This should fix (at least) 3 of the failures seen on the CI machine that runs
chamelium tests.

> Signed-off-by: Paul Kocialkowski <paul.kocialkowski@linux.intel.com>
> ---
>  tests/chamelium.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/tests/chamelium.c b/tests/chamelium.c
> index acd17886..bd7772f8 100644
> --- a/tests/chamelium.c
> +++ b/tests/chamelium.c
> @@ -749,4 +749,8 @@ igt_main
>  		connector_subtest("vga-hpd-without-ddc", VGA)
>  			test_hpd_without_ddc(&data, port);
>  	}
> +
> +	igt_fixture {
> +		close(data.drm_fd);
> +	}
>  }
-- 
Paul Kocialkowski <paul.kocialkowski@linux.intel.com>
Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH IGT] tests/chamelium: Close DRM file descriptor after tests
  2017-06-12 15:21 ` Paul Kocialkowski
@ 2017-06-13 12:30   ` Arkadiusz Hiler
  2017-06-14  9:36   ` Chris Wilson
  1 sibling, 0 replies; 5+ messages in thread
From: Arkadiusz Hiler @ 2017-06-13 12:30 UTC (permalink / raw)
  To: Paul Kocialkowski; +Cc: intel-gfx

On Mon, Jun 12, 2017 at 06:21:45PM +0300, Paul Kocialkowski wrote:
> On Mon, 2017-06-12 at 17:39 +0300, Paul Kocialkowski wrote:
> > This adds a call to close the DRM file descriptor. It is reauired as IGT
> > will attempt to become DRM master after running the test, resulting in a
> > failure.
> 
> This should fix (at least) 3 of the failures seen on the CI machine that runs
> chamelium tests.

Hey Paul,

I've pushed the patch with

Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>

For future patches please adhere to instructions from CONTRIBUTING file:

  Please use --subject-prefix="PATCH i-g-t" so that i-g-t patches are easily
  identified in the massive amount mails on intel-gfx. To ensure this is always
  done, autogen.sh will run:

    git config format.subjectprefix "PATCH i-g-t"

  on its first invocation.

Otherwise patchwork won't pick up the series and it may slip through my
search filters.

Thanks!

-- 
Cheers,
Arek

> 
> > Signed-off-by: Paul Kocialkowski <paul.kocialkowski@linux.intel.com>
> > ---
> >  tests/chamelium.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> > 
> > diff --git a/tests/chamelium.c b/tests/chamelium.c
> > index acd17886..bd7772f8 100644
> > --- a/tests/chamelium.c
> > +++ b/tests/chamelium.c
> > @@ -749,4 +749,8 @@ igt_main
> >  		connector_subtest("vga-hpd-without-ddc", VGA)
> >  			test_hpd_without_ddc(&data, port);
> >  	}
> > +
> > +	igt_fixture {
> > +		close(data.drm_fd);
> > +	}
> >  }
> -- 
> Paul Kocialkowski <paul.kocialkowski@linux.intel.com>
> Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH IGT] tests/chamelium: Close DRM file descriptor after tests
  2017-06-12 15:21 ` Paul Kocialkowski
  2017-06-13 12:30   ` Arkadiusz Hiler
@ 2017-06-14  9:36   ` Chris Wilson
  2017-06-14  9:54     ` Paul Kocialkowski
  1 sibling, 1 reply; 5+ messages in thread
From: Chris Wilson @ 2017-06-14  9:36 UTC (permalink / raw)
  To: Paul Kocialkowski, intel-gfx

Quoting Paul Kocialkowski (2017-06-12 16:21:45)
> On Mon, 2017-06-12 at 17:39 +0300, Paul Kocialkowski wrote:
> > This adds a call to close the DRM file descriptor. It is reauired as IGT
> > will attempt to become DRM master after running the test, resulting in a
> > failure.
> 
> This should fix (at least) 3 of the failures seen on the CI machine that runs
> chamelium tests.

This would be papering over the bug in the atexit handlers if they
assume they can become drm master and worse cause a failure it they
don't. I was not aware that the core made that presumption, so more
details would be useful.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH IGT] tests/chamelium: Close DRM file descriptor after tests
  2017-06-14  9:36   ` Chris Wilson
@ 2017-06-14  9:54     ` Paul Kocialkowski
  0 siblings, 0 replies; 5+ messages in thread
From: Paul Kocialkowski @ 2017-06-14  9:54 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx

On Wed, 2017-06-14 at 10:36 +0100, Chris Wilson wrote:
> Quoting Paul Kocialkowski (2017-06-12 16:21:45)
> > On Mon, 2017-06-12 at 17:39 +0300, Paul Kocialkowski wrote:
> > > This adds a call to close the DRM file descriptor. It is reauired as IGT
> > > will attempt to become DRM master after running the test, resulting in a
> > > failure.
> > 
> > This should fix (at least) 3 of the failures seen on the CI machine that
> > runs
> > chamelium tests.
> 
> This would be papering over the bug in the atexit handlers if they
> assume they can become drm master and worse cause a failure it they
> don't. I was not aware that the core made that presumption, so more
> details would be useful.

Here is the log from running the dp-hpd-storm test:

IGT-Version: 1.19-geeeb304a (x86_64) (Linux: 4.12.0-rc4-ARCH+ x86_64)
Subtest dp-hpd-storm: SUCCESS (8.917s)
Test requirement not met in function require_connector_present, file
chamelium.c:99:
Test requirement: found
No port of type HDMI-A was found
Test requirement not met in function require_connector_present, file
chamelium.c:99:
Test requirement: found
No port of type VGA was found
Test requirement not met in function drm_open_driver_master, file drmtest.c:391:
Test requirement: drmSetMaster(fd) == 0
Can't become DRM master, please check if no other DRM client is running.
Last errno: 22, Invalid argument
chamelium: igt_core.c:955: igt_skip: Assertion `in_fixture' failed.
./chamelium.sh: line 3:  8566 Aborted                 (core dumped)
/usr/local/libexec/intel-gpu-tools/chamelium "$@"

Which is actually called by igt_hpd_storm_exit_handler in order to call
igt_hpd_storm_reset with the drm fd.

Thinking about it, I should have made it clear in the commit message that this
is very specific to the hpd storm feature testing.

-- 
Paul Kocialkowski <paul.kocialkowski@linux.intel.com>
Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2017-06-14  9:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-12 14:39 [PATCH IGT] tests/chamelium: Close DRM file descriptor after tests Paul Kocialkowski
2017-06-12 15:21 ` Paul Kocialkowski
2017-06-13 12:30   ` Arkadiusz Hiler
2017-06-14  9:36   ` Chris Wilson
2017-06-14  9:54     ` Paul Kocialkowski

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).