tests/xe/xe_query: Add subtest query-invalid-extension
PATCH 1/1 tests/xe/xe_query: Add subtest query-invalid-extension
From: Janga Rahul Kumar <[email protected]>
Check query with invalid extension returns expected error code.
Add test to XE BAT.
CC Priyanka Dandamudi <[email protected]>
Reviewed-by Zbigniew Kempczyński <[email protected]>
Signed-off-by Janga Rahul Kumar <[email protected]>
--- tests/intel-ci/xe-fast-feedback.testlist | 1 + tests/xe/xe_query.c | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+)
tests/intel-ci/xe-fast-feedback.testlist +1 -0
@@ -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
tests/xe/xe_query.c +20 -0
@@ -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);
Signature · 1 line
2.25.1