Skip to contentSkip to conversation

tests/i915/gem_create: Modify the page nonaligned tests

PATCH In review Ramalingam C 3 participants 3 messages Jan 27, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests/i915/gem_create: Modify the page nonaligned tests

Considering that kernel returns the real memory size(page aligned) allocated, "create-invalid-nonaligned" test is not needed anymore. Hence removing them.

At "create-valid-nonaligned" test we are asserting the returned mem size from kernel to be minimum page aligned and checking the write into padded memory.

---
 tests/i915/gem_create.c | 30 +++---------------------------
 1 file changed, 3 insertions(+), 27 deletions(-)
tests/i915/gem_create.c +3 -27
index 8fc128dae6e2..0a0c4d5804a2 100644
@@ -120,9 +120,8 @@ static void invalid_size_test(int fd)
 }
 
 /*
- * Creating an object 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.
+ * Creating an object with non-aligned size request and assert the buffer is
+ * page aligned. And test the write into the padded extra memory.
  */
 static void valid_nonaligned_size(int fd)
 {
@@ -132,33 +131,13 @@ static void valid_nonaligned_size(int fd)
 	char buf[PAGE_SIZE];
 
 	igt_assert_eq(create_ioctl(fd, &create), 0);
+	igt_assert(create.size >= PAGE_SIZE);
 
 	gem_write(fd, create.handle, PAGE_SIZE / 2, buf, PAGE_SIZE / 2);
 
 	gem_close(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_i915_gem_create create = {
-		.size = PAGE_SIZE / 2,
-	};
-	char buf[PAGE_SIZE];
-
-	igt_assert_eq(create_ioctl(fd, &create), 0);
-
-	/* This should fail. Hence cannot use gem_write. */
-	igt_assert(__gem_write(fd, create.handle,
-			       PAGE_SIZE / 2, buf, PAGE_SIZE));
-
-	gem_close(fd, create.handle);
-}
-
 static uint64_t atomic_compare_swap_u64(_Atomic(uint64_t) *ptr,
 					uint64_t oldval, uint64_t newval)
 {
@@ -307,9 +286,6 @@ igt_main
 	igt_subtest("create-valid-nonaligned")
 		valid_nonaligned_size(fd);
 
-	igt_subtest("create-invalid-nonaligned")
-		invalid_nonaligned_size(fd);
-
 	igt_subtest("create-size-update")
 		size_update(fd);
 
Signature · 6 lines
2.20.1

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Reviewed-by on v1 1/1
#1 lore raw

Quoting Ramalingam C (2020-01-27 11:04:31)

Quoted 10 lines

Considering that kernel returns the real memory size(page aligned) allocated, "create-invalid-nonaligned" test is not needed anymore. Hence removing them.

At "create-valid-nonaligned" test we are asserting the returned mem size from kernel to be minimum page aligned and checking the write into padded memory.

-Chris
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#2 lore raw

[igt-dev] ✓ Fi.CI.BAT: success for tests/i915/gem_create: Modify the page nonaligned tests

In reply to Ramalingam C
== Series Details ==

== Series Details ==

Series: tests/i915/gem_create: Modify the page nonaligned tests
URL : https://patchwork.freedesktop.org/series/72614/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_7817 -> IGTPW_4003
====================================================

Summary
-------

**SUCCESS**

No regressions found.

External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4003/index.html

Known issues
------------

Here are the changes found in IGTPW_4003 that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@i915_module_load@reload-with-fault-injection:
- fi-icl-guc: [PASS][1] -> [DMESG-WARN][2] ([i915#109])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7817/fi-icl-guc/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4003/fi-icl-guc/igt@[email protected]
- fi-cfl-8700k: [PASS][3] -> [INCOMPLETE][4] ([i915#505])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7817/fi-cfl-8700k/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4003/fi-cfl-8700k/igt@[email protected]
- fi-skl-6600u: [PASS][5] -> [INCOMPLETE][6] ([i915#671] / [i915#69])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7817/fi-skl-6600u/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4003/fi-skl-6600u/igt@[email protected]

#### Possible fixes ####

* igt@gem_close_race@basic-threads:
- fi-hsw-peppy: [INCOMPLETE][7] -> [PASS][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7817/fi-hsw-peppy/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4003/fi-hsw-peppy/igt@[email protected]
- fi-byt-j1900: [INCOMPLETE][9] ([i915#45]) -> [PASS][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7817/fi-byt-j1900/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4003/fi-byt-j1900/igt@[email protected]

* igt@gem_exec_parallel@fds:
- fi-byt-n2820: [TIMEOUT][11] ([fdo#112271]) -> [PASS][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7817/fi-byt-n2820/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4003/fi-byt-n2820/igt@[email protected]

* igt@i915_selftest@live_blt:
- fi-hsw-4770: [DMESG-FAIL][13] ([i915#553] / [i915#725]) -> [PASS][14]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7817/fi-hsw-4770/igt@i915_selftest@live_blt.html
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4003/fi-hsw-4770/igt@i915_selftest@live_blt.html

[fdo#112271]: https://bugs.freedesktop.org/show_bug.cgi?id=112271
[i915#109]: https://gitlab.freedesktop.org/drm/intel/issues/109
[i915#45]: https://gitlab.freedesktop.org/drm/intel/issues/45
[i915#505]: https://gitlab.freedesktop.org/drm/intel/issues/505
[i915#553]: https://gitlab.freedesktop.org/drm/intel/issues/553
[i915#671]: https://gitlab.freedesktop.org/drm/intel/issues/671
[i915#69]: https://gitlab.freedesktop.org/drm/intel/issues/69
[i915#725]: https://gitlab.freedesktop.org/drm/intel/issues/725

Participating hosts (44 -> 45)
------------------------------

Additional (5): fi-kbl-7560u fi-bdw-gvtdvm fi-ilk-650 fi-skl-lmem fi-blb-e6850
Missing (4): fi-ctg-p8600 fi-byt-squawks fi-byt-clapper fi-bdw-samus

Build changes
-------------

* CI: CI-20190529 -> None
* IGT: IGT_5387 -> IGTPW_4003

CI-20190529: 20190529
CI_DRM_7817: dfddafaf7e0940549825bafa5ea0f274235b8e5d @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_4003: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4003/index.html
IGT_5387: 2e04a36cb5eba1a979bce80b58c35687f324f066 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Testlist changes ==

-igt@gem_create@create-invalid-nonaligned

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4003/index.html
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev