* [igt-dev] [PATCH i-g-t] tests/xe/xe_query: Add subtest query-invalid-extension
@ 2023-04-25 18:41 janga.rahul.kumar
2023-04-26 10:01 ` Dandamudi, Priyanka
0 siblings, 1 reply; 7+ messages in thread
From: janga.rahul.kumar @ 2023-04-25 18:41 UTC (permalink / raw)
To: igt-dev, ramadevi.gandi, janga.rahul.kumar
From: Janga Rahul Kumar <janga.rahul.kumar@intel.com>
Check query with invalid extension returns expected error code.
Signed-off-by: Janga Rahul Kumar <janga.rahul.kumar@intel.com>
---
tests/xe/xe_query.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/tests/xe/xe_query.c b/tests/xe/xe_query.c
index 3f038225..6c35730c 100644
--- a/tests/xe/xe_query.c
+++ b/tests/xe/xe_query.c
@@ -435,6 +435,23 @@ test_query_invalid_size(int fd)
igt_assert_eq(igt_ioctl(fd, DRM_IOCTL_XE_DEVICE_QUERY, &query), -1);
}
+/**
+ * SUBTEST: query-invalid-extension
+ * Description: Check query with invalid extension returns expected error code.
+ */
+static void
+test_query_invalid_extension(int fd)
+{
+ struct drm_xe_device_query query = {
+ .extensions = -1,
+ .query = DRM_XE_DEVICE_QUERY_CONFIG,
+ .size = 0,
+ .data = 0,
+ };
+
+ igt_assert_eq(igt_ioctl(fd, DRM_IOCTL_XE_DEVICE_QUERY, &query), -1);
+}
+
igt_main
{
int xe;
@@ -468,6 +485,9 @@ igt_main
igt_subtest("query-invalid-size")
test_query_invalid_size(xe);
+ igt_subtest("query-invalid-extension")
+ test_query_invalid_extension(xe);
+
igt_fixture {
xe_device_put(xe);
close(xe);
--
2.25.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [igt-dev] [PATCH i-g-t] tests/xe/xe_query: Add subtest query-invalid-extension
2023-04-25 18:41 janga.rahul.kumar
@ 2023-04-26 10:01 ` Dandamudi, Priyanka
0 siblings, 0 replies; 7+ messages in thread
From: Dandamudi, Priyanka @ 2023-04-26 10:01 UTC (permalink / raw)
To: Kumar, Janga Rahul, igt-dev@lists.freedesktop.org,
Gandi, Ramadevi, Kumar, Janga Rahul
> -----Original Message-----
> From: igt-dev <igt-dev-bounces@lists.freedesktop.org> On Behalf Of
> janga.rahul.kumar@intel.com
> Sent: 26 April 2023 12:12 AM
> To: igt-dev@lists.freedesktop.org; Gandi, Ramadevi
> <ramadevi.gandi@intel.com>; Kumar, Janga Rahul
> <janga.rahul.kumar@intel.com>
> Subject: [igt-dev] [PATCH i-g-t] tests/xe/xe_query: Add subtest query-invalid-
> extension
>
> From: Janga Rahul Kumar <janga.rahul.kumar@intel.com>
>
> Check query with invalid extension returns expected error code.
>
> Signed-off-by: Janga Rahul Kumar <janga.rahul.kumar@intel.com>
> ---
> tests/xe/xe_query.c | 20 ++++++++++++++++++++
> 1 file changed, 20 insertions(+)
>
> diff --git a/tests/xe/xe_query.c b/tests/xe/xe_query.c index
> 3f038225..6c35730c 100644
> --- a/tests/xe/xe_query.c
> +++ b/tests/xe/xe_query.c
> @@ -435,6 +435,23 @@ test_query_invalid_size(int fd)
> igt_assert_eq(igt_ioctl(fd, DRM_IOCTL_XE_DEVICE_QUERY, &query),
> -1); }
>
> +/**
> + * SUBTEST: query-invalid-extension
> + * Description: Check query with invalid extension returns expected error
> code.
> + */
> +static void
> +test_query_invalid_extension(int fd)
> +{
> + struct drm_xe_device_query query = {
> + .extensions = -1,
> + .query = DRM_XE_DEVICE_QUERY_CONFIG,
> + .size = 0,
> + .data = 0,
> + };
> +
> + igt_assert_eq(igt_ioctl(fd, DRM_IOCTL_XE_DEVICE_QUERY, &query),
> -1); }
> +
> igt_main
> {
> int xe;
> @@ -468,6 +485,9 @@ igt_main
> igt_subtest("query-invalid-size")
> test_query_invalid_size(xe);
>
> + igt_subtest("query-invalid-extension")
> + test_query_invalid_extension(xe);
> +
LGTM
Reviewed-by: Priyanka Dandamudi <priyanka.dandamudi@intel.com>
> igt_fixture {
> xe_device_put(xe);
> close(xe);
> --
> 2.25.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [igt-dev] [PATCH i-g-t] tests/xe/xe_query: Add subtest query-invalid-extension
@ 2023-04-27 11:42 janga.rahul.kumar
2023-04-27 14:20 ` Zbigniew Kempczyński
2023-04-28 5:56 ` Zbigniew Kempczyński
0 siblings, 2 replies; 7+ messages in thread
From: janga.rahul.kumar @ 2023-04-27 11:42 UTC (permalink / raw)
To: igt-dev, ramadevi.gandi, janga.rahul.kumar
From: Janga Rahul Kumar <janga.rahul.kumar@intel.com>
Check query with invalid extension returns expected error code.
CC: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
CC: Priyanka Dandamudi <priyanka.dandamudi@intel.com>
Signed-off-by: Janga Rahul Kumar <janga.rahul.kumar@intel.com>
---
tests/xe/xe_query.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/tests/xe/xe_query.c b/tests/xe/xe_query.c
index 3f038225..a0fb5422 100644
--- a/tests/xe/xe_query.c
+++ b/tests/xe/xe_query.c
@@ -435,6 +435,23 @@ test_query_invalid_size(int fd)
igt_assert_eq(igt_ioctl(fd, DRM_IOCTL_XE_DEVICE_QUERY, &query), -1);
}
+/**
+ * SUBTEST: query-invalid-extension
+ * Description: Check query with invalid extension returns expected error code.
+ */
+static void
+test_query_invalid_extension(int fd)
+{
+ struct drm_xe_device_query query = {
+ .extensions = -1,
+ .query = DRM_XE_DEVICE_QUERY_CONFIG,
+ .size = 0,
+ .data = 0,
+ };
+
+ do_ioctl_err(fd, DRM_IOCTL_XE_DEVICE_QUERY, &query, EINVAL);
+}
+
igt_main
{
int xe;
@@ -468,6 +485,9 @@ igt_main
igt_subtest("query-invalid-size")
test_query_invalid_size(xe);
+ igt_subtest("query-invalid-extension")
+ test_query_invalid_extension(xe);
+
igt_fixture {
xe_device_put(xe);
close(xe);
--
2.25.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [igt-dev] [PATCH i-g-t] tests/xe/xe_query: Add subtest query-invalid-extension
2023-04-27 11:42 janga.rahul.kumar
@ 2023-04-27 14:20 ` Zbigniew Kempczyński
2023-04-28 5:56 ` Zbigniew Kempczyński
1 sibling, 0 replies; 7+ messages in thread
From: Zbigniew Kempczyński @ 2023-04-27 14:20 UTC (permalink / raw)
To: janga.rahul.kumar; +Cc: igt-dev, ramadevi.gandi
On Thu, Apr 27, 2023 at 05:12:56PM +0530, janga.rahul.kumar@intel.com wrote:
> From: Janga Rahul Kumar <janga.rahul.kumar@intel.com>
>
> Check query with invalid extension returns expected error code.
>
> CC: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
> CC: Priyanka Dandamudi <priyanka.dandamudi@intel.com>
> Signed-off-by: Janga Rahul Kumar <janga.rahul.kumar@intel.com>
Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
--
Zbigniew
> ---
> tests/xe/xe_query.c | 20 ++++++++++++++++++++
> 1 file changed, 20 insertions(+)
>
> diff --git a/tests/xe/xe_query.c b/tests/xe/xe_query.c
> index 3f038225..a0fb5422 100644
> --- a/tests/xe/xe_query.c
> +++ b/tests/xe/xe_query.c
> @@ -435,6 +435,23 @@ test_query_invalid_size(int fd)
> igt_assert_eq(igt_ioctl(fd, DRM_IOCTL_XE_DEVICE_QUERY, &query), -1);
> }
>
> +/**
> + * SUBTEST: query-invalid-extension
> + * Description: Check query with invalid extension returns expected error code.
> + */
> +static void
> +test_query_invalid_extension(int fd)
> +{
> + struct drm_xe_device_query query = {
> + .extensions = -1,
> + .query = DRM_XE_DEVICE_QUERY_CONFIG,
> + .size = 0,
> + .data = 0,
> + };
> +
> + do_ioctl_err(fd, DRM_IOCTL_XE_DEVICE_QUERY, &query, EINVAL);
> +}
> +
> igt_main
> {
> int xe;
> @@ -468,6 +485,9 @@ igt_main
> igt_subtest("query-invalid-size")
> test_query_invalid_size(xe);
>
> + igt_subtest("query-invalid-extension")
> + test_query_invalid_extension(xe);
> +
> igt_fixture {
> xe_device_put(xe);
> close(xe);
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [igt-dev] [PATCH i-g-t] tests/xe/xe_query: Add subtest query-invalid-extension
2023-04-27 11:42 janga.rahul.kumar
2023-04-27 14:20 ` Zbigniew Kempczyński
@ 2023-04-28 5:56 ` Zbigniew Kempczyński
1 sibling, 0 replies; 7+ messages in thread
From: Zbigniew Kempczyński @ 2023-04-28 5:56 UTC (permalink / raw)
To: janga.rahul.kumar; +Cc: igt-dev, ramadevi.gandi
On Thu, Apr 27, 2023 at 05:12:56PM +0530, janga.rahul.kumar@intel.com wrote:
> From: Janga Rahul Kumar <janga.rahul.kumar@intel.com>
>
> Check query with invalid extension returns expected error code.
>
> CC: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
> CC: Priyanka Dandamudi <priyanka.dandamudi@intel.com>
> Signed-off-by: Janga Rahul Kumar <janga.rahul.kumar@intel.com>
I've already gave r-b, but this subtest should land to xe-fast-feedback
either.
--
Zbigniew
> ---
> tests/xe/xe_query.c | 20 ++++++++++++++++++++
> 1 file changed, 20 insertions(+)
>
> diff --git a/tests/xe/xe_query.c b/tests/xe/xe_query.c
> index 3f038225..a0fb5422 100644
> --- a/tests/xe/xe_query.c
> +++ b/tests/xe/xe_query.c
> @@ -435,6 +435,23 @@ test_query_invalid_size(int fd)
> igt_assert_eq(igt_ioctl(fd, DRM_IOCTL_XE_DEVICE_QUERY, &query), -1);
> }
>
> +/**
> + * SUBTEST: query-invalid-extension
> + * Description: Check query with invalid extension returns expected error code.
> + */
> +static void
> +test_query_invalid_extension(int fd)
> +{
> + struct drm_xe_device_query query = {
> + .extensions = -1,
> + .query = DRM_XE_DEVICE_QUERY_CONFIG,
> + .size = 0,
> + .data = 0,
> + };
> +
> + do_ioctl_err(fd, DRM_IOCTL_XE_DEVICE_QUERY, &query, EINVAL);
> +}
> +
> igt_main
> {
> int xe;
> @@ -468,6 +485,9 @@ igt_main
> igt_subtest("query-invalid-size")
> test_query_invalid_size(xe);
>
> + igt_subtest("query-invalid-extension")
> + test_query_invalid_extension(xe);
> +
> igt_fixture {
> xe_device_put(xe);
> close(xe);
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [igt-dev] [PATCH i-g-t] tests/xe/xe_query: Add subtest query-invalid-extension
@ 2023-04-28 11:02 janga.rahul.kumar
0 siblings, 0 replies; 7+ messages in thread
From: janga.rahul.kumar @ 2023-04-28 11:02 UTC (permalink / raw)
To: igt-dev, ramadevi.gandi, janga.rahul.kumar
From: Janga Rahul Kumar <janga.rahul.kumar@intel.com>
Check query with invalid extension returns expected error code.
Add test to XE BAT.
CC: Priyanka Dandamudi <priyanka.dandamudi@intel.com>
Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Signed-off-by: Janga Rahul Kumar <janga.rahul.kumar@intel.com>
---
tests/intel-ci/xe-fast-feedback.testlist | 1 +
tests/xe/xe_query.c | 20 ++++++++++++++++++++
2 files changed, 21 insertions(+)
diff --git a/tests/intel-ci/xe-fast-feedback.testlist b/tests/intel-ci/xe-fast-feedback.testlist
index ecf44ca7..f699afd5 100644
--- a/tests/intel-ci/xe-fast-feedback.testlist
+++ b/tests/intel-ci/xe-fast-feedback.testlist
@@ -143,6 +143,7 @@ igt@xe_query@query-hwconfig
igt@xe_query@query-topology
igt@xe_query@query-invalid-query
igt@xe_query@query-invalid-size
+igt@xe_query@query-invalid-extension
#igt@xe_vm@bind-once
#igt@xe_vm@scratch
igt@xe_vm@shared-pte-page
diff --git a/tests/xe/xe_query.c b/tests/xe/xe_query.c
index 3f038225..a0fb5422 100644
--- a/tests/xe/xe_query.c
+++ b/tests/xe/xe_query.c
@@ -435,6 +435,23 @@ test_query_invalid_size(int fd)
igt_assert_eq(igt_ioctl(fd, DRM_IOCTL_XE_DEVICE_QUERY, &query), -1);
}
+/**
+ * SUBTEST: query-invalid-extension
+ * Description: Check query with invalid extension returns expected error code.
+ */
+static void
+test_query_invalid_extension(int fd)
+{
+ struct drm_xe_device_query query = {
+ .extensions = -1,
+ .query = DRM_XE_DEVICE_QUERY_CONFIG,
+ .size = 0,
+ .data = 0,
+ };
+
+ do_ioctl_err(fd, DRM_IOCTL_XE_DEVICE_QUERY, &query, EINVAL);
+}
+
igt_main
{
int xe;
@@ -468,6 +485,9 @@ igt_main
igt_subtest("query-invalid-size")
test_query_invalid_size(xe);
+ igt_subtest("query-invalid-extension")
+ test_query_invalid_extension(xe);
+
igt_fixture {
xe_device_put(xe);
close(xe);
--
2.25.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [igt-dev] [PATCH i-g-t] tests/xe/xe_query: Add subtest query-invalid-extension
@ 2023-04-28 11:19 janga.rahul.kumar
0 siblings, 0 replies; 7+ messages in thread
From: janga.rahul.kumar @ 2023-04-28 11:19 UTC (permalink / raw)
To: igt-dev, ramadevi.gandi, kamil.konieczny, janga.rahul.kumar
From: Janga Rahul Kumar <janga.rahul.kumar@intel.com>
Check query with invalid extension returns expected error code.
Add test to XE BAT.
CC: Priyanka Dandamudi <priyanka.dandamudi@intel.com>
Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Signed-off-by: Janga Rahul Kumar <janga.rahul.kumar@intel.com>
---
tests/intel-ci/xe-fast-feedback.testlist | 1 +
tests/xe/xe_query.c | 20 ++++++++++++++++++++
2 files changed, 21 insertions(+)
diff --git a/tests/intel-ci/xe-fast-feedback.testlist b/tests/intel-ci/xe-fast-feedback.testlist
index ecf44ca7..4082ecd1 100644
--- a/tests/intel-ci/xe-fast-feedback.testlist
+++ b/tests/intel-ci/xe-fast-feedback.testlist
@@ -141,6 +141,7 @@ igt@xe_query@query-gts
igt@xe_query@query-config
igt@xe_query@query-hwconfig
igt@xe_query@query-topology
+igt@xe_query@query-invalid-extension
igt@xe_query@query-invalid-query
igt@xe_query@query-invalid-size
#igt@xe_vm@bind-once
diff --git a/tests/xe/xe_query.c b/tests/xe/xe_query.c
index 3f038225..a0fb5422 100644
--- a/tests/xe/xe_query.c
+++ b/tests/xe/xe_query.c
@@ -435,6 +435,23 @@ test_query_invalid_size(int fd)
igt_assert_eq(igt_ioctl(fd, DRM_IOCTL_XE_DEVICE_QUERY, &query), -1);
}
+/**
+ * SUBTEST: query-invalid-extension
+ * Description: Check query with invalid extension returns expected error code.
+ */
+static void
+test_query_invalid_extension(int fd)
+{
+ struct drm_xe_device_query query = {
+ .extensions = -1,
+ .query = DRM_XE_DEVICE_QUERY_CONFIG,
+ .size = 0,
+ .data = 0,
+ };
+
+ do_ioctl_err(fd, DRM_IOCTL_XE_DEVICE_QUERY, &query, EINVAL);
+}
+
igt_main
{
int xe;
@@ -468,6 +485,9 @@ igt_main
igt_subtest("query-invalid-size")
test_query_invalid_size(xe);
+ igt_subtest("query-invalid-extension")
+ test_query_invalid_extension(xe);
+
igt_fixture {
xe_device_put(xe);
close(xe);
--
2.25.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-04-28 11:17 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-28 11:02 [igt-dev] [PATCH i-g-t] tests/xe/xe_query: Add subtest query-invalid-extension janga.rahul.kumar
-- strict thread matches above, loose matches on Subject: below --
2023-04-28 11:19 janga.rahul.kumar
2023-04-27 11:42 janga.rahul.kumar
2023-04-27 14:20 ` Zbigniew Kempczyński
2023-04-28 5:56 ` Zbigniew Kempczyński
2023-04-25 18:41 janga.rahul.kumar
2023-04-26 10:01 ` Dandamudi, Priyanka
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox