From: Vidya Srinivas <vidya.srinivas@intel.com>
To: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
igt-dev@lists.freedesktop.org
Cc: markyacoub@chromium.org, Charlton.Lin@intel.com
Subject: [Intel-gfx] [PATCH i-g-t] tests/drm_read: drm_read fails for subtest invalid-buffer on chrome
Date: Fri, 21 May 2021 09:48:44 +0530 [thread overview]
Message-ID: <1621570724-24132-1-git-send-email-vidya.srinivas@intel.com> (raw)
Chrome platforms is unable to handle reading from -1.
It terminates the test after reporting buffer overflow.
Hence, changed the address for invalid buffer to NULL instead of -1.
With this change, errno becomes EINTR when reading from NULL
location. To accomodate, also changing the check of errno to EINTR
instead of EFAULT
Change-Id: I5f844af087c9826fcbcfbe301f0df5f727cb013b
Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com>
---
tests/drm_read.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/drm_read.c b/tests/drm_read.c
index ccf9d822fd8d..a8816bc1e587 100644
--- a/tests/drm_read.c
+++ b/tests/drm_read.c
@@ -106,8 +106,8 @@ static void test_invalid_buffer(int in)
alarm(1);
- igt_assert_eq(read(fd, (void *)-1, 4096), -1);
- igt_assert_eq(errno, EFAULT);
+ igt_assert_eq(read(fd, (void *)NULL, 4096), -1);
+ igt_assert_eq(errno, EINTR);
teardown(fd);
}
--
2.7.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
reply other threads:[~2021-05-21 4:27 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1621570724-24132-1-git-send-email-vidya.srinivas@intel.com \
--to=vidya.srinivas@intel.com \
--cc=Charlton.Lin@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=igt-dev@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=markyacoub@chromium.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox