Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Souza, Jose" <jose.souza@intel.com>
To: "Mun, Gwan-gyeong" <gwan-gyeong.mun@intel.com>,
	"igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>
Subject: Re: [igt-dev] [PATCH i-g-t] tests/kms_psr2_su: Print errno while it fails to read debugfs
Date: Thu, 11 Jun 2020 15:31:18 +0000	[thread overview]
Message-ID: <3c8428cf42753f6b15ed8f0d6de3632c71b5956c.camel@intel.com> (raw)
In-Reply-To: <20200611135238.176102-1-gwan-gyeong.mun@intel.com>

On Thu, 2020-06-11 at 16:52 +0300, Gwan-gyeong Mun wrote:
> This tests is being sporadically skipped in CI as it is not due
> "PSR sink not reliable: yes". This commit adds printing of debugfs
> ("tests/kms_psr2_su: Print debugfs when skipping test"), but it is not
> enough to track error cases.
> It adds printing of errorno while it fails to read debugfs.
> 

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>

> Cc: José Roberto de Souza <jose.souza@intel.com>
> Signed-off-by: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
> ---
>  lib/igt_psr.c | 15 ++++++++++++---
>  1 file changed, 12 insertions(+), 3 deletions(-)
> 
> diff --git a/lib/igt_psr.c b/lib/igt_psr.c
> index 8c2f4ce6..899784dc 100644
> --- a/lib/igt_psr.c
> +++ b/lib/igt_psr.c
> @@ -40,9 +40,15 @@ static bool psr_active_check(int debugfs_fd, enum psr_mode mode)
>  {
>  	char buf[PSR_STATUS_MAX_LEN];
>  	const char *state = mode == PSR_MODE_1 ? "SRDENT" : "DEEP_SLEEP";
> +	int ret;
>  
> -	igt_debugfs_simple_read(debugfs_fd, "i915_edp_psr_status", buf,
> -				sizeof(buf));
> +	ret = igt_debugfs_simple_read(debugfs_fd, "i915_edp_psr_status",
> +				     buf, sizeof(buf));
> +	if (ret < 0) {
> +		igt_debug("Could not read i915_edp_psr_status: %s\n",
> +			  strerror(-ret));
> +		return false;
> +	}
>  
>  	igt_skip_on(strstr(buf, "PSR sink not reliable: yes"));
>  
> @@ -237,8 +243,11 @@ void psr_print_debugfs(int debugfs_fd)
>  
>  	ret = igt_debugfs_simple_read(debugfs_fd, "i915_edp_psr_status", buf,
>  				      sizeof(buf));
> -	if (ret < 0)
> +	if (ret < 0) {
> +		igt_debug("Could not read i915_edp_psr_status: %s\n",
> +			  strerror(-ret));
>  		return;
> +	}
>  
>  	igt_debug("%s", buf);
>  }
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  parent reply	other threads:[~2020-06-11 15:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-11 13:52 [igt-dev] [PATCH i-g-t] tests/kms_psr2_su: Print errno while it fails to read debugfs Gwan-gyeong Mun
2020-06-11 14:22 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2020-06-11 15:31 ` Souza, Jose [this message]
2020-06-12  7:49   ` [igt-dev] [PATCH i-g-t] " Petri Latvala
2020-06-11 18:46 ` [igt-dev] ✓ Fi.CI.IGT: success for " 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=3c8428cf42753f6b15ed8f0d6de3632c71b5956c.camel@intel.com \
    --to=jose.souza@intel.com \
    --cc=gwan-gyeong.mun@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