intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH i-g-t] tests/prime_mmap: Encapsulate check_for_dma_buf_mmap() in igt_fixture.
@ 2016-02-12 13:32 Marius Vlad
  2016-02-12 17:38 ` Tiago Vignatti
  2016-02-16 15:56 ` Daniel Vetter
  0 siblings, 2 replies; 4+ messages in thread
From: Marius Vlad @ 2016-02-12 13:32 UTC (permalink / raw)
  To: intel-gfx; +Cc: rob

This unbreaks distcheck target that in turn runs each test with --list-subtests.

Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
---
 tests/prime_mmap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/prime_mmap.c b/tests/prime_mmap.c
index 29a0cfd..1ea61c2 100644
--- a/tests/prime_mmap.c
+++ b/tests/prime_mmap.c
@@ -504,10 +504,10 @@ igt_main
 
 	igt_fixture {
 		fd = drm_open_driver(DRIVER_INTEL);
+		igt_skip_on((check_for_dma_buf_mmap() != 0));
 		errno = 0;
 	}
 
-	igt_skip_on((check_for_dma_buf_mmap() != 0));
 
 	for (i = 0; i < ARRAY_SIZE(tests); i++) {
 		igt_subtest(tests[i].name)
-- 
2.7.0

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

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

* Re: [PATCH i-g-t] tests/prime_mmap: Encapsulate check_for_dma_buf_mmap() in igt_fixture.
  2016-02-12 13:32 [PATCH i-g-t] tests/prime_mmap: Encapsulate check_for_dma_buf_mmap() in igt_fixture Marius Vlad
@ 2016-02-12 17:38 ` Tiago Vignatti
  2016-02-15  9:21   ` Marius Vlad
  2016-02-16 15:56 ` Daniel Vetter
  1 sibling, 1 reply; 4+ messages in thread
From: Tiago Vignatti @ 2016-02-12 17:38 UTC (permalink / raw)
  To: intel-gfx

I'm not sure this actually fix the root problem. With or without your 
patch applied, I'm seeing the following in lib/tests/test-suite.log:

../../tests/prime_mmap:
   Checking invalid option handling...
   Checking valid option handling...
   Checking subtest enumeration...
(prime_mmap:24023) ioctl-wrappers-CRITICAL: Test assertion failure 
function gem_create, file ../../lib/ioctl_wrappers.c:501:
(prime_mmap:24023) ioctl-wrappers-CRITICAL: Failed assertion: 
drmIoctl((fd), ((((2U|1U) << (((0+8)+8)+14)) | ((('d')) << (0+8)) | 
(((0x40 + 0x1b)) << 0) | ((((sizeof(struct drm_i915_gem_create)))) << 
((0+8)+8)))), (&create)) == 0
(prime_mmap:24023) ioctl-wrappers-CRITICAL: Last errno: 25, 
Inappropriate ioctl for device
(prime_mmap:24023) ioctl-wrappers-CRITICAL: error: -1 != 0
Test prime_mmap failed.
**** DEBUG ****
(prime_mmap:24023) ioctl-wrappers-CRITICAL: Test assertion failure 
function gem_create, file ../../lib/ioctl_wrappers.c:501:
(prime_mmap:24023) ioctl-wrappers-CRITICAL: Failed assertion: 
drmIoctl((fd), ((((2U|1U) << (((0+8)+8)+14)) | ((('d')) << (0+8)) | 
(((0x40 + 0x1b)) << 0) | ((((sizeof(struct drm_i915_gem_create)))) << 
((0+8)+8)))), (&create)) == 0
(prime_mmap:24023) ioctl-wrappers-CRITICAL: Last errno: 25, 
Inappropriate ioctl for device
(prime_mmap:24023) ioctl-wrappers-CRITICAL: error: -1 != 0
****  END  ****
prime_mmap: ../../lib/igt_core.c:1014: igt_fail: Assertion 
`!test_with_subtests || in_fixture' failed.
Received signal SIGABRT.
Aborted (core dumped)

Tiago

On 02/12/2016 11:32 AM, Marius Vlad wrote:
> This unbreaks distcheck target that in turn runs each test with --list-subtests.
>
> Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
> ---
>   tests/prime_mmap.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/prime_mmap.c b/tests/prime_mmap.c
> index 29a0cfd..1ea61c2 100644
> --- a/tests/prime_mmap.c
> +++ b/tests/prime_mmap.c
> @@ -504,10 +504,10 @@ igt_main
>
>   	igt_fixture {
>   		fd = drm_open_driver(DRIVER_INTEL);
> +		igt_skip_on((check_for_dma_buf_mmap() != 0));
>   		errno = 0;
>   	}
>
> -	igt_skip_on((check_for_dma_buf_mmap() != 0));
>
>   	for (i = 0; i < ARRAY_SIZE(tests); i++) {
>   		igt_subtest(tests[i].name)
>

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

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

* Re: [PATCH i-g-t] tests/prime_mmap: Encapsulate check_for_dma_buf_mmap() in igt_fixture.
  2016-02-12 17:38 ` Tiago Vignatti
@ 2016-02-15  9:21   ` Marius Vlad
  0 siblings, 0 replies; 4+ messages in thread
From: Marius Vlad @ 2016-02-15  9:21 UTC (permalink / raw)
  To: Tiago Vignatti; +Cc: intel-gfx


[-- Attachment #1.1: Type: text/plain, Size: 2746 bytes --]

Hi,

    I'm positive it does. Are you sure you've re-compiled? (check or
    distcheck targets do not re-compile the tests).


On Fri, Feb 12, 2016 at 03:38:27PM -0200, Tiago Vignatti wrote:
> I'm not sure this actually fix the root problem. With or without your patch
> applied, I'm seeing the following in lib/tests/test-suite.log:
> 
> ../../tests/prime_mmap:
>   Checking invalid option handling...
>   Checking valid option handling...
>   Checking subtest enumeration...
> (prime_mmap:24023) ioctl-wrappers-CRITICAL: Test assertion failure function
> gem_create, file ../../lib/ioctl_wrappers.c:501:
> (prime_mmap:24023) ioctl-wrappers-CRITICAL: Failed assertion: drmIoctl((fd),
> ((((2U|1U) << (((0+8)+8)+14)) | ((('d')) << (0+8)) | (((0x40 + 0x1b)) << 0)
> | ((((sizeof(struct drm_i915_gem_create)))) << ((0+8)+8)))), (&create)) == 0
> (prime_mmap:24023) ioctl-wrappers-CRITICAL: Last errno: 25, Inappropriate
> ioctl for device
> (prime_mmap:24023) ioctl-wrappers-CRITICAL: error: -1 != 0
> Test prime_mmap failed.
> **** DEBUG ****
> (prime_mmap:24023) ioctl-wrappers-CRITICAL: Test assertion failure function
> gem_create, file ../../lib/ioctl_wrappers.c:501:
> (prime_mmap:24023) ioctl-wrappers-CRITICAL: Failed assertion: drmIoctl((fd),
> ((((2U|1U) << (((0+8)+8)+14)) | ((('d')) << (0+8)) | (((0x40 + 0x1b)) << 0)
> | ((((sizeof(struct drm_i915_gem_create)))) << ((0+8)+8)))), (&create)) == 0
> (prime_mmap:24023) ioctl-wrappers-CRITICAL: Last errno: 25, Inappropriate
> ioctl for device
> (prime_mmap:24023) ioctl-wrappers-CRITICAL: error: -1 != 0
> ****  END  ****
> prime_mmap: ../../lib/igt_core.c:1014: igt_fail: Assertion
> `!test_with_subtests || in_fixture' failed.
> Received signal SIGABRT.
> Aborted (core dumped)
> 
> Tiago
> 
> On 02/12/2016 11:32 AM, Marius Vlad wrote:
> >This unbreaks distcheck target that in turn runs each test with --list-subtests.
> >
> >Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
> >---
> >  tests/prime_mmap.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> >diff --git a/tests/prime_mmap.c b/tests/prime_mmap.c
> >index 29a0cfd..1ea61c2 100644
> >--- a/tests/prime_mmap.c
> >+++ b/tests/prime_mmap.c
> >@@ -504,10 +504,10 @@ igt_main
> >
> >  	igt_fixture {
> >  		fd = drm_open_driver(DRIVER_INTEL);
> >+		igt_skip_on((check_for_dma_buf_mmap() != 0));
> >  		errno = 0;
> >  	}
> >
> >-	igt_skip_on((check_for_dma_buf_mmap() != 0));
> >
> >  	for (i = 0; i < ARRAY_SIZE(tests); i++) {
> >  		igt_subtest(tests[i].name)
> >
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

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

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

* Re: [PATCH i-g-t] tests/prime_mmap: Encapsulate check_for_dma_buf_mmap() in igt_fixture.
  2016-02-12 13:32 [PATCH i-g-t] tests/prime_mmap: Encapsulate check_for_dma_buf_mmap() in igt_fixture Marius Vlad
  2016-02-12 17:38 ` Tiago Vignatti
@ 2016-02-16 15:56 ` Daniel Vetter
  1 sibling, 0 replies; 4+ messages in thread
From: Daniel Vetter @ 2016-02-16 15:56 UTC (permalink / raw)
  To: Marius Vlad; +Cc: intel-gfx, rob

On Fri, Feb 12, 2016 at 03:32:30PM +0200, Marius Vlad wrote:
> This unbreaks distcheck target that in turn runs each test with --list-subtests.
> 
> Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
> ---
>  tests/prime_mmap.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/prime_mmap.c b/tests/prime_mmap.c
> index 29a0cfd..1ea61c2 100644
> --- a/tests/prime_mmap.c
> +++ b/tests/prime_mmap.c
> @@ -504,10 +504,10 @@ igt_main
>  
>  	igt_fixture {
>  		fd = drm_open_driver(DRIVER_INTEL);
> +		igt_skip_on((check_for_dma_buf_mmap() != 0));
>  		errno = 0;
>  	}
>  
> -	igt_skip_on((check_for_dma_buf_mmap() != 0));

Definitely need to put anythign that looks at the hw/driver into
igt_fixture.

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
>  
>  	for (i = 0; i < ARRAY_SIZE(tests); i++) {
>  		igt_subtest(tests[i].name)
> -- 
> 2.7.0
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2016-02-16 15:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-12 13:32 [PATCH i-g-t] tests/prime_mmap: Encapsulate check_for_dma_buf_mmap() in igt_fixture Marius Vlad
2016-02-12 17:38 ` Tiago Vignatti
2016-02-15  9:21   ` Marius Vlad
2016-02-16 15:56 ` Daniel Vetter

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