[PATCH i-g-t] tests/intel/xe_oa: Check for DRM_XE_OA_CAPS_OA_BUFFER_SIZE
Umesh Nerlige Ramappa
umesh.nerlige.ramappa at intel.com
Mon Apr 14 22:16:41 UTC 2025
On Fri, Apr 11, 2025 at 11:03:14AM -0700, Ashutosh Dixit wrote:
>Tests which use DRM_XE_OA_PROPERTY_OA_BUFFER_SIZE should check for
>DRM_XE_OA_CAPS_OA_BUFFER_SIZE and skip if the capability is not available.
>
>Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/4678
>Signed-off-by: Ashutosh Dixit <ashutosh.dixit at intel.com>
LGTM,
Reviewed-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa at intel.com>
Thanks,
Umesh
>---
> tests/intel/xe_oa.c | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
>
>diff --git a/tests/intel/xe_oa.c b/tests/intel/xe_oa.c
>index 67acc74b32..891ce24518 100644
>--- a/tests/intel/xe_oa.c
>+++ b/tests/intel/xe_oa.c
>@@ -4736,9 +4736,11 @@ igt_main
> __for_one_hwe_in_oag(hwe)
> test_oa_exponents(hwe);
>
>- igt_subtest_with_dynamic("buffer-fill")
>+ igt_subtest_with_dynamic("buffer-fill") {
>+ igt_require(oau->capabilities & DRM_XE_OA_CAPS_OA_BUFFER_SIZE);
> __for_one_hwe_in_oag(hwe)
> test_buffer_fill(hwe);
>+ }
>
> /**
> * SUBTEST: buffer-size
>@@ -4747,13 +4749,16 @@ igt_main
> igt_subtest_with_dynamic("buffer-size") {
> long k = random() % num_buf_sizes;
>
>+ igt_require(oau->capabilities & DRM_XE_OA_CAPS_OA_BUFFER_SIZE);
> __for_one_hwe_in_oag_w_arg(hwe, buf_sizes[k].name)
> test_non_zero_reason(hwe, buf_sizes[k].size);
> }
>
>- igt_subtest_with_dynamic("non-zero-reason")
>+ igt_subtest_with_dynamic("non-zero-reason") {
>+ igt_require(oau->capabilities & DRM_XE_OA_CAPS_OA_BUFFER_SIZE);
> __for_one_hwe_in_oag(hwe)
> test_non_zero_reason(hwe, 0);
>+ }
>
> igt_subtest("disabled-read-error")
> test_disabled_read_error();
>--
>2.48.1
>
More information about the igt-dev
mailing list