From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by gabe.freedesktop.org (Postfix) with ESMTPS id 725246E1BB for ; Mon, 27 Jan 2020 17:02:05 +0000 (UTC) From: Ramalingam C Date: Mon, 27 Jan 2020 22:32:01 +0530 Message-Id: <20200127170205.7195-1-ramalingam.c@intel.com> MIME-Version: 1.0 Subject: [igt-dev] [PATCH i-g-t 1/5] tests/dumb_buffer: Remove page nonaligned buffer tests List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" To: igt-dev List-ID: 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 cc: Chris Wilson Reviewed-by: Chris Wilson --- tests/dumb_buffer.c | 52 --------------------------------------------- 1 file changed, 52 deletions(-) diff --git a/tests/dumb_buffer.c b/tests/dumb_buffer.c index 3d2dc9966d0b..b6fe6f5dc6ec 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) { @@ -362,12 +316,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); -- 2.20.1 _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev