Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH igt] igt/gem_softpin: Only expect EINVAL for color-overlaps for user objects
@ 2018-02-24 18:54 Chris Wilson
  2018-02-25 14:02 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Chris Wilson @ 2018-02-24 18:54 UTC (permalink / raw)
  To: intel-gfx; +Cc: igt-dev

If the specified object can not fit into the GTT due to overlap with a
neighbouring pinned object (not part of the execobjects[]), we expect to
fail with ENOSPC (as we cannot evict, rather than EINVAL for the user
error in a badly constructed execobjects[]). To prevent the tests
causing overlap with other external objects expand the test hole by a
page on either side.

(Setting up the system to deliberately hit ENOSPC is trickier as for
example it requires pinned an object into the scanout with enough free
space on either side to test.)

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 tests/gem_softpin.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/gem_softpin.c b/tests/gem_softpin.c
index 99388599..23f93623 100644
--- a/tests/gem_softpin.c
+++ b/tests/gem_softpin.c
@@ -302,11 +302,11 @@ static void test_evict_snoop(int fd)
 
 	/* Find a hole */
 	memset(object, 0, sizeof(object));
-	object[0].handle = gem_create(fd, 3*4096);
+	object[0].handle = gem_create(fd, 5*4096);
 	gem_write(fd, object[0].handle, 0, &bbe, sizeof(bbe));
 	gem_execbuf(fd, &execbuf);
 	gem_close(fd, object[0].handle);
-	hole = object[0].offset;
+	hole = object[0].offset + 4096;
 
 	/* Create a snoop + uncached pair */
 	object[0].handle = gem_create(fd, 4096);
-- 
2.16.1

_______________________________________________
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

end of thread, other threads:[~2018-02-26 21:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-24 18:54 [Intel-gfx] [PATCH igt] igt/gem_softpin: Only expect EINVAL for color-overlaps for user objects Chris Wilson
2018-02-25 14:02 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2018-02-25 15:20 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2018-02-26 20:54 ` [Intel-gfx] [PATCH igt] " Chris Wilson
2018-02-26 21:22   ` [igt-dev] " Ville Syrjälä
2018-02-26 21:27     ` Chris Wilson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox