All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH v3 0/8] Test cases for fbdev
@ 2020-11-10  7:50 Thomas Zimmermann
  2020-11-10  7:50 ` [igt-dev] [PATCH v3 1/8] tests/fbdev: Move existing tests into separate subgroups Thomas Zimmermann
                   ` (8 more replies)
  0 siblings, 9 replies; 22+ messages in thread
From: Thomas Zimmermann @ 2020-11-10  7:50 UTC (permalink / raw)
  To: daniel.vetter, chris, petri.latvala; +Cc: igt-dev, Thomas Zimmermann

This patchset adds read and write tests for fbdev. It compares the content
of the framebuffer and reference buffer. A number of the special cases
near the EOF are also tested.

Depending on the implementation (sys, cfb), fbdev read/write changes its
semantics. Together with a kernel patches [1] these test cases intend to
provide a reference.

v3:
	* put igt_describe() before the block it describes (Petri)
v2:
	* move tests into subtest groups
	* do setup in igt_fixtures (Daniel, Chris, Petri)
	* add additional tests for unaligned access and NULL-pointer
	  buffers (Daniel)

[1] https://patchwork.freedesktop.org/series/80038/

Thomas Zimmermann (8):
  tests/fbdev: Move existing tests into separate subgroups
  tests/fbdev: Map framebuffer in igt_fixture
  tests/fbdev: Add tests for read operations on framebuffer
  tests/fbdev: Add tests for unaligned reads on framebuffer memory
  tests/fbdev: Add tests for write operations on framebuffer
  tests/fbdev: Add tests for unaligned writes on framebuffer memory
  tests/fbdev: Add tests for accessing framebuffer near EOF
  tests/fbdev: Add tests for read/writing with NULL-pointer buffers

 tests/fbdev.c | 221 ++++++++++++++++++++++++++++++++++++++++++++++----
 1 file changed, 206 insertions(+), 15 deletions(-)

--
2.29.2

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [igt-dev] [PATCH v3 1/8] tests/fbdev: Move existing tests into separate subgroups
  2020-11-10  7:50 [igt-dev] [PATCH v3 0/8] Test cases for fbdev Thomas Zimmermann
@ 2020-11-10  7:50 ` Thomas Zimmermann
  2020-11-10  7:50 ` [igt-dev] [PATCH v3 2/8] tests/fbdev: Map framebuffer in igt_fixture Thomas Zimmermann
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 22+ messages in thread
From: Thomas Zimmermann @ 2020-11-10  7:50 UTC (permalink / raw)
  To: daniel.vetter, chris, petri.latvala; +Cc: igt-dev, Thomas Zimmermann

Move the existing tests into subgroups for testing modesetting and
accessing the framebuffer.

v3:
	* put igt_describe() before igt_subtest() and igt_subtest_group()
	  (Petri)

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
 tests/fbdev.c | 53 ++++++++++++++++++++++++++++++++++++++-------------
 1 file changed, 40 insertions(+), 13 deletions(-)

diff --git a/tests/fbdev.c b/tests/fbdev.c
index e5efeb93..46641fea 100644
--- a/tests/fbdev.c
+++ b/tests/fbdev.c
@@ -37,28 +37,17 @@
 
 #include "igt.h"
 
-igt_main
+static void mode_tests(int fd)
 {
 	struct fb_var_screeninfo var_info;
 	struct fb_fix_screeninfo fix_info;
-	int fd = -1;
 
-	/*
-	 * Should this test focus on the fbdev independent of any drm driver,
-	 * or should it look for fbdev of a particular device?
-	 */
 	igt_fixture {
-		fd = open("/dev/fb0", O_RDWR);
-		if (fd < 0) {
-			drm_load_module(DRIVER_ANY);
-			fd = open("/dev/fb0", O_RDWR);
-		}
-		igt_require_f(fd != -1, "/dev/fb0\n");
-
 		igt_require(ioctl(fd, FBIOGET_VSCREENINFO, &var_info) == 0);
 		igt_require(ioctl(fd, FBIOGET_FSCREENINFO, &fix_info) == 0);
 	}
 
+	igt_describe("Check if screeninfo is valid");
 	igt_subtest("info") {
 		unsigned long size;
 
@@ -69,7 +58,17 @@ igt_main
 			     fix_info.line_length,
 			     fix_info.smem_len);
 	}
+}
+
+static void framebuffer_tests(int fd)
+{
+	struct fb_fix_screeninfo fix_info;
 
+	igt_fixture {
+		igt_require(ioctl(fd, FBIOGET_FSCREENINFO, &fix_info) == 0);
+	}
+
+	igt_describe("Check mmap operations on framebuffer memory");
 	igt_subtest("mmap") {
 		void *map;
 
@@ -82,6 +81,34 @@ igt_main
 		memset(map, 0, fix_info.smem_len);
 		munmap(map, fix_info.smem_len);
 	}
+}
+
+igt_main
+{
+	int fd = -1;
+
+	/*
+	 * Should this test focus on the fbdev independent of any drm driver,
+	 * or should it look for fbdev of a particular device?
+	 */
+	igt_fixture {
+		fd = open("/dev/fb0", O_RDWR);
+		if (fd < 0) {
+			drm_load_module(DRIVER_ANY);
+			fd = open("/dev/fb0", O_RDWR);
+		}
+		igt_require_f(fd != -1, "/dev/fb0\n");
+	}
+
+	igt_describe("Check modesetting");
+	igt_subtest_group {
+		mode_tests(fd);
+	}
+
+	igt_describe("Check framebuffer access");
+	igt_subtest_group {
+		framebuffer_tests(fd);
+	}
 
 	igt_fixture {
 		close(fd);
-- 
2.29.2

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [igt-dev] [PATCH v3 2/8] tests/fbdev: Map framebuffer in igt_fixture
  2020-11-10  7:50 [igt-dev] [PATCH v3 0/8] Test cases for fbdev Thomas Zimmermann
  2020-11-10  7:50 ` [igt-dev] [PATCH v3 1/8] tests/fbdev: Move existing tests into separate subgroups Thomas Zimmermann
@ 2020-11-10  7:50 ` Thomas Zimmermann
  2020-11-11  9:49   ` Petri Latvala
  2020-11-10  7:50 ` [igt-dev] [PATCH v3 3/8] tests/fbdev: Add tests for read operations on framebuffer Thomas Zimmermann
                   ` (6 subsequent siblings)
  8 siblings, 1 reply; 22+ messages in thread
From: Thomas Zimmermann @ 2020-11-10  7:50 UTC (permalink / raw)
  To: daniel.vetter, chris, petri.latvala; +Cc: igt-dev, Thomas Zimmermann

The mapping of the framebuffer memory will be useful for read/write
tests. Move it into an igt_fixture block.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
 tests/fbdev.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/tests/fbdev.c b/tests/fbdev.c
index 46641fea..fc66210a 100644
--- a/tests/fbdev.c
+++ b/tests/fbdev.c
@@ -63,15 +63,10 @@ static void mode_tests(int fd)
 static void framebuffer_tests(int fd)
 {
 	struct fb_fix_screeninfo fix_info;
+	void *map;
 
 	igt_fixture {
 		igt_require(ioctl(fd, FBIOGET_FSCREENINFO, &fix_info) == 0);
-	}
-
-	igt_describe("Check mmap operations on framebuffer memory");
-	igt_subtest("mmap") {
-		void *map;
-
 		igt_require(fix_info.smem_len);
 
 		map = mmap(NULL, fix_info.smem_len,
@@ -79,6 +74,9 @@ static void framebuffer_tests(int fd)
 		igt_assert(map != MAP_FAILED);
 
 		memset(map, 0, fix_info.smem_len);
+	}
+
+	igt_fixture {
 		munmap(map, fix_info.smem_len);
 	}
 }
-- 
2.29.2

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [igt-dev] [PATCH v3 3/8] tests/fbdev: Add tests for read operations on framebuffer
  2020-11-10  7:50 [igt-dev] [PATCH v3 0/8] Test cases for fbdev Thomas Zimmermann
  2020-11-10  7:50 ` [igt-dev] [PATCH v3 1/8] tests/fbdev: Move existing tests into separate subgroups Thomas Zimmermann
  2020-11-10  7:50 ` [igt-dev] [PATCH v3 2/8] tests/fbdev: Map framebuffer in igt_fixture Thomas Zimmermann
@ 2020-11-10  7:50 ` Thomas Zimmermann
  2020-11-11  9:54   ` Petri Latvala
  2020-11-10  7:50 ` [igt-dev] [PATCH v3 4/8] tests/fbdev: Add tests for unaligned reads on framebuffer memory Thomas Zimmermann
                   ` (5 subsequent siblings)
  8 siblings, 1 reply; 22+ messages in thread
From: Thomas Zimmermann @ 2020-11-10  7:50 UTC (permalink / raw)
  To: daniel.vetter, chris, petri.latvala; +Cc: igt-dev, Thomas Zimmermann

The read tests check the read buffer against the content of the mapped
framebuffer.

v3:
	* put igt_describe() before igt_subtest() (Petri)

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
 tests/fbdev.c | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/tests/fbdev.c b/tests/fbdev.c
index fc66210a..97d66217 100644
--- a/tests/fbdev.c
+++ b/tests/fbdev.c
@@ -25,6 +25,7 @@
 
 #include "igt.h"
 
+#include <errno.h>
 #include <fcntl.h>
 #include <string.h>
 #include <sys/ioctl.h>
@@ -64,6 +65,7 @@ static void framebuffer_tests(int fd)
 {
 	struct fb_fix_screeninfo fix_info;
 	void *map;
+	void *buf;
 
 	igt_fixture {
 		igt_require(ioctl(fd, FBIOGET_FSCREENINFO, &fix_info) == 0);
@@ -73,10 +75,33 @@ static void framebuffer_tests(int fd)
 			   PROT_WRITE, MAP_SHARED, fd, 0);
 		igt_assert(map != MAP_FAILED);
 
+		buf = malloc(fix_info.smem_len);
+		igt_assert(buf);
+	}
+
+	igt_describe("Check read operations on framebuffer memory");
+	igt_subtest("read") {
+		ssize_t ret;
+		int cmp;
+
+		/* fill framebuffer with 0 and compare */
 		memset(map, 0, fix_info.smem_len);
+		ret = pread(fd, buf, fix_info.smem_len, 0);
+		igt_require_f(ret == (ssize_t)fix_info.smem_len, "pread failed, ret=%zd\n", ret);
+		cmp = memcmp(map, buf, fix_info.smem_len);
+		igt_require_f(!cmp, "read buffer differs from mapped framebuffer for 0\n");
+
+		/* fill framebuffer with 0x55 and compare */
+		memset(map, 0x55, fix_info.smem_len);
+		ret = pread(fd, buf, fix_info.smem_len, 0);
+		igt_require_f(ret == (ssize_t)fix_info.smem_len, "pread failed, ret=%zd\n", ret);
+		cmp = memcmp(map, buf, fix_info.smem_len);
+		igt_require_f(!cmp, "read buffer differs from mapped framebuffer for 0x55\n");
 	}
 
 	igt_fixture {
+		free(buf);
+		memset(map, 0, fix_info.smem_len); // don't leave garbage on the screen
 		munmap(map, fix_info.smem_len);
 	}
 }
-- 
2.29.2

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [igt-dev] [PATCH v3 4/8] tests/fbdev: Add tests for unaligned reads on framebuffer memory
  2020-11-10  7:50 [igt-dev] [PATCH v3 0/8] Test cases for fbdev Thomas Zimmermann
                   ` (2 preceding siblings ...)
  2020-11-10  7:50 ` [igt-dev] [PATCH v3 3/8] tests/fbdev: Add tests for read operations on framebuffer Thomas Zimmermann
@ 2020-11-10  7:50 ` Thomas Zimmermann
  2020-11-11  9:56   ` Petri Latvala
  2020-11-10  7:50 ` [igt-dev] [PATCH v3 5/8] tests/fbdev: Add tests for write operations on framebuffer Thomas Zimmermann
                   ` (4 subsequent siblings)
  8 siblings, 1 reply; 22+ messages in thread
From: Thomas Zimmermann @ 2020-11-10  7:50 UTC (permalink / raw)
  To: daniel.vetter, chris, petri.latvala; +Cc: igt-dev, Thomas Zimmermann

The tests for unaligned reads start and stop reading within pages.

v3:
	* put igt_describe() before igt_subtest() (Petri)

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
 tests/fbdev.c | 40 ++++++++++++++++++++++++++++++++++++++--
 1 file changed, 38 insertions(+), 2 deletions(-)

diff --git a/tests/fbdev.c b/tests/fbdev.c
index 97d66217..a6376c3b 100644
--- a/tests/fbdev.c
+++ b/tests/fbdev.c
@@ -64,10 +64,13 @@ static void mode_tests(int fd)
 static void framebuffer_tests(int fd)
 {
 	struct fb_fix_screeninfo fix_info;
-	void *map;
-	void *buf;
+	unsigned char *map;
+	unsigned char *buf;
+	size_t pagesize;
 
 	igt_fixture {
+		long ret;
+
 		igt_require(ioctl(fd, FBIOGET_FSCREENINFO, &fix_info) == 0);
 		igt_require(fix_info.smem_len);
 
@@ -77,6 +80,10 @@ static void framebuffer_tests(int fd)
 
 		buf = malloc(fix_info.smem_len);
 		igt_assert(buf);
+
+		ret = sysconf(_SC_PAGESIZE);
+		igt_assert(ret != -1);
+		pagesize = ret;
 	}
 
 	igt_describe("Check read operations on framebuffer memory");
@@ -99,6 +106,35 @@ static void framebuffer_tests(int fd)
 		igt_require_f(!cmp, "read buffer differs from mapped framebuffer for 0x55\n");
 	}
 
+	igt_describe("Check read operations on unaligned locations in framebuffer memory");
+	igt_subtest("unaligned-read") {
+		off_t off;
+		size_t len;
+		ssize_t ret;
+		const unsigned char *pos;
+
+		off = pagesize + (pagesize >> 2); // 1.25 * pagesize
+		len = (pagesize << 2) + (pagesize >> 1); // 4.5 * pagesize
+		igt_require_f((off + len) < fix_info.smem_len, "framebuffer too small\n");
+
+		/* read at unaligned location and compare */
+		memset(map, 0, fix_info.smem_len);
+		memset(&map[off], 0x55, len);
+		memset(buf, 0xff, fix_info.smem_len);
+		ret = pread(fd, &buf[off], len, off);
+		igt_require_f(ret == (ssize_t)len, "pread failed, ret=%zd\n", ret);
+		pos = memchr(buf, 0x55, fix_info.smem_len);
+		igt_require_f(pos, "0x55 not found within read buffer\n");
+		igt_require_f(pos == &buf[off], "0x55 found at pos %zu, expected %lld\n",
+			     pos - buf, (long long)off);
+		pos = memchr(&buf[off], 0xff, fix_info.smem_len - off);
+		igt_require_f(pos, "0xff not found within read buffer\n");
+		igt_require_f(pos == &buf[off + len], "0xff found at pos %zu, expected %lld\n",
+			     pos - buf, (long long)(off + len));
+		pos = memchr(&buf[off + len], 0x55, fix_info.smem_len - off + len);
+		igt_require_f(pos, "found 0x55 at pos %zu, none expected\n", pos - buf);
+	}
+
 	igt_fixture {
 		free(buf);
 		memset(map, 0, fix_info.smem_len); // don't leave garbage on the screen
-- 
2.29.2

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [igt-dev] [PATCH v3 5/8] tests/fbdev: Add tests for write operations on framebuffer
  2020-11-10  7:50 [igt-dev] [PATCH v3 0/8] Test cases for fbdev Thomas Zimmermann
                   ` (3 preceding siblings ...)
  2020-11-10  7:50 ` [igt-dev] [PATCH v3 4/8] tests/fbdev: Add tests for unaligned reads on framebuffer memory Thomas Zimmermann
@ 2020-11-10  7:50 ` Thomas Zimmermann
  2020-11-11 10:17   ` Petri Latvala
  2020-11-10  7:51 ` [igt-dev] [PATCH v3 6/8] tests/fbdev: Add tests for unaligned writes on framebuffer memory Thomas Zimmermann
                   ` (3 subsequent siblings)
  8 siblings, 1 reply; 22+ messages in thread
From: Thomas Zimmermann @ 2020-11-10  7:50 UTC (permalink / raw)
  To: daniel.vetter, chris, petri.latvala; +Cc: igt-dev, Thomas Zimmermann

The write tests check the written buffer against the content of the mapped
framebuffer.

v3:
	* put igt_describe() before igt_subtest() (Petri)

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
 tests/fbdev.c | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/tests/fbdev.c b/tests/fbdev.c
index a6376c3b..02abdede 100644
--- a/tests/fbdev.c
+++ b/tests/fbdev.c
@@ -135,6 +135,26 @@ static void framebuffer_tests(int fd)
 		igt_require_f(pos, "found 0x55 at pos %zu, none expected\n", pos - buf);
 	}
 
+	igt_describe("Check write operations on framebuffer memory");
+	igt_subtest("write") {
+		ssize_t ret;
+		int cmp;
+
+		/* write 0 to framebuffer and compare */
+		memset(buf, 0, fix_info.smem_len);
+		ret = pwrite(fd, buf, fix_info.smem_len, 0);
+		igt_require_f(ret == (ssize_t)fix_info.smem_len, "pwrite failed, ret=%zd\n", ret);
+		cmp = memcmp(map, buf, fix_info.smem_len);
+		igt_require_f(!cmp, "write buffer differs from mapped framebuffer for 0\n");
+
+		/* write 0x55 to framebuffer and compare */
+		memset(buf, 0x55, fix_info.smem_len);
+		ret = pwrite(fd, buf, fix_info.smem_len, 0);
+		igt_require_f(ret == (ssize_t)fix_info.smem_len, "pwrite failed, ret=%zd\n", ret);
+		cmp = memcmp(map, buf, fix_info.smem_len);
+		igt_require_f(!cmp, "write buffer differs from mapped framebuffer for 0\n");
+	}
+
 	igt_fixture {
 		free(buf);
 		memset(map, 0, fix_info.smem_len); // don't leave garbage on the screen
-- 
2.29.2

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [igt-dev] [PATCH v3 6/8] tests/fbdev: Add tests for unaligned writes on framebuffer memory
  2020-11-10  7:50 [igt-dev] [PATCH v3 0/8] Test cases for fbdev Thomas Zimmermann
                   ` (4 preceding siblings ...)
  2020-11-10  7:50 ` [igt-dev] [PATCH v3 5/8] tests/fbdev: Add tests for write operations on framebuffer Thomas Zimmermann
@ 2020-11-10  7:51 ` Thomas Zimmermann
  2020-11-11 10:18   ` Petri Latvala
  2020-11-10  7:51 ` [igt-dev] [PATCH v3 7/8] tests/fbdev: Add tests for accessing framebuffer near EOF Thomas Zimmermann
                   ` (2 subsequent siblings)
  8 siblings, 1 reply; 22+ messages in thread
From: Thomas Zimmermann @ 2020-11-10  7:51 UTC (permalink / raw)
  To: daniel.vetter, chris, petri.latvala; +Cc: igt-dev, Thomas Zimmermann

The tests for unaligned writes start and stop writing within pages.

v3:
	* put igt_describe() before igt_subtest() (Petri)

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
 tests/fbdev.c | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/tests/fbdev.c b/tests/fbdev.c
index 02abdede..522da8e2 100644
--- a/tests/fbdev.c
+++ b/tests/fbdev.c
@@ -155,6 +155,35 @@ static void framebuffer_tests(int fd)
 		igt_require_f(!cmp, "write buffer differs from mapped framebuffer for 0\n");
 	}
 
+	igt_describe("Check write operations on unaligned locations in framebuffer memory");
+	igt_subtest("unaligned-write") {
+		off_t off;
+		size_t len;
+		ssize_t ret;
+		const unsigned char *pos;
+
+		off = pagesize + (pagesize >> 2); // 1.25 * pagesize
+		len = (pagesize << 2) + (pagesize >> 1); // 4.5 * pagesize
+		igt_require_f((off + len) < fix_info.smem_len, "framebuffer too small\n");
+
+		/* read at unaligned location and compare */
+		memset(map, 0xff, fix_info.smem_len);
+		memset(buf, 0, fix_info.smem_len);
+		memset(&buf[off], 0x55, len);
+		ret = pwrite(fd, &buf[off], len, off);
+		igt_require_f(ret == (ssize_t)len, "pwrite failed, ret=%zd\n", ret);
+		pos = memchr(map, 0x55, fix_info.smem_len);
+		igt_require_f(pos, "0x55 not found within framebuffer\n");
+		igt_require_f(pos == &map[off], "0x55 found at pos %zu, expected %lld\n",
+			     pos - map, (long long)off);
+		pos = memchr(&map[off], 0xff, fix_info.smem_len - off);
+		igt_require_f(pos, "0xff not found within framebuffer\n");
+		igt_require_f(pos == &map[off + len], "0xff found at pos %zu, expected %lld\n",
+			     pos - map, (long long)(off + len));
+		pos = memchr(&map[off + len], 0x55, fix_info.smem_len - off + len);
+		igt_require_f(pos, "found 0x55 at pos %zu, none expected\n", pos - map);
+	}
+
 	igt_fixture {
 		free(buf);
 		memset(map, 0, fix_info.smem_len); // don't leave garbage on the screen
-- 
2.29.2

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [igt-dev] [PATCH v3 7/8] tests/fbdev: Add tests for accessing framebuffer near EOF
  2020-11-10  7:50 [igt-dev] [PATCH v3 0/8] Test cases for fbdev Thomas Zimmermann
                   ` (5 preceding siblings ...)
  2020-11-10  7:51 ` [igt-dev] [PATCH v3 6/8] tests/fbdev: Add tests for unaligned writes on framebuffer memory Thomas Zimmermann
@ 2020-11-10  7:51 ` Thomas Zimmermann
  2020-11-11 10:19   ` Petri Latvala
  2020-11-10  7:51 ` [igt-dev] [PATCH v3 8/8] tests/fbdev: Add tests for read/writing with NULL-pointer buffers Thomas Zimmermann
  2020-11-10 15:45 ` [igt-dev] ✗ Fi.CI.BAT: failure for Test cases for fbdev Patchwork
  8 siblings, 1 reply; 22+ messages in thread
From: Thomas Zimmermann @ 2020-11-10  7:51 UTC (permalink / raw)
  To: daniel.vetter, chris, petri.latvala; +Cc: igt-dev, Thomas Zimmermann

Fbdev has some specific behavior when reading/writing near the EOF, which
the eof test checks. If at least one bytes has been written, the number
of bytes has to be returned, otherwise an error code (if any) has to be
returned, or otherwise 0 has to returned. Not all drivers get this right.

v3:
	* put igt_describe() before igt_subtest() (Petri)

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
 tests/fbdev.c | 47 ++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 46 insertions(+), 1 deletion(-)

diff --git a/tests/fbdev.c b/tests/fbdev.c
index 522da8e2..8fd920be 100644
--- a/tests/fbdev.c
+++ b/tests/fbdev.c
@@ -78,7 +78,8 @@ static void framebuffer_tests(int fd)
 			   PROT_WRITE, MAP_SHARED, fd, 0);
 		igt_assert(map != MAP_FAILED);
 
-		buf = malloc(fix_info.smem_len);
+		/* allocate two additional bytes for eof test */
+		buf = malloc(fix_info.smem_len + 2);
 		igt_assert(buf);
 
 		ret = sysconf(_SC_PAGESIZE);
@@ -184,6 +185,50 @@ static void framebuffer_tests(int fd)
 		igt_require_f(pos, "found 0x55 at pos %zu, none expected\n", pos - map);
 	}
 
+	igt_describe("Check framebuffer access near EOF");
+	igt_subtest("eof") {
+		unsigned long lastindex = fix_info.smem_len - 1;
+		unsigned char *maplast = &((unsigned char *)map)[lastindex];
+		unsigned char *buflast = &((unsigned char *)buf)[lastindex];
+		ssize_t ret;
+
+		*buflast = 0x55;
+
+		/* write across EOF; set remaining bytes */
+		ret = pwrite(fd, buflast, 2, lastindex);
+		igt_require_f(ret == 1, "write crossed EOF, ret=%zd\n", ret);
+		igt_require_f(*maplast == *buflast, "write buffer differs from mapped framebuffer at final byte, "
+		                                    "maplast=%u buflast=%u\n", *maplast, *buflast);
+
+		/* write at EOF; get ENOSPC */
+		ret = pwrite(fd, &buflast[1], 1, lastindex + 1);
+		igt_require_f((ret == -1) && (errno == ENOSPC), "write at EOF, ret=%zd\n", ret);
+
+		*maplast = 0;
+
+		/* write final byte */
+		ret = pwrite(fd, buflast, 1, lastindex);
+		igt_require_f(ret == 1, "write before EOF, ret=%zd\n", ret);
+		igt_require_f(*maplast == *buflast, "write buffer differs from mapped framebuffer at final byte, "
+		                                    "maplast=%u buflast=%u\n", *maplast, *buflast);
+
+		/* write after EOF; get EFBIG */
+		ret = pwrite(fd, &buflast[2], 1, lastindex + 2);
+		igt_require_f((ret == -1) && (errno == EFBIG), "write after EOF, ret=%zd\n", ret);
+
+		*maplast = 0;
+
+		/* read across the EOF; get remaining bytes */
+		ret = pread(fd, buflast, 2, lastindex);
+		igt_require_f(ret == 1, "read before EOF, ret=%zd\n", ret);
+		igt_require_f(*maplast == *buflast, "read buffer differs from mapped framebuffer at final byte, "
+		                                    "maplast=%u buflast=%u\n", *maplast, *buflast);
+
+		/* read after EOF; get 0 */
+		ret = pread(fd, &buflast[1], 1, lastindex + 1);
+		igt_require_f(ret == 0, "read at EOF, ret=%zd\n", ret);
+	}
+
 	igt_fixture {
 		free(buf);
 		memset(map, 0, fix_info.smem_len); // don't leave garbage on the screen
-- 
2.29.2

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [igt-dev] [PATCH v3 8/8] tests/fbdev: Add tests for read/writing with NULL-pointer buffers
  2020-11-10  7:50 [igt-dev] [PATCH v3 0/8] Test cases for fbdev Thomas Zimmermann
                   ` (6 preceding siblings ...)
  2020-11-10  7:51 ` [igt-dev] [PATCH v3 7/8] tests/fbdev: Add tests for accessing framebuffer near EOF Thomas Zimmermann
@ 2020-11-10  7:51 ` Thomas Zimmermann
  2020-11-11 10:20   ` Petri Latvala
  2020-11-10 15:45 ` [igt-dev] ✗ Fi.CI.BAT: failure for Test cases for fbdev Patchwork
  8 siblings, 1 reply; 22+ messages in thread
From: Thomas Zimmermann @ 2020-11-10  7:51 UTC (permalink / raw)
  To: daniel.vetter, chris, petri.latvala; +Cc: igt-dev, Thomas Zimmermann

Trying to read and write with a NULL-pointer buffer should fail and
report EFAULT.

v3:
	* put igt_describe() before igt_subtest() (Petri)

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
 tests/fbdev.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/tests/fbdev.c b/tests/fbdev.c
index 8fd920be..814188b5 100644
--- a/tests/fbdev.c
+++ b/tests/fbdev.c
@@ -229,6 +229,17 @@ static void framebuffer_tests(int fd)
 		igt_require_f(ret == 0, "read at EOF, ret=%zd\n", ret);
 	}
 
+	igt_describe("Check framebuffer access with NULL");
+	igt_subtest("nullptr") {
+		ssize_t ret;
+
+		ret = pread(fd, NULL, fix_info.smem_len, 0);
+		igt_require_f((ret == -1) && (errno == EFAULT), "reading into NULL did not return EFAULT, ret=%zd\n", ret);
+
+		ret = pwrite(fd, NULL, fix_info.smem_len, 0);
+		igt_require_f((ret == -1) && (errno == EFAULT), "writing from NULL did not return EFAULT, ret=%zd\n", ret);
+	}
+
 	igt_fixture {
 		free(buf);
 		memset(map, 0, fix_info.smem_len); // don't leave garbage on the screen
-- 
2.29.2

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [igt-dev] ✗ Fi.CI.BAT: failure for Test cases for fbdev
  2020-11-10  7:50 [igt-dev] [PATCH v3 0/8] Test cases for fbdev Thomas Zimmermann
                   ` (7 preceding siblings ...)
  2020-11-10  7:51 ` [igt-dev] [PATCH v3 8/8] tests/fbdev: Add tests for read/writing with NULL-pointer buffers Thomas Zimmermann
@ 2020-11-10 15:45 ` Patchwork
  2020-11-11  9:11   ` Thomas Zimmermann
  8 siblings, 1 reply; 22+ messages in thread
From: Patchwork @ 2020-11-10 15:45 UTC (permalink / raw)
  To: Thomas Zimmermann; +Cc: igt-dev


[-- Attachment #1.1: Type: text/plain, Size: 13526 bytes --]

== Series Details ==

Series: Test cases for fbdev
URL   : https://patchwork.freedesktop.org/series/83677/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_9301 -> IGTPW_5153
====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with IGTPW_5153 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in IGTPW_5153, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

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

Possible new issues
-------------------

  Here are the unknown changes that may have been introduced in IGTPW_5153:

### IGT changes ###

#### Possible regressions ####

  * igt@fbdev@mmap:
    - fi-tgl-u2:          [PASS][1] -> [SKIP][2]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-tgl-u2/igt@fbdev@mmap.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-tgl-u2/igt@fbdev@mmap.html
    - fi-tgl-y:           NOTRUN -> [SKIP][3]
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-tgl-y/igt@fbdev@mmap.html
    - fi-cml-s:           [PASS][4] -> [SKIP][5]
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-cml-s/igt@fbdev@mmap.html
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-cml-s/igt@fbdev@mmap.html
    - fi-icl-y:           [PASS][6] -> [SKIP][7]
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-icl-y/igt@fbdev@mmap.html
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-icl-y/igt@fbdev@mmap.html
    - fi-icl-u2:          [PASS][8] -> [SKIP][9]
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-icl-u2/igt@fbdev@mmap.html
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-icl-u2/igt@fbdev@mmap.html
    - fi-cml-u2:          [PASS][10] -> [SKIP][11]
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-cml-u2/igt@fbdev@mmap.html
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-cml-u2/igt@fbdev@mmap.html

  
#### Suppressed ####

  The following results come from untrusted machines, tests, or statuses.
  They do not affect the overall result.

  * igt@fbdev@mmap:
    - {fi-ehl-1}:         [PASS][12] -> [SKIP][13]
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-ehl-1/igt@fbdev@mmap.html
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-ehl-1/igt@fbdev@mmap.html
    - {fi-tgl-dsi}:       [PASS][14] -> [SKIP][15]
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-tgl-dsi/igt@fbdev@mmap.html
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-tgl-dsi/igt@fbdev@mmap.html

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

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

### IGT changes ###

#### Issues hit ####

  * igt@fbdev@mmap:
    - fi-skl-lmem:        [PASS][16] -> [SKIP][17] ([fdo#109271])
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-skl-lmem/igt@fbdev@mmap.html
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-skl-lmem/igt@fbdev@mmap.html
    - fi-ivb-3770:        [PASS][18] -> [SKIP][19] ([fdo#109271])
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-ivb-3770/igt@fbdev@mmap.html
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-ivb-3770/igt@fbdev@mmap.html
    - fi-ilk-650:         [PASS][20] -> [SKIP][21] ([fdo#109271])
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-ilk-650/igt@fbdev@mmap.html
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-ilk-650/igt@fbdev@mmap.html
    - fi-bsw-n3050:       [PASS][22] -> [SKIP][23] ([fdo#109271])
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-bsw-n3050/igt@fbdev@mmap.html
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-bsw-n3050/igt@fbdev@mmap.html
    - fi-cfl-guc:         [PASS][24] -> [SKIP][25] ([fdo#109271])
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-cfl-guc/igt@fbdev@mmap.html
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-cfl-guc/igt@fbdev@mmap.html
    - fi-snb-2600:        [PASS][26] -> [SKIP][27] ([fdo#109271])
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-snb-2600/igt@fbdev@mmap.html
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-snb-2600/igt@fbdev@mmap.html
    - fi-kbl-x1275:       [PASS][28] -> [SKIP][29] ([fdo#109271])
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-kbl-x1275/igt@fbdev@mmap.html
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-kbl-x1275/igt@fbdev@mmap.html
    - fi-kbl-soraka:      [PASS][30] -> [SKIP][31] ([fdo#109271])
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-kbl-soraka/igt@fbdev@mmap.html
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-kbl-soraka/igt@fbdev@mmap.html
    - fi-glk-dsi:         [PASS][32] -> [SKIP][33] ([fdo#109271])
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-glk-dsi/igt@fbdev@mmap.html
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-glk-dsi/igt@fbdev@mmap.html
    - fi-bsw-kefka:       [PASS][34] -> [SKIP][35] ([fdo#109271])
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-bsw-kefka/igt@fbdev@mmap.html
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-bsw-kefka/igt@fbdev@mmap.html
    - fi-kbl-r:           [PASS][36] -> [SKIP][37] ([fdo#109271])
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-kbl-r/igt@fbdev@mmap.html
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-kbl-r/igt@fbdev@mmap.html
    - fi-kbl-8809g:       [PASS][38] -> [SKIP][39] ([fdo#109271])
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-kbl-8809g/igt@fbdev@mmap.html
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-kbl-8809g/igt@fbdev@mmap.html
    - fi-blb-e6850:       [PASS][40] -> [SKIP][41] ([fdo#109271])
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-blb-e6850/igt@fbdev@mmap.html
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-blb-e6850/igt@fbdev@mmap.html
    - fi-kbl-7500u:       [PASS][42] -> [SKIP][43] ([fdo#109271])
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-kbl-7500u/igt@fbdev@mmap.html
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-kbl-7500u/igt@fbdev@mmap.html
    - fi-cfl-8109u:       [PASS][44] -> [SKIP][45] ([fdo#109271])
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-cfl-8109u/igt@fbdev@mmap.html
   [45]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-cfl-8109u/igt@fbdev@mmap.html
    - fi-gdg-551:         [PASS][46] -> [SKIP][47] ([fdo#109271])
   [46]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-gdg-551/igt@fbdev@mmap.html
   [47]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-gdg-551/igt@fbdev@mmap.html
    - fi-bwr-2160:        [PASS][48] -> [SKIP][49] ([fdo#109271])
   [48]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-bwr-2160/igt@fbdev@mmap.html
   [49]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-bwr-2160/igt@fbdev@mmap.html
    - fi-skl-guc:         [PASS][50] -> [SKIP][51] ([fdo#109271])
   [50]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-skl-guc/igt@fbdev@mmap.html
   [51]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-skl-guc/igt@fbdev@mmap.html
    - fi-skl-6600u:       [PASS][52] -> [SKIP][53] ([fdo#109271])
   [52]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-skl-6600u/igt@fbdev@mmap.html
   [53]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-skl-6600u/igt@fbdev@mmap.html
    - fi-pnv-d510:        [PASS][54] -> [SKIP][55] ([fdo#109271])
   [54]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-pnv-d510/igt@fbdev@mmap.html
   [55]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-pnv-d510/igt@fbdev@mmap.html
    - fi-bdw-5557u:       [PASS][56] -> [SKIP][57] ([fdo#109271])
   [56]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-bdw-5557u/igt@fbdev@mmap.html
   [57]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-bdw-5557u/igt@fbdev@mmap.html
    - fi-snb-2520m:       [PASS][58] -> [SKIP][59] ([fdo#109271])
   [58]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-snb-2520m/igt@fbdev@mmap.html
   [59]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-snb-2520m/igt@fbdev@mmap.html
    - fi-apl-guc:         [PASS][60] -> [SKIP][61] ([fdo#109271] / [i915#1635])
   [60]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-apl-guc/igt@fbdev@mmap.html
   [61]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-apl-guc/igt@fbdev@mmap.html
    - fi-hsw-4770:        [PASS][62] -> [SKIP][63] ([fdo#109271])
   [62]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-hsw-4770/igt@fbdev@mmap.html
   [63]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-hsw-4770/igt@fbdev@mmap.html
    - fi-cfl-8700k:       [PASS][64] -> [SKIP][65] ([fdo#109271])
   [64]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-cfl-8700k/igt@fbdev@mmap.html
   [65]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-cfl-8700k/igt@fbdev@mmap.html
    - fi-bxt-dsi:         [PASS][66] -> [SKIP][67] ([fdo#109271] / [i915#1635])
   [66]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-bxt-dsi/igt@fbdev@mmap.html
   [67]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-bxt-dsi/igt@fbdev@mmap.html
    - fi-skl-6700k2:      [PASS][68] -> [SKIP][69] ([fdo#109271])
   [68]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-skl-6700k2/igt@fbdev@mmap.html
   [69]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-skl-6700k2/igt@fbdev@mmap.html
    - fi-elk-e7500:       [PASS][70] -> [SKIP][71] ([fdo#109271])
   [70]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-elk-e7500/igt@fbdev@mmap.html
   [71]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-elk-e7500/igt@fbdev@mmap.html
    - fi-byt-j1900:       [PASS][72] -> [SKIP][73] ([fdo#109271])
   [72]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-byt-j1900/igt@fbdev@mmap.html
   [73]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-byt-j1900/igt@fbdev@mmap.html

  * igt@i915_module_load@reload:
    - fi-tgl-u2:          [PASS][74] -> [DMESG-WARN][75] ([i915#1982] / [k.org#205379])
   [74]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-tgl-u2/igt@i915_module_load@reload.html
   [75]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-tgl-u2/igt@i915_module_load@reload.html

  * igt@kms_busy@basic@flip:
    - fi-kbl-soraka:      [PASS][76] -> [DMESG-WARN][77] ([i915#1982])
   [76]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-kbl-soraka/igt@kms_busy@basic@flip.html
   [77]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-kbl-soraka/igt@kms_busy@basic@flip.html

  * igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy:
    - fi-icl-u2:          [PASS][78] -> [DMESG-WARN][79] ([i915#1982]) +2 similar issues
   [78]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-icl-u2/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy.html
   [79]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-icl-u2/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy.html

  
#### Possible fixes ####

  * igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic:
    - fi-bsw-kefka:       [DMESG-WARN][80] ([i915#1982]) -> [PASS][81]
   [80]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-bsw-kefka/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic.html
   [81]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-bsw-kefka/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic.html
    - fi-apl-guc:         [DMESG-WARN][82] ([i915#1635] / [i915#1982]) -> [PASS][83]
   [82]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-apl-guc/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic.html
   [83]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-apl-guc/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic.html

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [i915#1635]: https://gitlab.freedesktop.org/drm/intel/issues/1635
  [i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
  [i915#2411]: https://gitlab.freedesktop.org/drm/intel/issues/2411
  [k.org#205379]: https://bugzilla.kernel.org/show_bug.cgi?id=205379


Participating hosts (46 -> 42)
------------------------------

  Additional (1): fi-tgl-y 
  Missing    (5): fi-ilk-m540 fi-hsw-4200u fi-bsw-cyan fi-ctg-p8600 fi-bdw-samus 


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

  * CI: CI-20190529 -> None
  * IGT: IGT_5839 -> IGTPW_5153

  CI-20190529: 20190529
  CI_DRM_9301: 886b2b2d05ec4cb1b21cf7a311f186b5df1b78c5 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_5153: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/index.html
  IGT_5839: 2dbd64a6301e36eb432bc50ad7021fabaeebd1f4 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools



== Testlist changes ==

+igt@fbdev@eof
+igt@fbdev@nullptr
+igt@fbdev@read
+igt@fbdev@unaligned-read
+igt@fbdev@unaligned-write
+igt@fbdev@write
-igt@fbdev@mmap

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/index.html

[-- Attachment #1.2: Type: text/html, Size: 16996 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [igt-dev] ✗ Fi.CI.BAT: failure for Test cases for fbdev
  2020-11-10 15:45 ` [igt-dev] ✗ Fi.CI.BAT: failure for Test cases for fbdev Patchwork
@ 2020-11-11  9:11   ` Thomas Zimmermann
  2020-11-11 10:22     ` Petri Latvala
  0 siblings, 1 reply; 22+ messages in thread
From: Thomas Zimmermann @ 2020-11-11  9:11 UTC (permalink / raw)
  To: igt-dev

Hi

Am 10.11.20 um 16:45 schrieb Patchwork:
> *Patch Details*
> *Series:*	Test cases for fbdev
> *URL:*	https://patchwork.freedesktop.org/series/83677/
> <https://patchwork.freedesktop.org/series/83677/>
> *State:*	failure
> *Details:*
> https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/index.html
> <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/index.html>
> 
> 
>   CI Bug Log - changes from CI_DRM_9301 -> IGTPW_5153
> 
> 
>     Summary
> 
> *FAILURE*
> 
> Serious unknown changes coming with IGTPW_5153 absolutely need to be
> verified manually.
> 
> If you think the reported changes have nothing to do with the changes
> introduced in IGTPW_5153, please notify your bug team to allow them
> to document this new failure mode, which will reduce false positives in CI.
> 
> External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/index.html
> 
> 
>     Possible new issues
> 
> Here are the unknown changes that may have been introduced in IGTPW_5153:
> 
> 
>       IGT changes
> 
> 
>         Possible regressions
> 
>   *
> 
>     igt@fbdev@mmap:

FYI, I replaced the mmap test with a set of more elaborate tests. It's
expected that mmap does not PASS any longer.

Is there a configuration file that I have to adapt?

Best regards
Thomas

> 
>       o
> 
>         fi-tgl-u2: PASS
>         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-tgl-u2/igt@fbdev@mmap.html>
>         -> SKIP
>         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-tgl-u2/igt@fbdev@mmap.html>
> 
>       o
> 
>         fi-tgl-y: NOTRUN -> SKIP
>         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-tgl-y/igt@fbdev@mmap.html>
> 
>       o
> 
>         fi-cml-s: PASS
>         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-cml-s/igt@fbdev@mmap.html>
>         -> SKIP
>         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-cml-s/igt@fbdev@mmap.html>
> 
>       o
> 
>         fi-icl-y: PASS
>         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-icl-y/igt@fbdev@mmap.html>
>         -> SKIP
>         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-icl-y/igt@fbdev@mmap.html>
> 
>       o
> 
>         fi-icl-u2: PASS
>         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-icl-u2/igt@fbdev@mmap.html>
>         -> SKIP
>         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-icl-u2/igt@fbdev@mmap.html>
> 
>       o
> 
>         fi-cml-u2: PASS
>         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-cml-u2/igt@fbdev@mmap.html>
>         -> SKIP
>         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-cml-u2/igt@fbdev@mmap.html>
> 
> 
>         Suppressed
> 
> The following results come from untrusted machines, tests, or statuses.
> They do not affect the overall result.
> 
>   *
> 
>     igt@fbdev@mmap:
> 
>       o
> 
>         {fi-ehl-1}: PASS
>         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-ehl-1/igt@fbdev@mmap.html>
>         -> SKIP
>         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-ehl-1/igt@fbdev@mmap.html>
> 
>       o
> 
>         {fi-tgl-dsi}: PASS
>         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-tgl-dsi/igt@fbdev@mmap.html>
>         -> SKIP
>         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-tgl-dsi/igt@fbdev@mmap.html>
> 
> 
>     Known issues
> 
> Here are the changes found in IGTPW_5153 that come from known issues:
> 
> 
>       IGT changes
> 
> 
>         Issues hit
> 
>   *
> 
>     igt@fbdev@mmap:
> 
>       o
> 
>         fi-skl-lmem: PASS
>         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-skl-lmem/igt@fbdev@mmap.html>
>         -> SKIP
>         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-skl-lmem/igt@fbdev@mmap.html>
>         (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271>)
> 
>       o
> 
>         fi-ivb-3770: PASS
>         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-ivb-3770/igt@fbdev@mmap.html>
>         -> SKIP
>         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-ivb-3770/igt@fbdev@mmap.html>
>         (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271>)
> 
>       o
> 
>         fi-ilk-650: PASS
>         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-ilk-650/igt@fbdev@mmap.html>
>         -> SKIP
>         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-ilk-650/igt@fbdev@mmap.html>
>         (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271>)
> 
>       o
> 
>         fi-bsw-n3050: PASS
>         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-bsw-n3050/igt@fbdev@mmap.html>
>         -> SKIP
>         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-bsw-n3050/igt@fbdev@mmap.html>
>         (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271>)
> 
>       o
> 
>         fi-cfl-guc: PASS
>         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-cfl-guc/igt@fbdev@mmap.html>
>         -> SKIP
>         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-cfl-guc/igt@fbdev@mmap.html>
>         (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271>)
> 
>       o
> 
>         fi-snb-2600: PASS
>         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-snb-2600/igt@fbdev@mmap.html>
>         -> SKIP
>         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-snb-2600/igt@fbdev@mmap.html>
>         (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271>)
> 
>       o
> 
>         fi-kbl-x1275: PASS
>         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-kbl-x1275/igt@fbdev@mmap.html>
>         -> SKIP
>         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-kbl-x1275/igt@fbdev@mmap.html>
>         (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271>)
> 
>       o
> 
>         fi-kbl-soraka: PASS
>         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-kbl-soraka/igt@fbdev@mmap.html>
>         -> SKIP
>         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-kbl-soraka/igt@fbdev@mmap.html>
>         (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271>)
> 
>       o
> 
>         fi-glk-dsi: PASS
>         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-glk-dsi/igt@fbdev@mmap.html>
>         -> SKIP
>         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-glk-dsi/igt@fbdev@mmap.html>
>         (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271>)
> 
>       o
> 
>         fi-bsw-kefka: PASS
>         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-bsw-kefka/igt@fbdev@mmap.html>
>         -> SKIP
>         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-bsw-kefka/igt@fbdev@mmap.html>
>         (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271>)
> 
>       o
> 
>         fi-kbl-r: PASS
>         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-kbl-r/igt@fbdev@mmap.html>
>         -> SKIP
>         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-kbl-r/igt@fbdev@mmap.html>
>         (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271>)
> 
>       o
> 
>         fi-kbl-8809g: PASS
>         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-kbl-8809g/igt@fbdev@mmap.html>
>         -> SKIP
>         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-kbl-8809g/igt@fbdev@mmap.html>
>         (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271>)
> 
>       o
> 
>         fi-blb-e6850: PASS
>         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-blb-e6850/igt@fbdev@mmap.html>
>         -> SKIP
>         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-blb-e6850/igt@fbdev@mmap.html>
>         (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271>)
> 
>       o
> 
>         fi-kbl-7500u: PASS
>         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-kbl-7500u/igt@fbdev@mmap.html>
>         -> SKIP
>         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-kbl-7500u/igt@fbdev@mmap.html>
>         (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271>)
> 
>       o
> 
>         fi-cfl-8109u: PASS
>         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-cfl-8109u/igt@fbdev@mmap.html>
>         -> SKIP
>         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-cfl-8109u/igt@fbdev@mmap.html>
>         (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271>)
> 
>       o
> 
>         fi-gdg-551: PASS
>         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-gdg-551/igt@fbdev@mmap.html>
>         -> SKIP
>         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-gdg-551/igt@fbdev@mmap.html>
>         (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271>)
> 
>       o
> 
>         fi-bwr-2160: PASS
>         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-bwr-2160/igt@fbdev@mmap.html>
>         -> SKIP
>         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-bwr-2160/igt@fbdev@mmap.html>
>         (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271>)
> 
>       o
> 
>         fi-skl-guc: PASS
>         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-skl-guc/igt@fbdev@mmap.html>
>         -> SKIP
>         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-skl-guc/igt@fbdev@mmap.html>
>         (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271>)
> 
>       o
> 
>         fi-skl-6600u: PASS
>         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-skl-6600u/igt@fbdev@mmap.html>
>         -> SKIP
>         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-skl-6600u/igt@fbdev@mmap.html>
>         (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271>)
> 
>       o
> 
>         fi-pnv-d510: PASS
>         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-pnv-d510/igt@fbdev@mmap.html>
>         -> SKIP
>         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-pnv-d510/igt@fbdev@mmap.html>
>         (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271>)
> 
>       o
> 
>         fi-bdw-5557u: PASS
>         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-bdw-5557u/igt@fbdev@mmap.html>
>         -> SKIP
>         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-bdw-5557u/igt@fbdev@mmap.html>
>         (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271>)
> 
>       o
> 
>         fi-snb-2520m: PASS
>         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-snb-2520m/igt@fbdev@mmap.html>
>         -> SKIP
>         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-snb-2520m/igt@fbdev@mmap.html>
>         (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271>)
> 
>       o
> 
>         fi-apl-guc: PASS
>         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-apl-guc/igt@fbdev@mmap.html>
>         -> SKIP
>         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-apl-guc/igt@fbdev@mmap.html>
>         (fdo#109271
>         <https://bugs.freedesktop.org/show_bug.cgi?id=109271> /
>         i915#1635 <https://gitlab.freedesktop.org/drm/intel/issues/1635>)
> 
>       o
> 
>         fi-hsw-4770: PASS
>         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-hsw-4770/igt@fbdev@mmap.html>
>         -> SKIP
>         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-hsw-4770/igt@fbdev@mmap.html>
>         (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271>)
> 
>       o
> 
>         fi-cfl-8700k: PASS
>         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-cfl-8700k/igt@fbdev@mmap.html>
>         -> SKIP
>         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-cfl-8700k/igt@fbdev@mmap.html>
>         (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271>)
> 
>       o
> 
>         fi-bxt-dsi: PASS
>         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-bxt-dsi/igt@fbdev@mmap.html>
>         -> SKIP
>         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-bxt-dsi/igt@fbdev@mmap.html>
>         (fdo#109271
>         <https://bugs.freedesktop.org/show_bug.cgi?id=109271> /
>         i915#1635 <https://gitlab.freedesktop.org/drm/intel/issues/1635>)
> 
>       o
> 
>         fi-skl-6700k2: PASS
>         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-skl-6700k2/igt@fbdev@mmap.html>
>         -> SKIP
>         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-skl-6700k2/igt@fbdev@mmap.html>
>         (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271>)
> 
>       o
> 
>         fi-elk-e7500: PASS
>         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-elk-e7500/igt@fbdev@mmap.html>
>         -> SKIP
>         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-elk-e7500/igt@fbdev@mmap.html>
>         (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271>)
> 
>       o
> 
>         fi-byt-j1900: PASS
>         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-byt-j1900/igt@fbdev@mmap.html>
>         -> SKIP
>         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-byt-j1900/igt@fbdev@mmap.html>
>         (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271>)
> 
>   *
> 
>     igt@i915_module_load@reload:
> 
>       o fi-tgl-u2: PASS
>         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-tgl-u2/igt@i915_module_load@reload.html>
>         -> DMESG-WARN
>         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-tgl-u2/igt@i915_module_load@reload.html>
>         (i915#1982
>         <https://gitlab.freedesktop.org/drm/intel/issues/1982> /
>         k.org#205379 <https://bugzilla.kernel.org/show_bug.cgi?id=205379>)
>   *
> 
>     igt@kms_busy@basic@flip:
> 
>       o fi-kbl-soraka: PASS
>         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-kbl-soraka/igt@kms_busy@basic@flip.html>
>         -> DMESG-WARN
>         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-kbl-soraka/igt@kms_busy@basic@flip.html>
>         (i915#1982 <https://gitlab.freedesktop.org/drm/intel/issues/1982>)
>   *
> 
>     igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy:
> 
>       o fi-icl-u2: PASS
>         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-icl-u2/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy.html>
>         -> DMESG-WARN
>         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-icl-u2/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy.html>
>         (i915#1982
>         <https://gitlab.freedesktop.org/drm/intel/issues/1982>) +2
>         similar issues
> 
> 
>         Possible fixes
> 
>   *
> 
>     igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic:
> 
>       o
> 
>         fi-bsw-kefka: DMESG-WARN
>         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-bsw-kefka/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic.html>
>         (i915#1982
>         <https://gitlab.freedesktop.org/drm/intel/issues/1982>) -> PASS
>         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-bsw-kefka/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic.html>
> 
>       o
> 
>         fi-apl-guc: DMESG-WARN
>         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-apl-guc/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic.html>
>         (i915#1635
>         <https://gitlab.freedesktop.org/drm/intel/issues/1635> /
>         i915#1982
>         <https://gitlab.freedesktop.org/drm/intel/issues/1982>) -> PASS
>         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-apl-guc/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic.html>
> 
> {name}: This element is suppressed. This means it is ignored when computing
> the status of the difference (SUCCESS, WARNING, or FAILURE).
> 
> 
>     Participating hosts (46 -> 42)
> 
> Additional (1): fi-tgl-y
> Missing (5): fi-ilk-m540 fi-hsw-4200u fi-bsw-cyan fi-ctg-p8600 fi-bdw-samus
> 
> 
>     Build changes
> 
>   * CI: CI-20190529 -> None
>   * IGT: IGT_5839 -> IGTPW_5153
> 
> CI-20190529: 20190529
> CI_DRM_9301: 886b2b2d05ec4cb1b21cf7a311f186b5df1b78c5 @
> git://anongit.freedesktop.org/gfx-ci/linux
> IGTPW_5153: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/index.html
> IGT_5839: 2dbd64a6301e36eb432bc50ad7021fabaeebd1f4 @
> git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
> 
> == Testlist changes ==
> 
> +igt@fbdev@eof
> +igt@fbdev@nullptr
> +igt@fbdev@read
> +igt@fbdev@unaligned-read
> +igt@fbdev@unaligned-write
> +igt@fbdev@write
> -igt@fbdev@mmap
> 

-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [igt-dev] [PATCH v3 2/8] tests/fbdev: Map framebuffer in igt_fixture
  2020-11-10  7:50 ` [igt-dev] [PATCH v3 2/8] tests/fbdev: Map framebuffer in igt_fixture Thomas Zimmermann
@ 2020-11-11  9:49   ` Petri Latvala
  2020-11-11 10:21     ` Thomas Zimmermann
  0 siblings, 1 reply; 22+ messages in thread
From: Petri Latvala @ 2020-11-11  9:49 UTC (permalink / raw)
  To: Thomas Zimmermann; +Cc: igt-dev, chris

On Tue, Nov 10, 2020 at 08:50:56AM +0100, Thomas Zimmermann wrote:
> The mapping of the framebuffer memory will be useful for read/write
> tests. Move it into an igt_fixture block.
> 
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---
>  tests/fbdev.c | 10 ++++------
>  1 file changed, 4 insertions(+), 6 deletions(-)
> 
> diff --git a/tests/fbdev.c b/tests/fbdev.c
> index 46641fea..fc66210a 100644
> --- a/tests/fbdev.c
> +++ b/tests/fbdev.c
> @@ -63,15 +63,10 @@ static void mode_tests(int fd)
>  static void framebuffer_tests(int fd)
>  {
>  	struct fb_fix_screeninfo fix_info;
> +	void *map;

After this patch, map is assigned to in an igt_fixture and read in a
subtest. As igt_fixture uses longjmp(), the value of map when read
depends on whether this is compiled with or without optimizations.

The options for such variables are:

1) move it to global scope
2) make it volatile
3) make a struct data_d with the map (and in a later patch, buf as
   well) variable and assign its members instead.

I think we prefer 3 generally.

-- 
Petri Latvala



>  
>  	igt_fixture {
>  		igt_require(ioctl(fd, FBIOGET_FSCREENINFO, &fix_info) == 0);
> -	}
> -
> -	igt_describe("Check mmap operations on framebuffer memory");
> -	igt_subtest("mmap") {
> -		void *map;
> -
>  		igt_require(fix_info.smem_len);
>  
>  		map = mmap(NULL, fix_info.smem_len,
> @@ -79,6 +74,9 @@ static void framebuffer_tests(int fd)
>  		igt_assert(map != MAP_FAILED);
>  
>  		memset(map, 0, fix_info.smem_len);
> +	}
> +
> +	igt_fixture {
>  		munmap(map, fix_info.smem_len);
>  	}
>  }
> -- 
> 2.29.2
> 
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [igt-dev] [PATCH v3 3/8] tests/fbdev: Add tests for read operations on framebuffer
  2020-11-10  7:50 ` [igt-dev] [PATCH v3 3/8] tests/fbdev: Add tests for read operations on framebuffer Thomas Zimmermann
@ 2020-11-11  9:54   ` Petri Latvala
  0 siblings, 0 replies; 22+ messages in thread
From: Petri Latvala @ 2020-11-11  9:54 UTC (permalink / raw)
  To: Thomas Zimmermann; +Cc: igt-dev, chris

On Tue, Nov 10, 2020 at 08:50:57AM +0100, Thomas Zimmermann wrote:
> The read tests check the read buffer against the content of the mapped
> framebuffer.
> 
> v3:
> 	* put igt_describe() before igt_subtest() (Petri)
> 
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---
>  tests/fbdev.c | 25 +++++++++++++++++++++++++
>  1 file changed, 25 insertions(+)
> 
> diff --git a/tests/fbdev.c b/tests/fbdev.c
> index fc66210a..97d66217 100644
> --- a/tests/fbdev.c
> +++ b/tests/fbdev.c
> @@ -25,6 +25,7 @@
>  
>  #include "igt.h"
>  
> +#include <errno.h>
>  #include <fcntl.h>
>  #include <string.h>
>  #include <sys/ioctl.h>
> @@ -64,6 +65,7 @@ static void framebuffer_tests(int fd)
>  {
>  	struct fb_fix_screeninfo fix_info;
>  	void *map;
> +	void *buf;
>  
>  	igt_fixture {
>  		igt_require(ioctl(fd, FBIOGET_FSCREENINFO, &fix_info) == 0);
> @@ -73,10 +75,33 @@ static void framebuffer_tests(int fd)
>  			   PROT_WRITE, MAP_SHARED, fd, 0);
>  		igt_assert(map != MAP_FAILED);
>  
> +		buf = malloc(fix_info.smem_len);
> +		igt_assert(buf);

igt_require here instead. The thumb rule is igt_assert for checks
where failure says "kernel is broken", igt_require where failure says
"cannot test this".


> +	}
> +
> +	igt_describe("Check read operations on framebuffer memory");
> +	igt_subtest("read") {
> +		ssize_t ret;
> +		int cmp;
> +
> +		/* fill framebuffer with 0 and compare */
>  		memset(map, 0, fix_info.smem_len);
> +		ret = pread(fd, buf, fix_info.smem_len, 0);
> +		igt_require_f(ret == (ssize_t)fix_info.smem_len, "pread failed, ret=%zd\n", ret);
> +		cmp = memcmp(map, buf, fix_info.smem_len);
> +		igt_require_f(!cmp, "read buffer differs from mapped framebuffer for 0\n");
> +
> +		/* fill framebuffer with 0x55 and compare */
> +		memset(map, 0x55, fix_info.smem_len);
> +		ret = pread(fd, buf, fix_info.smem_len, 0);
> +		igt_require_f(ret == (ssize_t)fix_info.smem_len, "pread failed, ret=%zd\n", ret);
> +		cmp = memcmp(map, buf, fix_info.smem_len);
> +		igt_require_f(!cmp, "read buffer differs from mapped framebuffer for 0x55\n");

Here, these igt_requires should be igt_asserts.

>  	}
>  
>  	igt_fixture {
> +		free(buf);
> +		memset(map, 0, fix_info.smem_len); // don't leave garbage on the screen

Make sure fix_info has good values here in the case where we didn't
execute any subtests in framebuffer_tests(). If I read right it's
initialized in the igt_fixture so it should be good...


-- 
Petri Latvala


>  		munmap(map, fix_info.smem_len);
>  	}
>  }
> -- 
> 2.29.2
> 
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [igt-dev] [PATCH v3 4/8] tests/fbdev: Add tests for unaligned reads on framebuffer memory
  2020-11-10  7:50 ` [igt-dev] [PATCH v3 4/8] tests/fbdev: Add tests for unaligned reads on framebuffer memory Thomas Zimmermann
@ 2020-11-11  9:56   ` Petri Latvala
  0 siblings, 0 replies; 22+ messages in thread
From: Petri Latvala @ 2020-11-11  9:56 UTC (permalink / raw)
  To: Thomas Zimmermann; +Cc: igt-dev, chris

On Tue, Nov 10, 2020 at 08:50:58AM +0100, Thomas Zimmermann wrote:
> The tests for unaligned reads start and stop reading within pages.
> 
> v3:
> 	* put igt_describe() before igt_subtest() (Petri)
> 
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---
>  tests/fbdev.c | 40 ++++++++++++++++++++++++++++++++++++++--
>  1 file changed, 38 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/fbdev.c b/tests/fbdev.c
> index 97d66217..a6376c3b 100644
> --- a/tests/fbdev.c
> +++ b/tests/fbdev.c
> @@ -64,10 +64,13 @@ static void mode_tests(int fd)
>  static void framebuffer_tests(int fd)
>  {
>  	struct fb_fix_screeninfo fix_info;
> -	void *map;
> -	void *buf;
> +	unsigned char *map;
> +	unsigned char *buf;
> +	size_t pagesize;
>  
>  	igt_fixture {
> +		long ret;
> +
>  		igt_require(ioctl(fd, FBIOGET_FSCREENINFO, &fix_info) == 0);
>  		igt_require(fix_info.smem_len);
>  
> @@ -77,6 +80,10 @@ static void framebuffer_tests(int fd)
>  
>  		buf = malloc(fix_info.smem_len);
>  		igt_assert(buf);
> +
> +		ret = sysconf(_SC_PAGESIZE);
> +		igt_assert(ret != -1);
> +		pagesize = ret;

igt_require for this.


>  	}
>  
>  	igt_describe("Check read operations on framebuffer memory");
> @@ -99,6 +106,35 @@ static void framebuffer_tests(int fd)
>  		igt_require_f(!cmp, "read buffer differs from mapped framebuffer for 0x55\n");
>  	}
>  
> +	igt_describe("Check read operations on unaligned locations in framebuffer memory");
> +	igt_subtest("unaligned-read") {
> +		off_t off;
> +		size_t len;
> +		ssize_t ret;
> +		const unsigned char *pos;
> +
> +		off = pagesize + (pagesize >> 2); // 1.25 * pagesize
> +		len = (pagesize << 2) + (pagesize >> 1); // 4.5 * pagesize
> +		igt_require_f((off + len) < fix_info.smem_len, "framebuffer too small\n");

Too small to test, or should it always be larger?

> +
> +		/* read at unaligned location and compare */
> +		memset(map, 0, fix_info.smem_len);
> +		memset(&map[off], 0x55, len);
> +		memset(buf, 0xff, fix_info.smem_len);
> +		ret = pread(fd, &buf[off], len, off);
> +		igt_require_f(ret == (ssize_t)len, "pread failed, ret=%zd\n", ret);
> +		pos = memchr(buf, 0x55, fix_info.smem_len);
> +		igt_require_f(pos, "0x55 not found within read buffer\n");
> +		igt_require_f(pos == &buf[off], "0x55 found at pos %zu, expected %lld\n",
> +			     pos - buf, (long long)off);
> +		pos = memchr(&buf[off], 0xff, fix_info.smem_len - off);
> +		igt_require_f(pos, "0xff not found within read buffer\n");
> +		igt_require_f(pos == &buf[off + len], "0xff found at pos %zu, expected %lld\n",
> +			     pos - buf, (long long)(off + len));
> +		pos = memchr(&buf[off + len], 0x55, fix_info.smem_len - off + len);
> +		igt_require_f(pos, "found 0x55 at pos %zu, none expected\n", pos - buf);

These igt_requires should be igt_asserts.


-- 
Petri Latvala


> +	}
> +
>  	igt_fixture {
>  		free(buf);
>  		memset(map, 0, fix_info.smem_len); // don't leave garbage on the screen
> -- 
> 2.29.2
> 
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [igt-dev] [PATCH v3 5/8] tests/fbdev: Add tests for write operations on framebuffer
  2020-11-10  7:50 ` [igt-dev] [PATCH v3 5/8] tests/fbdev: Add tests for write operations on framebuffer Thomas Zimmermann
@ 2020-11-11 10:17   ` Petri Latvala
  0 siblings, 0 replies; 22+ messages in thread
From: Petri Latvala @ 2020-11-11 10:17 UTC (permalink / raw)
  To: Thomas Zimmermann; +Cc: igt-dev, chris

On Tue, Nov 10, 2020 at 08:50:59AM +0100, Thomas Zimmermann wrote:
> The write tests check the written buffer against the content of the mapped
> framebuffer.
> 
> v3:
> 	* put igt_describe() before igt_subtest() (Petri)
> 
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---
>  tests/fbdev.c | 20 ++++++++++++++++++++
>  1 file changed, 20 insertions(+)
> 
> diff --git a/tests/fbdev.c b/tests/fbdev.c
> index a6376c3b..02abdede 100644
> --- a/tests/fbdev.c
> +++ b/tests/fbdev.c
> @@ -135,6 +135,26 @@ static void framebuffer_tests(int fd)
>  		igt_require_f(pos, "found 0x55 at pos %zu, none expected\n", pos - buf);
>  	}
>  
> +	igt_describe("Check write operations on framebuffer memory");
> +	igt_subtest("write") {
> +		ssize_t ret;
> +		int cmp;
> +
> +		/* write 0 to framebuffer and compare */
> +		memset(buf, 0, fix_info.smem_len);
> +		ret = pwrite(fd, buf, fix_info.smem_len, 0);
> +		igt_require_f(ret == (ssize_t)fix_info.smem_len, "pwrite failed, ret=%zd\n", ret);
> +		cmp = memcmp(map, buf, fix_info.smem_len);
> +		igt_require_f(!cmp, "write buffer differs from mapped framebuffer for 0\n");
> +
> +		/* write 0x55 to framebuffer and compare */
> +		memset(buf, 0x55, fix_info.smem_len);
> +		ret = pwrite(fd, buf, fix_info.smem_len, 0);
> +		igt_require_f(ret == (ssize_t)fix_info.smem_len, "pwrite failed, ret=%zd\n", ret);
> +		cmp = memcmp(map, buf, fix_info.smem_len);
> +		igt_require_f(!cmp, "write buffer differs from mapped framebuffer for 0\n");


igt_asserts here instead of igt_require.


-- 
Petri Latvala



> +	}
> +
>  	igt_fixture {
>  		free(buf);
>  		memset(map, 0, fix_info.smem_len); // don't leave garbage on the screen
> -- 
> 2.29.2
> 
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [igt-dev] [PATCH v3 6/8] tests/fbdev: Add tests for unaligned writes on framebuffer memory
  2020-11-10  7:51 ` [igt-dev] [PATCH v3 6/8] tests/fbdev: Add tests for unaligned writes on framebuffer memory Thomas Zimmermann
@ 2020-11-11 10:18   ` Petri Latvala
  0 siblings, 0 replies; 22+ messages in thread
From: Petri Latvala @ 2020-11-11 10:18 UTC (permalink / raw)
  To: Thomas Zimmermann; +Cc: igt-dev, chris

On Tue, Nov 10, 2020 at 08:51:00AM +0100, Thomas Zimmermann wrote:
> The tests for unaligned writes start and stop writing within pages.
> 
> v3:
> 	* put igt_describe() before igt_subtest() (Petri)
> 
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---
>  tests/fbdev.c | 29 +++++++++++++++++++++++++++++
>  1 file changed, 29 insertions(+)
> 
> diff --git a/tests/fbdev.c b/tests/fbdev.c
> index 02abdede..522da8e2 100644
> --- a/tests/fbdev.c
> +++ b/tests/fbdev.c
> @@ -155,6 +155,35 @@ static void framebuffer_tests(int fd)
>  		igt_require_f(!cmp, "write buffer differs from mapped framebuffer for 0\n");
>  	}
>  
> +	igt_describe("Check write operations on unaligned locations in framebuffer memory");
> +	igt_subtest("unaligned-write") {
> +		off_t off;
> +		size_t len;
> +		ssize_t ret;
> +		const unsigned char *pos;
> +
> +		off = pagesize + (pagesize >> 2); // 1.25 * pagesize
> +		len = (pagesize << 2) + (pagesize >> 1); // 4.5 * pagesize
> +		igt_require_f((off + len) < fix_info.smem_len, "framebuffer too small\n");

Same question here about framebuffer size as in that one earlier patch.

> +
> +		/* read at unaligned location and compare */
> +		memset(map, 0xff, fix_info.smem_len);
> +		memset(buf, 0, fix_info.smem_len);
> +		memset(&buf[off], 0x55, len);
> +		ret = pwrite(fd, &buf[off], len, off);
> +		igt_require_f(ret == (ssize_t)len, "pwrite failed, ret=%zd\n", ret);
> +		pos = memchr(map, 0x55, fix_info.smem_len);
> +		igt_require_f(pos, "0x55 not found within framebuffer\n");
> +		igt_require_f(pos == &map[off], "0x55 found at pos %zu, expected %lld\n",
> +			     pos - map, (long long)off);
> +		pos = memchr(&map[off], 0xff, fix_info.smem_len - off);
> +		igt_require_f(pos, "0xff not found within framebuffer\n");
> +		igt_require_f(pos == &map[off + len], "0xff found at pos %zu, expected %lld\n",
> +			     pos - map, (long long)(off + len));
> +		pos = memchr(&map[off + len], 0x55, fix_info.smem_len - off + len);
> +		igt_require_f(pos, "found 0x55 at pos %zu, none expected\n", pos - map);

igt_asserts instead of igt_require.


-- 
Petri Latvala


> +	}
> +
>  	igt_fixture {
>  		free(buf);
>  		memset(map, 0, fix_info.smem_len); // don't leave garbage on the screen
> -- 
> 2.29.2
> 
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [igt-dev] [PATCH v3 7/8] tests/fbdev: Add tests for accessing framebuffer near EOF
  2020-11-10  7:51 ` [igt-dev] [PATCH v3 7/8] tests/fbdev: Add tests for accessing framebuffer near EOF Thomas Zimmermann
@ 2020-11-11 10:19   ` Petri Latvala
  0 siblings, 0 replies; 22+ messages in thread
From: Petri Latvala @ 2020-11-11 10:19 UTC (permalink / raw)
  To: Thomas Zimmermann; +Cc: igt-dev, chris

On Tue, Nov 10, 2020 at 08:51:01AM +0100, Thomas Zimmermann wrote:
> Fbdev has some specific behavior when reading/writing near the EOF, which
> the eof test checks. If at least one bytes has been written, the number
> of bytes has to be returned, otherwise an error code (if any) has to be
> returned, or otherwise 0 has to returned. Not all drivers get this right.
> 
> v3:
> 	* put igt_describe() before igt_subtest() (Petri)
> 
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---
>  tests/fbdev.c | 47 ++++++++++++++++++++++++++++++++++++++++++++++-
>  1 file changed, 46 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/fbdev.c b/tests/fbdev.c
> index 522da8e2..8fd920be 100644
> --- a/tests/fbdev.c
> +++ b/tests/fbdev.c
> @@ -78,7 +78,8 @@ static void framebuffer_tests(int fd)
>  			   PROT_WRITE, MAP_SHARED, fd, 0);
>  		igt_assert(map != MAP_FAILED);
>  
> -		buf = malloc(fix_info.smem_len);
> +		/* allocate two additional bytes for eof test */
> +		buf = malloc(fix_info.smem_len + 2);
>  		igt_assert(buf);
>  
>  		ret = sysconf(_SC_PAGESIZE);
> @@ -184,6 +185,50 @@ static void framebuffer_tests(int fd)
>  		igt_require_f(pos, "found 0x55 at pos %zu, none expected\n", pos - map);
>  	}
>  
> +	igt_describe("Check framebuffer access near EOF");
> +	igt_subtest("eof") {
> +		unsigned long lastindex = fix_info.smem_len - 1;
> +		unsigned char *maplast = &((unsigned char *)map)[lastindex];
> +		unsigned char *buflast = &((unsigned char *)buf)[lastindex];
> +		ssize_t ret;
> +
> +		*buflast = 0x55;
> +
> +		/* write across EOF; set remaining bytes */
> +		ret = pwrite(fd, buflast, 2, lastindex);
> +		igt_require_f(ret == 1, "write crossed EOF, ret=%zd\n", ret);
> +		igt_require_f(*maplast == *buflast, "write buffer differs from mapped framebuffer at final byte, "
> +		                                    "maplast=%u buflast=%u\n", *maplast, *buflast);
> +
> +		/* write at EOF; get ENOSPC */
> +		ret = pwrite(fd, &buflast[1], 1, lastindex + 1);
> +		igt_require_f((ret == -1) && (errno == ENOSPC), "write at EOF, ret=%zd\n", ret);
> +
> +		*maplast = 0;
> +
> +		/* write final byte */
> +		ret = pwrite(fd, buflast, 1, lastindex);
> +		igt_require_f(ret == 1, "write before EOF, ret=%zd\n", ret);
> +		igt_require_f(*maplast == *buflast, "write buffer differs from mapped framebuffer at final byte, "
> +		                                    "maplast=%u buflast=%u\n", *maplast, *buflast);
> +
> +		/* write after EOF; get EFBIG */
> +		ret = pwrite(fd, &buflast[2], 1, lastindex + 2);
> +		igt_require_f((ret == -1) && (errno == EFBIG), "write after EOF, ret=%zd\n", ret);
> +
> +		*maplast = 0;
> +
> +		/* read across the EOF; get remaining bytes */
> +		ret = pread(fd, buflast, 2, lastindex);
> +		igt_require_f(ret == 1, "read before EOF, ret=%zd\n", ret);
> +		igt_require_f(*maplast == *buflast, "read buffer differs from mapped framebuffer at final byte, "
> +		                                    "maplast=%u buflast=%u\n", *maplast, *buflast);
> +
> +		/* read after EOF; get 0 */
> +		ret = pread(fd, &buflast[1], 1, lastindex + 1);
> +		igt_require_f(ret == 0, "read at EOF, ret=%zd\n", ret);

igt_asserts instead of igt_requires.


-- 
Petri Latvala



> +	}
> +
>  	igt_fixture {
>  		free(buf);
>  		memset(map, 0, fix_info.smem_len); // don't leave garbage on the screen
> -- 
> 2.29.2
> 
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [igt-dev] [PATCH v3 8/8] tests/fbdev: Add tests for read/writing with NULL-pointer buffers
  2020-11-10  7:51 ` [igt-dev] [PATCH v3 8/8] tests/fbdev: Add tests for read/writing with NULL-pointer buffers Thomas Zimmermann
@ 2020-11-11 10:20   ` Petri Latvala
  0 siblings, 0 replies; 22+ messages in thread
From: Petri Latvala @ 2020-11-11 10:20 UTC (permalink / raw)
  To: Thomas Zimmermann; +Cc: igt-dev, chris

On Tue, Nov 10, 2020 at 08:51:02AM +0100, Thomas Zimmermann wrote:
> Trying to read and write with a NULL-pointer buffer should fail and
> report EFAULT.
> 
> v3:
> 	* put igt_describe() before igt_subtest() (Petri)
> 
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---
>  tests/fbdev.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/tests/fbdev.c b/tests/fbdev.c
> index 8fd920be..814188b5 100644
> --- a/tests/fbdev.c
> +++ b/tests/fbdev.c
> @@ -229,6 +229,17 @@ static void framebuffer_tests(int fd)
>  		igt_require_f(ret == 0, "read at EOF, ret=%zd\n", ret);
>  	}
>  
> +	igt_describe("Check framebuffer access with NULL");
> +	igt_subtest("nullptr") {
> +		ssize_t ret;
> +
> +		ret = pread(fd, NULL, fix_info.smem_len, 0);
> +		igt_require_f((ret == -1) && (errno == EFAULT), "reading into NULL did not return EFAULT, ret=%zd\n", ret);
> +
> +		ret = pwrite(fd, NULL, fix_info.smem_len, 0);
> +		igt_require_f((ret == -1) && (errno == EFAULT), "writing from NULL did not return EFAULT, ret=%zd\n", ret);

igt_asserts instead of igt_requires.

-- 
Petri Latvala


> +	}
> +
>  	igt_fixture {
>  		free(buf);
>  		memset(map, 0, fix_info.smem_len); // don't leave garbage on the screen
> -- 
> 2.29.2
> 
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [igt-dev] [PATCH v3 2/8] tests/fbdev: Map framebuffer in igt_fixture
  2020-11-11  9:49   ` Petri Latvala
@ 2020-11-11 10:21     ` Thomas Zimmermann
  2020-11-11 10:36       ` Petri Latvala
  0 siblings, 1 reply; 22+ messages in thread
From: Thomas Zimmermann @ 2020-11-11 10:21 UTC (permalink / raw)
  To: Petri Latvala; +Cc: igt-dev, chris

Hi,

thanks for looking at the patches.

Am 11.11.20 um 10:49 schrieb Petri Latvala:
> On Tue, Nov 10, 2020 at 08:50:56AM +0100, Thomas Zimmermann wrote:
>> The mapping of the framebuffer memory will be useful for read/write
>> tests. Move it into an igt_fixture block.
>>
>> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
>> ---
>>  tests/fbdev.c | 10 ++++------
>>  1 file changed, 4 insertions(+), 6 deletions(-)
>>
>> diff --git a/tests/fbdev.c b/tests/fbdev.c
>> index 46641fea..fc66210a 100644
>> --- a/tests/fbdev.c
>> +++ b/tests/fbdev.c
>> @@ -63,15 +63,10 @@ static void mode_tests(int fd)
>>  static void framebuffer_tests(int fd)
>>  {
>>  	struct fb_fix_screeninfo fix_info;
>> +	void *map;
> 
> After this patch, map is assigned to in an igt_fixture and read in a
> subtest. As igt_fixture uses longjmp(), the value of map when read
> depends on whether this is compiled with or without optimizations.

One thing I wondered about is that the tests are build with
-Wno-clobbered. What's the reason? I'd expect that the compiler would
have warned about this problem.

> 
> The options for such variables are:
> 
> 1) move it to global scope
> 2) make it volatile
> 3) make a struct data_d with the map (and in a later patch, buf as
>    well) variable and assign its members instead.
> 
> I think we prefer 3 generally.
> 

I would have used 2. What's the benefit of of using 3?

Best regards
Thomas

-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [igt-dev] ✗ Fi.CI.BAT: failure for Test cases for fbdev
  2020-11-11  9:11   ` Thomas Zimmermann
@ 2020-11-11 10:22     ` Petri Latvala
  2020-11-11 10:59       ` [igt-dev] =?unknown-8bit?b?4pyX?= " Chris Wilson
  0 siblings, 1 reply; 22+ messages in thread
From: Petri Latvala @ 2020-11-11 10:22 UTC (permalink / raw)
  To: Thomas Zimmermann; +Cc: igt-dev

On Wed, Nov 11, 2020 at 10:11:40AM +0100, Thomas Zimmermann wrote:
> Hi
> 
> Am 10.11.20 um 16:45 schrieb Patchwork:
> > *Patch Details*
> > *Series:*	Test cases for fbdev
> > *URL:*	https://patchwork.freedesktop.org/series/83677/
> > <https://patchwork.freedesktop.org/series/83677/>
> > *State:*	failure
> > *Details:*
> > https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/index.html
> > <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/index.html>
> > 
> > 
> >   CI Bug Log - changes from CI_DRM_9301 -> IGTPW_5153
> > 
> > 
> >     Summary
> > 
> > *FAILURE*
> > 
> > Serious unknown changes coming with IGTPW_5153 absolutely need to be
> > verified manually.
> > 
> > If you think the reported changes have nothing to do with the changes
> > introduced in IGTPW_5153, please notify your bug team to allow them
> > to document this new failure mode, which will reduce false positives in CI.
> > 
> > External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/index.html
> > 
> > 
> >     Possible new issues
> > 
> > Here are the unknown changes that may have been introduced in IGTPW_5153:
> > 
> > 
> >       IGT changes
> > 
> > 
> >         Possible regressions
> > 
> >   *
> > 
> >     igt@fbdev@mmap:
> 
> FYI, I replaced the mmap test with a set of more elaborate tests. It's
> expected that mmap does not PASS any longer.
> 
> Is there a configuration file that I have to adapt?

Yeah, tests/intel-ci/fast-feedback.testlist. For getting this series
fully tested, add a patch to the series that removes the line

igt@fbdev@mmap

from that file, with subjectprefix "CI" or "HAX" so it's clear it's
not the final patch to be committed.

Chris, do you have any input as to which subtests we want to have in
BAT in the end?

-- 
Petri Latvala



> 
> Best regards
> Thomas
> 
> > 
> >       o
> > 
> >         fi-tgl-u2: PASS
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-tgl-u2/igt@fbdev@mmap.html>
> >         -> SKIP
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-tgl-u2/igt@fbdev@mmap.html>
> > 
> >       o
> > 
> >         fi-tgl-y: NOTRUN -> SKIP
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-tgl-y/igt@fbdev@mmap.html>
> > 
> >       o
> > 
> >         fi-cml-s: PASS
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-cml-s/igt@fbdev@mmap.html>
> >         -> SKIP
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-cml-s/igt@fbdev@mmap.html>
> > 
> >       o
> > 
> >         fi-icl-y: PASS
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-icl-y/igt@fbdev@mmap.html>
> >         -> SKIP
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-icl-y/igt@fbdev@mmap.html>
> > 
> >       o
> > 
> >         fi-icl-u2: PASS
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-icl-u2/igt@fbdev@mmap.html>
> >         -> SKIP
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-icl-u2/igt@fbdev@mmap.html>
> > 
> >       o
> > 
> >         fi-cml-u2: PASS
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-cml-u2/igt@fbdev@mmap.html>
> >         -> SKIP
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-cml-u2/igt@fbdev@mmap.html>
> > 
> > 
> >         Suppressed
> > 
> > The following results come from untrusted machines, tests, or statuses.
> > They do not affect the overall result.
> > 
> >   *
> > 
> >     igt@fbdev@mmap:
> > 
> >       o
> > 
> >         {fi-ehl-1}: PASS
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-ehl-1/igt@fbdev@mmap.html>
> >         -> SKIP
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-ehl-1/igt@fbdev@mmap.html>
> > 
> >       o
> > 
> >         {fi-tgl-dsi}: PASS
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-tgl-dsi/igt@fbdev@mmap.html>
> >         -> SKIP
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-tgl-dsi/igt@fbdev@mmap.html>
> > 
> > 
> >     Known issues
> > 
> > Here are the changes found in IGTPW_5153 that come from known issues:
> > 
> > 
> >       IGT changes
> > 
> > 
> >         Issues hit
> > 
> >   *
> > 
> >     igt@fbdev@mmap:
> > 
> >       o
> > 
> >         fi-skl-lmem: PASS
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-skl-lmem/igt@fbdev@mmap.html>
> >         -> SKIP
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-skl-lmem/igt@fbdev@mmap.html>
> >         (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271>)
> > 
> >       o
> > 
> >         fi-ivb-3770: PASS
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-ivb-3770/igt@fbdev@mmap.html>
> >         -> SKIP
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-ivb-3770/igt@fbdev@mmap.html>
> >         (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271>)
> > 
> >       o
> > 
> >         fi-ilk-650: PASS
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-ilk-650/igt@fbdev@mmap.html>
> >         -> SKIP
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-ilk-650/igt@fbdev@mmap.html>
> >         (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271>)
> > 
> >       o
> > 
> >         fi-bsw-n3050: PASS
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-bsw-n3050/igt@fbdev@mmap.html>
> >         -> SKIP
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-bsw-n3050/igt@fbdev@mmap.html>
> >         (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271>)
> > 
> >       o
> > 
> >         fi-cfl-guc: PASS
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-cfl-guc/igt@fbdev@mmap.html>
> >         -> SKIP
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-cfl-guc/igt@fbdev@mmap.html>
> >         (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271>)
> > 
> >       o
> > 
> >         fi-snb-2600: PASS
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-snb-2600/igt@fbdev@mmap.html>
> >         -> SKIP
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-snb-2600/igt@fbdev@mmap.html>
> >         (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271>)
> > 
> >       o
> > 
> >         fi-kbl-x1275: PASS
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-kbl-x1275/igt@fbdev@mmap.html>
> >         -> SKIP
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-kbl-x1275/igt@fbdev@mmap.html>
> >         (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271>)
> > 
> >       o
> > 
> >         fi-kbl-soraka: PASS
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-kbl-soraka/igt@fbdev@mmap.html>
> >         -> SKIP
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-kbl-soraka/igt@fbdev@mmap.html>
> >         (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271>)
> > 
> >       o
> > 
> >         fi-glk-dsi: PASS
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-glk-dsi/igt@fbdev@mmap.html>
> >         -> SKIP
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-glk-dsi/igt@fbdev@mmap.html>
> >         (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271>)
> > 
> >       o
> > 
> >         fi-bsw-kefka: PASS
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-bsw-kefka/igt@fbdev@mmap.html>
> >         -> SKIP
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-bsw-kefka/igt@fbdev@mmap.html>
> >         (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271>)
> > 
> >       o
> > 
> >         fi-kbl-r: PASS
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-kbl-r/igt@fbdev@mmap.html>
> >         -> SKIP
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-kbl-r/igt@fbdev@mmap.html>
> >         (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271>)
> > 
> >       o
> > 
> >         fi-kbl-8809g: PASS
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-kbl-8809g/igt@fbdev@mmap.html>
> >         -> SKIP
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-kbl-8809g/igt@fbdev@mmap.html>
> >         (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271>)
> > 
> >       o
> > 
> >         fi-blb-e6850: PASS
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-blb-e6850/igt@fbdev@mmap.html>
> >         -> SKIP
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-blb-e6850/igt@fbdev@mmap.html>
> >         (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271>)
> > 
> >       o
> > 
> >         fi-kbl-7500u: PASS
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-kbl-7500u/igt@fbdev@mmap.html>
> >         -> SKIP
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-kbl-7500u/igt@fbdev@mmap.html>
> >         (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271>)
> > 
> >       o
> > 
> >         fi-cfl-8109u: PASS
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-cfl-8109u/igt@fbdev@mmap.html>
> >         -> SKIP
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-cfl-8109u/igt@fbdev@mmap.html>
> >         (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271>)
> > 
> >       o
> > 
> >         fi-gdg-551: PASS
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-gdg-551/igt@fbdev@mmap.html>
> >         -> SKIP
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-gdg-551/igt@fbdev@mmap.html>
> >         (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271>)
> > 
> >       o
> > 
> >         fi-bwr-2160: PASS
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-bwr-2160/igt@fbdev@mmap.html>
> >         -> SKIP
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-bwr-2160/igt@fbdev@mmap.html>
> >         (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271>)
> > 
> >       o
> > 
> >         fi-skl-guc: PASS
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-skl-guc/igt@fbdev@mmap.html>
> >         -> SKIP
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-skl-guc/igt@fbdev@mmap.html>
> >         (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271>)
> > 
> >       o
> > 
> >         fi-skl-6600u: PASS
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-skl-6600u/igt@fbdev@mmap.html>
> >         -> SKIP
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-skl-6600u/igt@fbdev@mmap.html>
> >         (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271>)
> > 
> >       o
> > 
> >         fi-pnv-d510: PASS
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-pnv-d510/igt@fbdev@mmap.html>
> >         -> SKIP
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-pnv-d510/igt@fbdev@mmap.html>
> >         (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271>)
> > 
> >       o
> > 
> >         fi-bdw-5557u: PASS
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-bdw-5557u/igt@fbdev@mmap.html>
> >         -> SKIP
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-bdw-5557u/igt@fbdev@mmap.html>
> >         (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271>)
> > 
> >       o
> > 
> >         fi-snb-2520m: PASS
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-snb-2520m/igt@fbdev@mmap.html>
> >         -> SKIP
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-snb-2520m/igt@fbdev@mmap.html>
> >         (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271>)
> > 
> >       o
> > 
> >         fi-apl-guc: PASS
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-apl-guc/igt@fbdev@mmap.html>
> >         -> SKIP
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-apl-guc/igt@fbdev@mmap.html>
> >         (fdo#109271
> >         <https://bugs.freedesktop.org/show_bug.cgi?id=109271> /
> >         i915#1635 <https://gitlab.freedesktop.org/drm/intel/issues/1635>)
> > 
> >       o
> > 
> >         fi-hsw-4770: PASS
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-hsw-4770/igt@fbdev@mmap.html>
> >         -> SKIP
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-hsw-4770/igt@fbdev@mmap.html>
> >         (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271>)
> > 
> >       o
> > 
> >         fi-cfl-8700k: PASS
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-cfl-8700k/igt@fbdev@mmap.html>
> >         -> SKIP
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-cfl-8700k/igt@fbdev@mmap.html>
> >         (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271>)
> > 
> >       o
> > 
> >         fi-bxt-dsi: PASS
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-bxt-dsi/igt@fbdev@mmap.html>
> >         -> SKIP
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-bxt-dsi/igt@fbdev@mmap.html>
> >         (fdo#109271
> >         <https://bugs.freedesktop.org/show_bug.cgi?id=109271> /
> >         i915#1635 <https://gitlab.freedesktop.org/drm/intel/issues/1635>)
> > 
> >       o
> > 
> >         fi-skl-6700k2: PASS
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-skl-6700k2/igt@fbdev@mmap.html>
> >         -> SKIP
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-skl-6700k2/igt@fbdev@mmap.html>
> >         (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271>)
> > 
> >       o
> > 
> >         fi-elk-e7500: PASS
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-elk-e7500/igt@fbdev@mmap.html>
> >         -> SKIP
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-elk-e7500/igt@fbdev@mmap.html>
> >         (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271>)
> > 
> >       o
> > 
> >         fi-byt-j1900: PASS
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-byt-j1900/igt@fbdev@mmap.html>
> >         -> SKIP
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-byt-j1900/igt@fbdev@mmap.html>
> >         (fdo#109271 <https://bugs.freedesktop.org/show_bug.cgi?id=109271>)
> > 
> >   *
> > 
> >     igt@i915_module_load@reload:
> > 
> >       o fi-tgl-u2: PASS
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-tgl-u2/igt@i915_module_load@reload.html>
> >         -> DMESG-WARN
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-tgl-u2/igt@i915_module_load@reload.html>
> >         (i915#1982
> >         <https://gitlab.freedesktop.org/drm/intel/issues/1982> /
> >         k.org#205379 <https://bugzilla.kernel.org/show_bug.cgi?id=205379>)
> >   *
> > 
> >     igt@kms_busy@basic@flip:
> > 
> >       o fi-kbl-soraka: PASS
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-kbl-soraka/igt@kms_busy@basic@flip.html>
> >         -> DMESG-WARN
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-kbl-soraka/igt@kms_busy@basic@flip.html>
> >         (i915#1982 <https://gitlab.freedesktop.org/drm/intel/issues/1982>)
> >   *
> > 
> >     igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy:
> > 
> >       o fi-icl-u2: PASS
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-icl-u2/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy.html>
> >         -> DMESG-WARN
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-icl-u2/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy.html>
> >         (i915#1982
> >         <https://gitlab.freedesktop.org/drm/intel/issues/1982>) +2
> >         similar issues
> > 
> > 
> >         Possible fixes
> > 
> >   *
> > 
> >     igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic:
> > 
> >       o
> > 
> >         fi-bsw-kefka: DMESG-WARN
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-bsw-kefka/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic.html>
> >         (i915#1982
> >         <https://gitlab.freedesktop.org/drm/intel/issues/1982>) -> PASS
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-bsw-kefka/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic.html>
> > 
> >       o
> > 
> >         fi-apl-guc: DMESG-WARN
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9301/fi-apl-guc/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic.html>
> >         (i915#1635
> >         <https://gitlab.freedesktop.org/drm/intel/issues/1635> /
> >         i915#1982
> >         <https://gitlab.freedesktop.org/drm/intel/issues/1982>) -> PASS
> >         <https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/fi-apl-guc/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic.html>
> > 
> > {name}: This element is suppressed. This means it is ignored when computing
> > the status of the difference (SUCCESS, WARNING, or FAILURE).
> > 
> > 
> >     Participating hosts (46 -> 42)
> > 
> > Additional (1): fi-tgl-y
> > Missing (5): fi-ilk-m540 fi-hsw-4200u fi-bsw-cyan fi-ctg-p8600 fi-bdw-samus
> > 
> > 
> >     Build changes
> > 
> >   * CI: CI-20190529 -> None
> >   * IGT: IGT_5839 -> IGTPW_5153
> > 
> > CI-20190529: 20190529
> > CI_DRM_9301: 886b2b2d05ec4cb1b21cf7a311f186b5df1b78c5 @
> > git://anongit.freedesktop.org/gfx-ci/linux
> > IGTPW_5153: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5153/index.html
> > IGT_5839: 2dbd64a6301e36eb432bc50ad7021fabaeebd1f4 @
> > git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
> > 
> > == Testlist changes ==
> > 
> > +igt@fbdev@eof
> > +igt@fbdev@nullptr
> > +igt@fbdev@read
> > +igt@fbdev@unaligned-read
> > +igt@fbdev@unaligned-write
> > +igt@fbdev@write
> > -igt@fbdev@mmap
> > 
> 
> -- 
> Thomas Zimmermann
> Graphics Driver Developer
> SUSE Software Solutions Germany GmbH
> Maxfeldstr. 5, 90409 Nürnberg, Germany
> (HRB 36809, AG Nürnberg)
> Geschäftsführer: Felix Imendörffer
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [igt-dev] [PATCH v3 2/8] tests/fbdev: Map framebuffer in igt_fixture
  2020-11-11 10:21     ` Thomas Zimmermann
@ 2020-11-11 10:36       ` Petri Latvala
  0 siblings, 0 replies; 22+ messages in thread
From: Petri Latvala @ 2020-11-11 10:36 UTC (permalink / raw)
  To: Thomas Zimmermann; +Cc: igt-dev, chris

On Wed, Nov 11, 2020 at 11:21:47AM +0100, Thomas Zimmermann wrote:
> Hi,
> 
> thanks for looking at the patches.
> 
> Am 11.11.20 um 10:49 schrieb Petri Latvala:
> > On Tue, Nov 10, 2020 at 08:50:56AM +0100, Thomas Zimmermann wrote:
> >> The mapping of the framebuffer memory will be useful for read/write
> >> tests. Move it into an igt_fixture block.
> >>
> >> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> >> ---
> >>  tests/fbdev.c | 10 ++++------
> >>  1 file changed, 4 insertions(+), 6 deletions(-)
> >>
> >> diff --git a/tests/fbdev.c b/tests/fbdev.c
> >> index 46641fea..fc66210a 100644
> >> --- a/tests/fbdev.c
> >> +++ b/tests/fbdev.c
> >> @@ -63,15 +63,10 @@ static void mode_tests(int fd)
> >>  static void framebuffer_tests(int fd)
> >>  {
> >>  	struct fb_fix_screeninfo fix_info;
> >> +	void *map;
> > 
> > After this patch, map is assigned to in an igt_fixture and read in a
> > subtest. As igt_fixture uses longjmp(), the value of map when read
> > depends on whether this is compiled with or without optimizations.
> 
> One thing I wondered about is that the tests are build with
> -Wno-clobbered. What's the reason? I'd expect that the compiler would
> have warned about this problem.

Too many warnings already accumulated mostly, some of them false
positives.


> 
> > 
> > The options for such variables are:
> > 
> > 1) move it to global scope
> > 2) make it volatile
> > 3) make a struct data_d with the map (and in a later patch, buf as
> >    well) variable and assign its members instead.
> > 
> > I think we prefer 3 generally.
> > 
> 
> I would have used 2. What's the benefit of of using 3?

Actually I take that back, it's an established convention when you
pass data to functions, not so much in code like in your series where
the stuff is entirely contained within the function.

That leaves no benefits so option 2 looks real juicy here indeed.


-- 
Petri Latvala


> 
> Best regards
> Thomas
> 
> -- 
> Thomas Zimmermann
> Graphics Driver Developer
> SUSE Software Solutions Germany GmbH
> Maxfeldstr. 5, 90409 Nürnberg, Germany
> (HRB 36809, AG Nürnberg)
> Geschäftsführer: Felix Imendörffer
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [igt-dev]  =?unknown-8bit?b?4pyX?= Fi.CI.BAT: failure for Test cases for fbdev
  2020-11-11 10:22     ` Petri Latvala
@ 2020-11-11 10:59       ` Chris Wilson
  0 siblings, 0 replies; 22+ messages in thread
From: Chris Wilson @ 2020-11-11 10:59 UTC (permalink / raw)
  To: Petri Latvala, Thomas Zimmermann; +Cc: igt-dev

Quoting Petri Latvala (2020-11-11 10:22:26)
> On Wed, Nov 11, 2020 at 10:11:40AM +0100, Thomas Zimmermann wrote:
> > FYI, I replaced the mmap test with a set of more elaborate tests. It's
> > expected that mmap does not PASS any longer.
> > 
> > Is there a configuration file that I have to adapt?
> 
> Yeah, tests/intel-ci/fast-feedback.testlist. For getting this series
> fully tested, add a patch to the series that removes the line
> 
> igt@fbdev@mmap
> 
> from that file, with subjectprefix "CI" or "HAX" so it's clear it's
> not the final patch to be committed.
> 
> Chris, do you have any input as to which subtests we want to have in
> BAT in the end?

The read/write contents verification should work well for BAT; quick and
cover the simple use cases we know people do run into. Unaligned and
negative tests are better suited to full test run since they should not
provide any deep probes into the driver (and so not as likely to catch
unexpected bugs in future patches).
-Chris
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2020-11-11 11:00 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-10  7:50 [igt-dev] [PATCH v3 0/8] Test cases for fbdev Thomas Zimmermann
2020-11-10  7:50 ` [igt-dev] [PATCH v3 1/8] tests/fbdev: Move existing tests into separate subgroups Thomas Zimmermann
2020-11-10  7:50 ` [igt-dev] [PATCH v3 2/8] tests/fbdev: Map framebuffer in igt_fixture Thomas Zimmermann
2020-11-11  9:49   ` Petri Latvala
2020-11-11 10:21     ` Thomas Zimmermann
2020-11-11 10:36       ` Petri Latvala
2020-11-10  7:50 ` [igt-dev] [PATCH v3 3/8] tests/fbdev: Add tests for read operations on framebuffer Thomas Zimmermann
2020-11-11  9:54   ` Petri Latvala
2020-11-10  7:50 ` [igt-dev] [PATCH v3 4/8] tests/fbdev: Add tests for unaligned reads on framebuffer memory Thomas Zimmermann
2020-11-11  9:56   ` Petri Latvala
2020-11-10  7:50 ` [igt-dev] [PATCH v3 5/8] tests/fbdev: Add tests for write operations on framebuffer Thomas Zimmermann
2020-11-11 10:17   ` Petri Latvala
2020-11-10  7:51 ` [igt-dev] [PATCH v3 6/8] tests/fbdev: Add tests for unaligned writes on framebuffer memory Thomas Zimmermann
2020-11-11 10:18   ` Petri Latvala
2020-11-10  7:51 ` [igt-dev] [PATCH v3 7/8] tests/fbdev: Add tests for accessing framebuffer near EOF Thomas Zimmermann
2020-11-11 10:19   ` Petri Latvala
2020-11-10  7:51 ` [igt-dev] [PATCH v3 8/8] tests/fbdev: Add tests for read/writing with NULL-pointer buffers Thomas Zimmermann
2020-11-11 10:20   ` Petri Latvala
2020-11-10 15:45 ` [igt-dev] ✗ Fi.CI.BAT: failure for Test cases for fbdev Patchwork
2020-11-11  9:11   ` Thomas Zimmermann
2020-11-11 10:22     ` Petri Latvala
2020-11-11 10:59       ` [igt-dev] =?unknown-8bit?b?4pyX?= " Chris Wilson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.