[igt-dev] [PATCH i-g-t] i915/gem_mmap: Modified offset in subtest "bad-size"

apoorva1.singh at intel.com apoorva1.singh at intel.com
Wed Sep 2 15:24:23 UTC 2020


From: Apoorva Singh <apoorva1.singh at intel.com>

Subtest "bad-size" should keep valid/good offset
corresponding to buffer object being mapped.
Currently, subtest will pass for any value of size
provided as the offset value itself will not allow
to map any size of memory which defies the purpose
of this subtest.

The subtest should not pass due to bad offset value
while it should pass only due to bad size provided.

Signed-off-by: Apoorva Singh <apoorva1.singh at intel.com>
Cc: Melkaveri, Arjun <arjun.melkaveri at intel.com>
Cc: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Priyanka Dandamudi <priyanka.dandamudi at intel.com>
---
 tests/i915/gem_mmap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/i915/gem_mmap.c b/tests/i915/gem_mmap.c
index f8cf052e..73ffac91 100644
--- a/tests/i915/gem_mmap.c
+++ b/tests/i915/gem_mmap.c
@@ -218,7 +218,7 @@ igt_main
 		for (int i = 0; i < ARRAY_SIZE(bad_size); i++) {
 			struct drm_i915_gem_mmap arg = {
 				.handle = gem_create(fd, 4096),
-				.offset = 4096,
+				.offset = 0,
 				.size = bad_size[i],
 			};
 
-- 
2.28.0



More information about the igt-dev mailing list