Re: [PATCH i-g-t] tests/intel/xe_wedged: Skip subtests using wedged_mode=2 in SR-IOV cases

Rodrigo Vivi
2026-01-09T16:17:17Z

On Fri, Jan 09, 2026 at 04:48:34PM +0100, Lukasz Laguna wrote:
> In upon-any-hang-no-reset (2) wedged mode, engine resets need to be
> disabled, which requires changing the GuC reset policy.
>
> VFs are not permitted to modify this policy, so the driver now rejects
> attempts to set wedged_mode=2 on a VF.
>
> On the PF, modifying the reset policy is allowed, but the change is
> global and affects all VFs. To prevent unintended cross-VF impact, the
> driver permits wedged_mode=2 on the PF only when the driver is built
> with the debug config. Otherwise, the operation fails with -EPERM.
>
> Update the affected subtests to skip in such cases to avoid false
> failures.
>
> Link: https://lore.kernel.org/all/20260107174741.29163-4-lukasz.laguna@intel.com/
> Link: https://lore.kernel.org/all/20260107174741.29163-5-lukasz.laguna@intel.com/
> Signed-off-by: Lukasz Laguna <lukasz.laguna@intel.com>

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

> ---
> tests/intel/xe_wedged.c | 12 +++++++++++-
> 1 file changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/tests/intel/xe_wedged.c b/tests/intel/xe_wedged.c
> index bcd78b49d7..e1ac629ca7 100644
> --- a/tests/intel/xe_wedged.c
> +++ b/tests/intel/xe_wedged.c
> @@ -18,6 +18,7 @@
> #include "igt.h"
> #include "igt_device.h"
> #include "igt_kmod.h"
> +#include "igt_sriov_device.h"
> #include "igt_syncobj.h"
> #include "igt_sysfs.h"
>
> @@ -247,11 +248,16 @@ int igt_main()
> int err;
>
> igt_require(igt_debugfs_exists(fd, "wedged_mode", O_RDWR));
> + igt_require(!intel_is_vf_device(fd));
> +
> + igt_debugfs_write(fd, "wedged_mode", "2");
> + igt_skip_on_f(igt_sriov_is_pf(fd) && errno == EPERM,
> + "On PF, upon-any-hang-no-reset (2) wedged mode is restricted to debug builds only\n");
> +
> ignore_wedged_in_dmesg();
>
> hang_sync.handle = syncobj_create(fd, 0);
>
> - igt_debugfs_write(fd, "wedged_mode", "2");
> simple_hang(fd, &hang_sync);
>
> /*
> @@ -282,8 +288,12 @@ int igt_main()
>
> igt_subtest_f("wedged-mode-toggle") {
> igt_require(igt_debugfs_exists(fd, "wedged_mode", O_RDWR));
> + igt_require(!intel_is_vf_device(fd));
>
> igt_debugfs_write(fd, "wedged_mode", "2");
> + igt_skip_on_f(igt_sriov_is_pf(fd) && errno == EPERM,
> + "On PF, upon-any-hang-no-reset (2) wedged mode is restricted to debug builds only\n");
> +
> igt_assert_eq(simple_ioctl(fd), 0);
> igt_debugfs_write(fd, "wedged_mode", "1");
> ignore_wedged_in_dmesg();
> --
> 2.40.0
>