diff mbox

[i-g-t] tests/pm_rpm: Don't compare edid blob IDs

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

Commit Message

Daniel Vetter Dec. 1, 2015, 4:37 p.m. UTC
The kernel is free to allocate blob ids however it wants to. And also
to reallocate them whenever it sees fit. The only thing we are allowed
to compare is the length and the actual date.

Removing this bogus check makes drm-resources-equal on my snb.

Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 tests/pm_rpm.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Daniel Vetter Dec. 1, 2015, 4:40 p.m. UTC | #1
On Tue, Dec 01, 2015 at 05:37:40PM +0100, Daniel Vetter wrote:
> The kernel is free to allocate blob ids however it wants to. And also
> to reallocate them whenever it sees fit. The only thing we are allowed
> to compare is the length and the actual date.
> 
> Removing this bogus check makes drm-resources-equal on my snb.
> 
> Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90546

Paulo, can you please ack? This seems to fail all over.
-Daniel

> ---
>  tests/pm_rpm.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/tests/pm_rpm.c b/tests/pm_rpm.c
> index 37aef96ed267..55fdb31cb723 100644
> --- a/tests/pm_rpm.c
> +++ b/tests/pm_rpm.c
> @@ -512,7 +512,6 @@ static void assert_drm_edids_equal(drmModePropertyBlobPtr e1,
>  		return;
>  	igt_assert(e1 && e2);
>  
> -	COMPARE(e1, e2, id);
>  	COMPARE(e1, e2, length);
>  
>  	igt_assert(memcmp(e1->data, e2->data, e1->length) == 0);
> -- 
> 2.1.0
>
Paulo Zanoni Dec. 1, 2015, 4:40 p.m. UTC | #2
2015-12-01 14:37 GMT-02:00 Daniel Vetter <daniel.vetter@ffwll.ch>:
> The kernel is free to allocate blob ids however it wants to. And also
> to reallocate them whenever it sees fit. The only thing we are allowed
> to compare is the length and the actual date.
>
> Removing this bogus check makes drm-resources-equal on my snb.

The main question here is: why did this work reliably before?

>
> Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> ---
>  tests/pm_rpm.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/tests/pm_rpm.c b/tests/pm_rpm.c
> index 37aef96ed267..55fdb31cb723 100644
> --- a/tests/pm_rpm.c
> +++ b/tests/pm_rpm.c
> @@ -512,7 +512,6 @@ static void assert_drm_edids_equal(drmModePropertyBlobPtr e1,
>                 return;
>         igt_assert(e1 && e2);
>
> -       COMPARE(e1, e2, id);
>         COMPARE(e1, e2, length);
>
>         igt_assert(memcmp(e1->data, e2->data, e1->length) == 0);
> --
> 2.1.0
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Daniel Vetter Dec. 1, 2015, 4:47 p.m. UTC | #3
On Tue, Dec 01, 2015 at 02:40:22PM -0200, Paulo Zanoni wrote:
> 2015-12-01 14:37 GMT-02:00 Daniel Vetter <daniel.vetter@ffwll.ch>:
> > The kernel is free to allocate blob ids however it wants to. And also
> > to reallocate them whenever it sees fit. The only thing we are allowed
> > to compare is the length and the actual date.
> >
> > Removing this bogus check makes drm-resources-equal on my snb.
> 
> The main question here is: why did this work reliably before?

Mostly luck - if you reprobe then there's a good chance that the kernel
will give you the same numbers again. But that was always just luck.

Now with atomic we use blob props a lot more, so chances for being lucky
went down drastically. At least that's my theory.
-Daniel

> 
> >
> > Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
> > Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> > ---
> >  tests/pm_rpm.c | 1 -
> >  1 file changed, 1 deletion(-)
> >
> > diff --git a/tests/pm_rpm.c b/tests/pm_rpm.c
> > index 37aef96ed267..55fdb31cb723 100644
> > --- a/tests/pm_rpm.c
> > +++ b/tests/pm_rpm.c
> > @@ -512,7 +512,6 @@ static void assert_drm_edids_equal(drmModePropertyBlobPtr e1,
> >                 return;
> >         igt_assert(e1 && e2);
> >
> > -       COMPARE(e1, e2, id);
> >         COMPARE(e1, e2, length);
> >
> >         igt_assert(memcmp(e1->data, e2->data, e1->length) == 0);
> > --
> > 2.1.0
> >
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/intel-gfx
> 
> 
> 
> -- 
> Paulo Zanoni
Paulo Zanoni Dec. 1, 2015, 4:54 p.m. UTC | #4
2015-12-01 14:47 GMT-02:00 Daniel Vetter <daniel@ffwll.ch>:
> On Tue, Dec 01, 2015 at 02:40:22PM -0200, Paulo Zanoni wrote:
>> 2015-12-01 14:37 GMT-02:00 Daniel Vetter <daniel.vetter@ffwll.ch>:
>> > The kernel is free to allocate blob ids however it wants to. And also
>> > to reallocate them whenever it sees fit. The only thing we are allowed
>> > to compare is the length and the actual date.
>> >
>> > Removing this bogus check makes drm-resources-equal on my snb.
>>
>> The main question here is: why did this work reliably before?
>
> Mostly luck - if you reprobe then there's a good chance that the kernel
> will give you the same numbers again. But that was always just luck.
>
> Now with atomic we use blob props a lot more, so chances for being lucky
> went down drastically. At least that's my theory.

Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>

> -Daniel
>
>>
>> >
>> > Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
>> > Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
>> > ---
>> >  tests/pm_rpm.c | 1 -
>> >  1 file changed, 1 deletion(-)
>> >
>> > diff --git a/tests/pm_rpm.c b/tests/pm_rpm.c
>> > index 37aef96ed267..55fdb31cb723 100644
>> > --- a/tests/pm_rpm.c
>> > +++ b/tests/pm_rpm.c
>> > @@ -512,7 +512,6 @@ static void assert_drm_edids_equal(drmModePropertyBlobPtr e1,
>> >                 return;
>> >         igt_assert(e1 && e2);
>> >
>> > -       COMPARE(e1, e2, id);
>> >         COMPARE(e1, e2, length);
>> >
>> >         igt_assert(memcmp(e1->data, e2->data, e1->length) == 0);
>> > --
>> > 2.1.0
>> >
>> > _______________________________________________
>> > Intel-gfx mailing list
>> > Intel-gfx@lists.freedesktop.org
>> > http://lists.freedesktop.org/mailman/listinfo/intel-gfx
>>
>>
>>
>> --
>> Paulo Zanoni
>
> --
> Daniel Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch
diff mbox

Patch

diff --git a/tests/pm_rpm.c b/tests/pm_rpm.c
index 37aef96ed267..55fdb31cb723 100644
--- a/tests/pm_rpm.c
+++ b/tests/pm_rpm.c
@@ -512,7 +512,6 @@  static void assert_drm_edids_equal(drmModePropertyBlobPtr e1,
 		return;
 	igt_assert(e1 && e2);
 
-	COMPARE(e1, e2, id);
 	COMPARE(e1, e2, length);
 
 	igt_assert(memcmp(e1->data, e2->data, e1->length) == 0);