From: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>
To: igt-dev@lists.freedesktop.org
Cc: "Marcin Bernatowicz" <marcin.bernatowicz@linux.intel.com>,
"Adam Miszczak" <adam.miszczak@linux.intel.com>,
"Jakub Kolakowski" <jakub1.kolakowski@intel.com>,
"Lukasz Laguna" <lukasz.laguna@intel.com>,
"Michał Wajdeczko" <michal.wajdeczko@intel.com>,
"Michał Winiarski" <michal.winiarski@intel.com>,
"Narasimha C V" <narasimha.c.v@intel.com>,
"Piotr Piórkowski" <piotr.piorkowski@intel.com>,
"Satyanarayana K V P" <satyanarayana.k.v.p@intel.com>,
"Tomasz Lis" <tomasz.lis@intel.com>
Subject: [PATCH v2 i-g-t 7/7] tests/xe_sriov_auto_provisioning: Add 'extended' command line option
Date: Tue, 14 Jan 2025 16:08:48 +0100 [thread overview]
Message-ID: <20250114150848.332708-8-marcin.bernatowicz@linux.intel.com> (raw)
In-Reply-To: <20250114150848.332708-1-marcin.bernatowicz@linux.intel.com>
By default, a dynamic subtest is executed with a random num_vfs to limit
execution time. Add an 'extended' command line option to enable
iteration over all possible num_vfs.
Signed-off-by: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>
Cc: Adam Miszczak <adam.miszczak@linux.intel.com>
Cc: Jakub Kolakowski <jakub1.kolakowski@intel.com>
Cc: Lukasz Laguna <lukasz.laguna@intel.com>
Cc: Michał Wajdeczko <michal.wajdeczko@intel.com>
Cc: Michał Winiarski <michal.winiarski@intel.com>
Cc: Narasimha C V <narasimha.c.v@intel.com>
Cc: Piotr Piórkowski <piotr.piorkowski@intel.com>
Cc: Satyanarayana K V P <satyanarayana.k.v.p@intel.com>
Cc: Tomasz Lis <tomasz.lis@intel.com>
---
tests/intel/xe_sriov_auto_provisioning.c | 40 +++++++++++++++++++++++-
1 file changed, 39 insertions(+), 1 deletion(-)
diff --git a/tests/intel/xe_sriov_auto_provisioning.c b/tests/intel/xe_sriov_auto_provisioning.c
index 1d2aa8624..e13eb3644 100644
--- a/tests/intel/xe_sriov_auto_provisioning.c
+++ b/tests/intel/xe_sriov_auto_provisioning.c
@@ -216,7 +216,30 @@ static void exclusive_ranges(int pf_fd, unsigned int num_vfs)
igt_fail_on_f(fails, "exclusive ranges check failed\n");
}
-igt_main
+static bool extended_scope;
+
+static int opts_handler(int opt, int opt_index, void *data)
+{
+ switch (opt) {
+ case 'e':
+ extended_scope = true;
+ break;
+ default:
+ return IGT_OPT_HANDLER_ERROR;
+ }
+
+ return IGT_OPT_HANDLER_SUCCESS;
+}
+
+static const struct option long_opts[] = {
+ { .name = "extended", .has_arg = false, .val = 'e', },
+ {}
+};
+
+static const char help_str[] =
+ " --extended\tRun the extended test scope\n";
+
+igt_main_args("", long_opts, help_str, opts_handler, NULL)
{
enum xe_sriov_shared_res res;
unsigned int gt;
@@ -245,6 +268,11 @@ igt_main
igt_describe("Verify that auto-provisioned resources are allocated by PF driver in fairly manner");
igt_subtest_with_dynamic("fair-allocation") {
+ if (extended_scope)
+ for_each_sriov_num_vfs(pf_fd, num_vfs)
+ igt_dynamic_f("numvfs-%d", num_vfs)
+ fair_allocation(pf_fd, num_vfs);
+
for_random_sriov_num_vfs(pf_fd, num_vfs) {
igt_dynamic_f("numvfs-random") {
igt_debug("numvfs=%u\n", num_vfs);
@@ -255,6 +283,11 @@ igt_main
igt_describe("Verify that auto-provisioned resources are released once VFs are disabled");
igt_subtest_with_dynamic("resources-released-on-vfs-disabling") {
+ if (extended_scope)
+ for_each_sriov_num_vfs(pf_fd, num_vfs)
+ igt_dynamic_f("numvfs-%d", num_vfs)
+ resources_released_on_vfs_disabling(pf_fd, num_vfs);
+
for_random_sriov_num_vfs(pf_fd, num_vfs) {
igt_dynamic_f("numvfs-random") {
igt_debug("numvfs=%u\n", num_vfs);
@@ -269,6 +302,11 @@ igt_main
igt_skip_on(total_vfs < 2);
+ if (extended_scope)
+ for_each_sriov_num_vfs(pf_fd, num_vfs)
+ igt_dynamic_f("numvfs-%d", num_vfs)
+ exclusive_ranges(pf_fd, num_vfs);
+
for_random_sriov_vf_in_range(pf_fd, 2, total_vfs, num_vfs) {
igt_dynamic_f("numvfs-random") {
igt_debug("numvfs=%u\n", num_vfs);
--
2.31.1
next prev parent reply other threads:[~2025-01-14 15:11 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-14 15:08 [PATCH v2 i-g-t 0/7] Add xe_sriov_auto_provisioning tests Marcin Bernatowicz
2025-01-14 15:08 ` [PATCH v2 i-g-t 1/7] lib/xe/xe_sriov_debugfs: Add debugfs get/set functions for u32, u64, bool Marcin Bernatowicz
2025-01-14 15:08 ` [PATCH v2 i-g-t 2/7] lib/xe/xe_sriov_debugfs: Add validation for provisioned ranges Marcin Bernatowicz
2025-01-15 15:55 ` Laguna, Lukasz
2025-01-14 15:08 ` [PATCH v2 i-g-t 3/7] lib/xe/xe_sriov_provisioning: Add accessors for quota/spare attributes Marcin Bernatowicz
2025-01-14 15:08 ` [PATCH v2 i-g-t 4/7] lib/xe/xe_sriov_provisioning: Add shared resource provisionability check Marcin Bernatowicz
2025-01-14 15:08 ` [PATCH v2 i-g-t 5/7] lib/igt_sriov_device: Add helper functions for VF range validation Marcin Bernatowicz
2025-01-14 15:08 ` [PATCH v2 i-g-t 6/7] tests/xe_sriov_auto_provisioning: Add tests for SR-IOV auto-provisioning Marcin Bernatowicz
2025-01-15 15:57 ` Laguna, Lukasz
2025-01-14 15:08 ` Marcin Bernatowicz [this message]
2025-01-15 16:06 ` [PATCH v2 i-g-t 7/7] tests/xe_sriov_auto_provisioning: Add 'extended' command line option Laguna, Lukasz
2025-01-14 18:17 ` ✓ i915.CI.BAT: success for Add xe_sriov_auto_provisioning tests (rev2) Patchwork
2025-01-14 18:24 ` ✓ Xe.CI.BAT: " Patchwork
2025-01-14 20:53 ` ✗ Xe.CI.Full: failure " Patchwork
2025-01-15 13:04 ` ✗ i915.CI.Full: " 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=20250114150848.332708-8-marcin.bernatowicz@linux.intel.com \
--to=marcin.bernatowicz@linux.intel.com \
--cc=adam.miszczak@linux.intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=jakub1.kolakowski@intel.com \
--cc=lukasz.laguna@intel.com \
--cc=michal.wajdeczko@intel.com \
--cc=michal.winiarski@intel.com \
--cc=narasimha.c.v@intel.com \
--cc=piotr.piorkowski@intel.com \
--cc=satyanarayana.k.v.p@intel.com \
--cc=tomasz.lis@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