From: priyanka.dandamudi@intel.com
To: priyanka.dandamudi@intel.com, ramadevi.gandi@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: Sat, 20 May 2023 17:40:55 +0530 [thread overview]
Message-ID: <20230520121056.3926557-3-priyanka.dandamudi@intel.com> (raw)
In-Reply-To: <20230520121056.3926557-1-priyanka.dandamudi@intel.com>
From: Priyanka Dandamudi <priyanka.dandamudi@intel.com>
Add negative test to check bad extensions.
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 | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/tests/xe/xe_mmap.c b/tests/xe/xe_mmap.c
index 011b8893..f6f6b2af 100644
--- a/tests/xe/xe_mmap.c
+++ b/tests/xe/xe_mmap.c
@@ -73,6 +73,25 @@ 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)
+{
+ struct xe_user_extension ext;
+ struct drm_xe_gem_mmap_offset mmo = {
+ .handle = xe_bo_create(fd, 0, 0, 4096),
+ };
+
+ 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;
@@ -94,6 +113,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-20 12:11 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
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 1/3] xe/xe_mmap: Negative test for mmap flags priyanka.dandamudi
2023-05-22 11:36 ` Zbigniew Kempczyński
2023-05-22 11:39 ` Zbigniew Kempczyński
2023-05-20 12:10 ` priyanka.dandamudi [this message]
2023-05-22 11:41 ` [igt-dev] [PATCH i-g-t 2/3] xe/xe_mmap: Negative test to extensions Zbigniew Kempczyński
2023-05-20 12:10 ` [igt-dev] [PATCH i-g-t 3/3] xe/xe_mmap: Negative test to object priyanka.dandamudi
2023-05-22 11:44 ` Zbigniew Kempczyński
2023-05-20 21:15 ` [igt-dev] ✓ Fi.CI.BAT: success for Negative tests to mmap offset Patchwork
2023-05-20 22:38 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2023-05-26 5:08 [igt-dev] [PATCH i-g-t 0/3] " priyanka.dandamudi
2023-05-26 5:08 ` [igt-dev] [PATCH i-g-t 2/3] xe/xe_mmap: Negative test to extensions priyanka.dandamudi
2023-05-26 10:44 ` 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=20230520121056.3926557-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 \
/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