diff options
author | Ramalingam C <ramalingam.c@intel.com> | 2020-01-27 14:02:03 +0530 |
---|---|---|
committer | Ramalingam C <ramalingam.c@intel.com> | 2020-02-05 13:58:49 +0530 |
commit | 44913a91e77434b03001bb9ea53216cd03c476e6 (patch) | |
tree | 87fde1370ffc708506a17a1c6e07b118c8505900 /tests/dumb_buffer.c | |
parent | 13b4507005bfbc82cb39ab6506ca41f7e158d1b5 (diff) |
tests/dumb_buffer: Remove page nonaligned buffer tests
Considering that kernel returns the real memory size(page aligned)
allocated, nonaligned buffer tests are not valid anymore. Hence removing
them.
Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests/dumb_buffer.c')
-rw-r--r-- | tests/dumb_buffer.c | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/tests/dumb_buffer.c b/tests/dumb_buffer.c index c1e7b4d3..ad854c06 100644 --- a/tests/dumb_buffer.c +++ b/tests/dumb_buffer.c @@ -200,52 +200,6 @@ static void invalid_size_map(int fd) dumb_destroy(fd, create.handle); } -/* - * Creating an dumb buffer with non-aligned size and trying to access it with an - * offset, which is greater than the requested size but smaller than the - * object's last page boundary. pwrite here must be successful. - */ -static void valid_nonaligned_size(int fd) -{ - struct drm_mode_create_dumb create = { - .width = 24, - .height = 24, - .bpp = 32, - }; - char buf[PAGE_SIZE]; - - igt_require(is_i915_device(fd)); - - dumb_create(fd, &create); - - gem_write(fd, create.handle, PAGE_SIZE / 2, buf, PAGE_SIZE / 2); - - dumb_destroy(fd, create.handle); -} - -/* - * Creating an object with non-aligned size and trying to access it with an - * offset, which is greater than the requested size and larger than the - * object's last page boundary. pwrite here must fail. - */ -static void invalid_nonaligned_size(int fd) -{ - struct drm_mode_create_dumb create = { - .width = 24, - .height = 24, - .bpp = 32, - }; - char buf[PAGE_SIZE]; - - igt_require(is_i915_device(fd)); - - dumb_create(fd, &create); - /* This should fail. Hence cannot use gem_write. */ - igt_assert(__gem_write(fd, create.handle, - create.size - (PAGE_SIZE / 2), buf, PAGE_SIZE)); - dumb_destroy(fd, create.handle); -} - static uint64_t atomic_compare_swap_u64(_Atomic(uint64_t) *ptr, uint64_t oldval, uint64_t newval) { @@ -412,12 +366,6 @@ igt_main igt_subtest("create-valid-dumb") valid_dumb_creation_test(fd); - igt_subtest("create-valid-nonaligned") - valid_nonaligned_size(fd); - - igt_subtest("create-invalid-nonaligned") - invalid_nonaligned_size(fd); - igt_subtest("map-valid") valid_map(fd); |