[PATCH i-g-t 2/2] tests/xe_exec_capture: Skip checks on VF devices
Dong, Zhanjun
zhanjun.dong at intel.com
Fri Feb 21 16:45:50 UTC 2025
LGTM
Reviewed-by: Zhanjun Dong <zhanjun.dong at intel.com>
Regards,
Zhanjun Dong
On 2025-02-19 6:53 a.m., Marcin Bernatowicz wrote:
> If the device is a Virtual Function, skip certain devcoredump validation
> steps that are not applicable in this context.
>
> These changes align with kernel updates introduced in:
>
> Link: https://patchwork.freedesktop.org/patch/msgid/20241022010116.342240-2-zhanjun.dong@intel.com
>
> Signed-off-by: Marcin Bernatowicz <marcin.bernatowicz at linux.intel.com>
> Cc: Lukasz Laguna <lukasz.laguna at intel.com>
> Cc: Michał Wajdeczko <michal.wajdeczko at intel.com>
> Cc: Zhanjun Dong <zhanjun.dong at intel.com>
> ---
> tests/intel/xe_exec_capture.c | 36 ++++++++++++++++++++++-------------
> 1 file changed, 23 insertions(+), 13 deletions(-)
>
> diff --git a/tests/intel/xe_exec_capture.c b/tests/intel/xe_exec_capture.c
> index 2c79c1802..fe1ae677e 100644
> --- a/tests/intel/xe_exec_capture.c
> +++ b/tests/intel/xe_exec_capture.c
> @@ -20,6 +20,7 @@
>
> #include "igt.h"
> #include "igt_device.h"
> +#include "igt_sriov_device.h"
> #include "igt_sysfs.h"
> #include "lib/igt_syncobj.h"
> #include "lib/intel_reg.h"
> @@ -434,6 +435,7 @@ static void test_card(int fd)
> char *single_line_buf = (char *)malloc(LINE_BUF_SIZE);
> char temp[MAX_TEMP_LEN];
> char path[MAX_SYSFS_PATH_LEN];
> + const bool is_vf_device = intel_is_vf_device(fd);
>
> igt_assert_f(single_line_buf, "Out of memory.\n");
>
> @@ -466,19 +468,27 @@ static void test_card(int fd)
> igt_assert_f((start_line = access_devcoredump(path, lines, single_line_buf)) > 0,
> "Devcoredump not exist, errno=%d.\n", errno);
>
> - sprintf(temp, "instance=%d", hwe->engine_instance);
> - check_item_str(®ex, lines, "(physical),", INDEX_ENGINE_PHYSICAL,
> - INDEX_ENGINE_INSTANCE, temp, false);
> - check_item_str(®ex, lines, "(physical),", INDEX_ENGINE_PHYSICAL,
> - INDEX_ENGINE_NAME, xe_engine_class_name(hwe->engine_class), true);
> -
> - check_item_str(®ex, lines, "Capture_source:", INDEX_KEY, INDEX_VALUE,
> - "GuC", false);
> -
> - check_item_u64(®ex, lines, "ACTHD:", addr,
> - addr + BATCH_DW_COUNT * sizeof(u32), INDEX_KEY, INDEX_VALUE);
> - check_item_u64(®ex, lines, "RING_BBADDR:", addr,
> - addr + BATCH_DW_COUNT * sizeof(u32), INDEX_KEY, INDEX_VALUE);
> + if (!is_vf_device) {
> + sprintf(temp, "instance=%d", hwe->engine_instance);
> + check_item_str(®ex, lines, "(physical),",
> + INDEX_ENGINE_PHYSICAL,
> + INDEX_ENGINE_INSTANCE, temp, false);
> + check_item_str(®ex, lines, "(physical),",
> + INDEX_ENGINE_PHYSICAL, INDEX_ENGINE_NAME,
> + xe_engine_class_name(hwe->engine_class),
> + true);
> +
> + check_item_str(®ex, lines,
> + "Capture_source:", INDEX_KEY,
> + INDEX_VALUE, "GuC", false);
> +
> + check_item_u64(®ex, lines, "ACTHD:", addr,
> + addr + BATCH_DW_COUNT * sizeof(u32),
> + INDEX_KEY, INDEX_VALUE);
> + check_item_u64(®ex, lines, "RING_BBADDR:", addr,
> + addr + BATCH_DW_COUNT * sizeof(u32),
> + INDEX_KEY, INDEX_VALUE);
> + }
> check_item_u64(®ex, lines, "length:", addr,
> addr + BATCH_DW_COUNT * sizeof(u32), INDEX_VALUE, INDEX_KEY);
>
More information about the igt-dev
mailing list