[igt-dev] [PATCH i-g-t] lib/igt_aux/hang_detector: Don't enable reset if it's explicitly disabled
Petri Latvala
petri.latvala at intel.com
Wed Jun 12 12:59:56 UTC 2019
On Wed, Jun 12, 2019 at 03:52:22PM +0300, Arkadiusz Hiler wrote:
> We don't expect to hang during the tests using hang_detector, and the
> only difference is more severe fallout in case a hang actually happens
> and fewer surprised people seeing reset mysteriously enabled a couple of
> tests down the line.
>
> Cc: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Petri Latvala <petri.latvala at intel.com>
> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler at intel.com>
> ---
> lib/igt_aux.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/lib/igt_aux.c b/lib/igt_aux.c
> index 578f8579..af21fdac 100644
> --- a/lib/igt_aux.c
> +++ b/lib/igt_aux.c
> @@ -514,8 +514,9 @@ void igt_fork_hang_detector(int fd)
> * they are a test failure!) and so the loss of per-engine reset
> * functionality is not an issue.
> */
> - igt_assert(igt_sysfs_set_parameter
> - (fd, "reset", "%d", 1 /* only global reset */));
> + if (igt_sysfs_get_u32(fd, "reset") != 0) /* if reset is not explicitly disabled */
> + igt_assert(igt_sysfs_set_parameter
> + (fd, "reset", "%d", 1 /* only global reset */));
igt_sysfs_get_*() take an fd to the _directory_, this fd is for the
device. You need to call igt_sysfs_open_parameters(fd) to get the dir.
--
Petri Latvala
More information about the igt-dev
mailing list