public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Petri Latvala <petri.latvala@intel.com>
To: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t] lib/igt_aux/hang_detector: Don't enable reset if it's explicitly disabled
Date: Wed, 12 Jun 2019 15:59:56 +0300	[thread overview]
Message-ID: <20190612125956.GM22949@platvala-desk.ger.corp.intel.com> (raw)
In-Reply-To: <20190612125222.8447-1-arkadiusz.hiler@intel.com>

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@chris-wilson.co.uk>
> Cc: Petri Latvala <petri.latvala@intel.com>
> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@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
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  reply	other threads:[~2019-06-12 12:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-12 12:52 [igt-dev] [PATCH i-g-t] lib/igt_aux/hang_detector: Don't enable reset if it's explicitly disabled Arkadiusz Hiler
2019-06-12 12:59 ` Petri Latvala [this message]
2019-06-12 13:01 ` Chris Wilson
2019-06-12 15:15   ` Arkadiusz Hiler
2019-06-12 13:21 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2019-06-13 13:35 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190612125956.GM22949@platvala-desk.ger.corp.intel.com \
    --to=petri.latvala@intel.com \
    --cc=arkadiusz.hiler@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox