Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Riana Tauro <riana.tauro@intel.com>
To: Jonathan-Cavitt <jonathan.cavitt@intel.com>,
	<igt-dev@lists.freedesktop.org>
Cc: <saurabhg.gupta@intel.com>, <alex.zuo@intel.com>,
	"Gupta, Anshuman" <anshuman.gupta@intel.com>
Subject: Re: [PATCH i-g-t] tests/intel/xe_pm_residency: Skip on igt_power_open failure
Date: Fri, 4 Oct 2024 11:58:43 +0530	[thread overview]
Message-ID: <45f132f9-aea6-4718-be28-f9bd8aa39b6d@intel.com> (raw)
In-Reply-To: <20240930232720.1496539-1-jonathan.cavitt@intel.com>

Hi Jonathan

Do not skip the entire test, check the condition before assert or
for the power check.

Thanks,
Riana Tauro

On 10/1/2024 4:57 AM, Jonathan-Cavitt wrote:
> The xe_pm_residency@toggle-gt-c6 test fails when
> gt_c6_power >= gt_c0_power.  These values are reported by
> igt_power_get_mW, which will always report 0 in the case that
> igt_power_open fails to open either the hwmon_fd or rapl.fd.  Since the
> expected result will always be a failure in this case, skip the test to
> end execution early.
> 
> Signed-off-by: Jonathan-Cavitt <jonathan.cavitt@intel.com>
> ---
>   tests/intel/xe_pm_residency.c | 6 +++++-
>   1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/intel/xe_pm_residency.c b/tests/intel/xe_pm_residency.c
> index 0e687558b1..36ed46cfc5 100644
> --- a/tests/intel/xe_pm_residency.c
> +++ b/tests/intel/xe_pm_residency.c
> @@ -276,7 +276,11 @@ static void toggle_gt_c6(int fd, int n)
>   	int gt;
>   	struct igt_power gpu;
>   
> -	igt_power_open(fd, &gpu, "gpu");
> +	/*
> +	 * igt_power_get_mW will always return 0 if igt_power_open fails,
> +	 * so skip the test in this case.
> +	 */
> +	igt_skip_on(igt_power_open(fd, &gpu, "gpu"));
>   
>   	do {
>   		fw_handle = igt_debugfs_open(fd, "forcewake_all", O_RDONLY);

      parent reply	other threads:[~2024-10-04  6:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-30 23:27 [PATCH i-g-t] tests/intel/xe_pm_residency: Skip on igt_power_open failure Jonathan-Cavitt
2024-10-01  0:16 ` ✓ CI.xeBAT: success for " Patchwork
2024-10-01  0:44 ` ✓ Fi.CI.BAT: " Patchwork
2024-10-01 10:23 ` ✗ CI.xeFULL: failure " Patchwork
2024-10-01 11:43 ` [PATCH i-g-t] " Kamil Konieczny
2024-10-01 12:36 ` ✗ Fi.CI.IGT: failure for " Patchwork
2024-10-03 17:04 ` ✓ Fi.CI.BAT: success for tests/intel/xe_pm_residency: Skip on igt_power_open failure (rev2) Patchwork
2024-10-03 17:12 ` ✗ CI.xeBAT: failure " Patchwork
2024-10-03 19:12 ` ✗ CI.xeFULL: " Patchwork
2024-10-04  6:28 ` Riana Tauro [this message]

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=45f132f9-aea6-4718-be28-f9bd8aa39b6d@intel.com \
    --to=riana.tauro@intel.com \
    --cc=alex.zuo@intel.com \
    --cc=anshuman.gupta@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=jonathan.cavitt@intel.com \
    --cc=saurabhg.gupta@intel.com \
    /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