[Bug 103183] [CI] igt at perf@short-reads -fail - Failed assertion: ret == -1
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Wed Oct 18 21:50:07 UTC 2017
https://bugs.freedesktop.org/show_bug.cgi?id=103183
--- Comment #1 from mwa <matthew.auld at intel.com> ---
8bytes is exactly the size of the report header, so probably just a case of
being unlucky with the read() giving us a REPORT_LOST, which just so happens to
fit into the non-protected region so we don't get an EFAULT.
First thought would just be:
diff --git a/tests/perf.c b/tests/perf.c
index ad62319e..fe8e32bf 100644
--- a/tests/perf.c
+++ b/tests/perf.c
@@ -3121,7 +3121,13 @@ test_short_reads(void)
/* A read that can't return a single record because it would result
* in a fault on buffer overrun should result in an EFAULT error...
*/
- ret = read(stream_fd, pages + page_size - 16, page_size);
+ do {
+ header = (void *)(pages + page_size - 16);
+ ret = read(stream_fd,
+ header,
+ page_size);
+ } while (header->type == DRM_I915_PERF_RECORD_OA_REPORT_LOST);
+
igt_assert_eq(ret, -1);
igt_assert_eq(errno, EFAULT);
--
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/intel-gfx-bugs/attachments/20171018/43464fb4/attachment.html>
More information about the intel-gfx-bugs
mailing list