gem_bad_reloc: Don't flip-flop between SKIP and PASS
PATCH 1/1 gem_bad_reloc: Don't flip-flop between SKIP and PASS
Here is a cheap way for this test to give consistent results. This doesn't change the usefulness of this test, hopefully.
--- tests/gem_bad_reloc.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
tests/gem_bad_reloc.c +7 -1
@@ -87,7 +87,13 @@ static int negative_reloc(int fd, unsigned flags)gem_close (fd, gem_exec[1 ].handle);igt_info ("Found offset %ld for 4k batch\n" , (long )gem_exec[0 ].offset); -igt_require (gem_exec[0 ].offset <BIAS ); +/* +* Ideally we'd like to be able to control where the kernel is going to +* place the buffer. We don't SKIP here because it causes the test +* to "randomly" flip-flop between the SKIP and PASS states. +*/ +if (gem_exec[0 ].offset <BIAS ) +return 0 ;memset (gem_reloc,0 ,sizeof (gem_reloc));for (i =0 ; i <sizeof (gem_reloc)/sizeof (gem_reloc[0 ]); i++) {
Signature · 6 lines
1.8.3.1 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 4 lines · Damien Lespiau
Here is a cheap way for this test to give consistent results. This doesn't change the usefulness of this test, hopefully.
Signed-off-by Damien Lespiau <[email protected]>
And:
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85270
Signature · 5 lines
Damien _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 13 lines · Damien Lespiau
Here is a cheap way for this test to give consistent results. This doesn't change the usefulness of this test, hopefully.
Signed-off-by Damien Lespiau <[email protected]>--- tests/gem_bad_reloc.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)tests/gem_bad_reloc.c +0
-0
tests/gem_bad_reloc.c static int negative_reloc(int fd, unsigned flags) · line 94
Quoted 9 lines
tests/gem_bad_reloc.c +5
-1@@ -87,7 +87,13 @@ static int negative_reloc(int fd, unsigned flags)gem_close (fd, gem_exec[1 ].handle);igt_info ("Found offset %ld for 4k batch\n" , (long )gem_exec[0 ].offset); -igt_require (gem_exec[0 ].offset <BIAS ); +/* +* Ideally we'd like to be able to control where the kernel is going to +* place the buffer. We don't SKIP here because it causes the test +* to "randomly" flip-flop between the SKIP and PASS states. +*/
Riddle me thus: the test scripts try to ensure that every test run has the identical environment. Yet between runs we have different layouts of framebuffer objects...
To improve this test, what you could actually try is disabling all CRTCs. That should give consistent results.
-Chris
Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 28 lines · Chris Wilson
Quoted 13 lines · Damien Lespiau
Here is a cheap way for this test to give consistent results. This doesn't change the usefulness of this test, hopefully.
Signed-off-by Damien Lespiau <[email protected]>--- tests/gem_bad_reloc.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)tests/gem_bad_reloc.c +0
-0tests/gem_bad_reloc.c static int negative_reloc(int fd, unsigned flags) · line 94
Quoted 9 lines
tests/gem_bad_reloc.c +5
-1@@ -87,7 +87,13 @@ static int negative_reloc(int fd, unsigned flags)gem_close (fd, gem_exec[1 ].handle);igt_info ("Found offset %ld for 4k batch\n" , (long )gem_exec[0 ].offset); -igt_require (gem_exec[0 ].offset <BIAS ); +/* +* Ideally we'd like to be able to control where the kernel is going to +* place the buffer. We don't SKIP here because it causes the test +* to "randomly" flip-flop between the SKIP and PASS states. +*/ Riddle me thus: the test scripts try to ensure that every test run has the identical environment. Yet between runs we have different layouts of framebuffer objects...
Quoted 2 lines
To improve this test, what you could actually try is disabling all CRTCs. That should give consistent results.
I actually didn't manage to reproduce the erratic behaviour described in the bug. So maybe we've already fixed what caused the flip-flopping in the first place. Or maybe I can't reproduce it because I'm running in a clean environment wihout having run a few dozen kms tests beforehand.
In any case, I'd rather go for the quick option that doesn't make the worse in a too awful way and is won't regress (it's also less work, I'm lazy).
Signature · 5 lines
Damien _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx