From: priyanka.dandamudi@intel.com
To: priyanka.dandamudi@intel.com, ramadevi.gandi@intel.com,
zbigniew.kempczynski@intel.com, janga.rahul.kumar@intel.com,
kamil.konieczny@intel.com, igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t 2/3] xe/xe_mmap: Negative test to extensions
Date: Fri, 26 May 2023 10:38:54 +0530 [thread overview]
Message-ID: <20230526050855.4115107-3-priyanka.dandamudi@intel.com> (raw)
In-Reply-To: <20230526050855.4115107-1-priyanka.dandamudi@intel.com>
From: Priyanka Dandamudi <priyanka.dandamudi@intel.com>
Add negative test to check bad extensions.
v2: Add default alignment for the object size.(Zbigniew)
Cc: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Cc: Kamil Konieczny <kamil.konieczny@linux.intel.com>
Cc: Janga Rahul Kumar <janga.rahul.kumar@intel.com>
Signed-off-by: Priyanka Dandamudi <priyanka.dandamudi@intel.com>
---
tests/xe/xe_mmap.c | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/tests/xe/xe_mmap.c b/tests/xe/xe_mmap.c
index 3e3f165b..a5da6fa9 100644
--- a/tests/xe/xe_mmap.c
+++ b/tests/xe/xe_mmap.c
@@ -74,6 +74,26 @@ static void test_bad_flags(int fd)
gem_close(fd, mmo.handle);
}
+/**
+ * SUBTEST: bad-extensions
+ * Description: Test mmap offset with bad extensions.
+ *
+ */
+static void test_bad_extensions(int fd)
+{
+ uint64_t size = xe_get_default_alignment(fd);
+ struct xe_user_extension ext;
+ struct drm_xe_gem_mmap_offset mmo = {
+ .handle = xe_bo_create(fd, 0, 0, size),
+ };
+
+ mmo.extensions = to_user_pointer(&ext);
+ ext.name = -1;
+
+ do_ioctl_err(fd, DRM_IOCTL_XE_GEM_MMAP_OFFSET, &mmo, EINVAL);
+ gem_close(fd, mmo.handle);
+}
+
igt_main
{
int fd;
@@ -95,6 +115,9 @@ igt_main
igt_subtest("bad-flags")
test_bad_flags(fd);
+ igt_subtest("bad-extensions")
+ test_bad_extensions(fd);
+
igt_fixture {
xe_device_put(fd);
close(fd);
--
2.25.1
next prev parent reply other threads:[~2023-05-26 5:09 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-26 5:08 [igt-dev] [PATCH i-g-t 0/3] Negative tests to mmap offset priyanka.dandamudi
2023-05-26 5:08 ` [igt-dev] [PATCH i-g-t 1/3] xe/xe_mmap: Negative test for mmap flags priyanka.dandamudi
2023-05-26 10:42 ` Zbigniew Kempczyński
2023-05-26 5:08 ` priyanka.dandamudi [this message]
2023-05-26 10:44 ` [igt-dev] [PATCH i-g-t 2/3] xe/xe_mmap: Negative test to extensions Zbigniew Kempczyński
2023-05-26 5:08 ` [igt-dev] [PATCH i-g-t 3/3] xe/xe_mmap: Negative test to object priyanka.dandamudi
2023-05-26 10:44 ` Zbigniew Kempczyński
2023-05-26 12:08 ` [igt-dev] ✓ Fi.CI.BAT: success for Negative tests to mmap offset (rev2) Patchwork
2023-05-26 14:40 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2023-05-20 12:10 [igt-dev] [PATCH i-g-t 0/3] Negative tests to mmap offset priyanka.dandamudi
2023-05-20 12:10 ` [igt-dev] [PATCH i-g-t 2/3] xe/xe_mmap: Negative test to extensions priyanka.dandamudi
2023-05-22 11:41 ` Zbigniew Kempczyński
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=20230526050855.4115107-3-priyanka.dandamudi@intel.com \
--to=priyanka.dandamudi@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=janga.rahul.kumar@intel.com \
--cc=kamil.konieczny@intel.com \
--cc=ramadevi.gandi@intel.com \
--cc=zbigniew.kempczynski@intel.com \
/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