tests/intel/xe_err_injection: Readback and validate threshold
PATCH 1/1 tests/intel/xe_err_injection: Readback and validate threshold
With error injection test, we're setting threshold for given component before injecting the error. Also validate that we're able to readback the threshold that we're setting.
Signed-off-by Raag Jadav <[email protected]>
--- tests/intel/xe_err_injection.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
tests/intel/xe_err_injection.c +10 -0
@@ -459,6 +459,12 @@ static void test_inject_core_compute_corr_error(struct xe_mmio *mmio, int fd,cleanup_on_error (&ctx, fw_handle);igt_assert_f (false,"Failed to set Core Compute correctable error threshold before injection\n" ); } + ret =igt_drm_ras_nl_get_error_threshold (&ctx); +if (ret <0 || ctx.error_threshold != threshold) { +cleanup_on_error (&ctx, fw_handle); +igt_assert_f (false, +"Failed to validate Core Compute correctable error threshold before injection\n" ); + } }if (check_event) {
@@ -505,6 +511,10 @@ static void test_inject_core_compute_corr_error(struct xe_mmio *mmio, int fd, ret =igt_drm_ras_nl_set_error_threshold (&ctx);if (ret <0 )igt_warn ("Failed to restore Core Compute Correctable threshold to original value\n" ); + + ret =igt_drm_ras_nl_get_error_threshold (&ctx); +if (ret <0 || ctx.error_threshold != current_threshold) +igt_warn ("Failed to validate Core Compute Correctable threshold to original value\n" ); } ret =igt_drm_ras_nl_get_error_counter (&ctx);
Signature · 1 line
2.43.0