From: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>,
Jakub Kolakowski <jakub1.kolakowski@intel.com>,
Riana Tauro <riana.tauro@intel.com>,
Satyanarayana K V P <satyanarayana.k.v.p@intel.com>
Subject: [PATCH i-g-t 1/2] tests/intel/xe_pmu: Unprovision VFs on cleanup
Date: Tue, 6 May 2025 12:15:53 +0200 [thread overview]
Message-ID: <20250506101554.629218-2-marcin.bernatowicz@linux.intel.com> (raw)
In-Reply-To: <20250506101554.629218-1-marcin.bernatowicz@linux.intel.com>
Unprovision VFs to ensure a clean state for subsequent tests.
Rename disable_vfs() to unprovision_and_disable_vfs() to reflect the
additional cleanup steps.
Cc: Jakub Kolakowski <jakub1.kolakowski@intel.com>
Cc: Riana Tauro <riana.tauro@intel.com>
Cc: Satyanarayana K V P <satyanarayana.k.v.p@intel.com>
Signed-off-by: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>
---
tests/intel/xe_pmu.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/tests/intel/xe_pmu.c b/tests/intel/xe_pmu.c
index 094dc0c6c..8cbbf6916 100644
--- a/tests/intel/xe_pmu.c
+++ b/tests/intel/xe_pmu.c
@@ -497,12 +497,15 @@ static unsigned int enable_and_provision_vfs(int fd)
return num_vfs;
}
-static void disable_vfs(int fd)
+static void unprovision_and_disable_vfs(int fd)
{
- unsigned int gt;
+ unsigned int gt, num_vfs = igt_sriov_get_enabled_vfs(fd);
- xe_for_each_gt(fd, gt)
+ xe_for_each_gt(fd, gt) {
xe_sriov_set_sched_if_idle(fd, gt, 0);
+ for (int fn = 0; fn <= num_vfs; fn++)
+ xe_sriov_set_exec_quantum_ms(fd, fn, gt, 0);
+ }
igt_sriov_disable_vfs(fd);
/* abort to avoid execution of next tests with enabled VFs */
@@ -596,7 +599,7 @@ igt_main
}
igt_fixture
- disable_vfs(fd);
+ unprovision_and_disable_vfs(fd);
}
igt_subtest_group {
--
2.31.1
next prev parent reply other threads:[~2025-05-06 10:16 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-06 10:15 [PATCH i-g-t 0/2] tests/intel/xe_pmu: Improve VF setup and cleanup Marcin Bernatowicz
2025-05-06 10:15 ` Marcin Bernatowicz [this message]
2025-05-06 12:51 ` [PATCH i-g-t 1/2] tests/intel/xe_pmu: Unprovision VFs on cleanup K V P, Satyanarayana
2025-05-06 13:05 ` Bernatowicz, Marcin
2025-05-06 13:37 ` K V P, Satyanarayana
2025-05-06 10:15 ` [PATCH i-g-t 2/2] tests/intel/xe_pmu: Check default scheduling attributes before test Marcin Bernatowicz
2025-05-06 12:53 ` K V P, Satyanarayana
2025-05-06 11:27 ` ✗ i915.CI.BAT: failure for tests/intel/xe_pmu: Improve VF setup and cleanup Patchwork
2025-05-06 11:32 ` ✓ Xe.CI.BAT: success " Patchwork
2025-05-06 13:00 ` ✗ Xe.CI.Full: failure " Patchwork
2025-05-12 8:07 ` Bernatowicz, Marcin
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=20250506101554.629218-2-marcin.bernatowicz@linux.intel.com \
--to=marcin.bernatowicz@linux.intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=jakub1.kolakowski@intel.com \
--cc=riana.tauro@intel.com \
--cc=satyanarayana.k.v.p@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