From: Lukasz Laguna <lukasz.laguna@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: marcin.bernatowicz@linux.intel.com, michal.wajdeczko@intel.com,
adam.miszczak@linux.intel.com, jakub1.kolakowski@intel.com,
lukasz.laguna@intel.com
Subject: [PATCH i-g-t] tests/sriov_basic: verify VF disabling when its fd remains open
Date: Wed, 26 Feb 2025 15:42:54 +0100 [thread overview]
Message-ID: <20250226144254.28129-1-lukasz.laguna@intel.com> (raw)
Introduce a subtest that verifies the VF disabling when its file
descriptor remains open. The expected behaviour is forceful VF driver
unbind and VF disabling.
Signed-off-by: Lukasz Laguna <lukasz.laguna@intel.com>
---
tests/sriov_basic.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/tests/sriov_basic.c b/tests/sriov_basic.c
index 36bca4149..986566dc2 100644
--- a/tests/sriov_basic.c
+++ b/tests/sriov_basic.c
@@ -118,6 +118,21 @@ static void bind_unbind_vf(int pf_fd, unsigned int vf_num)
igt_sriov_disable_vfs(pf_fd);
}
+/**
+ * SUBTEST: disable-vf-with-open-fd
+ * Description:
+ * Verify the VF disabling when its file descriptor remains open
+ */
+static void disable_vf_with_open_fd(int pf_fd)
+{
+ igt_require(igt_sriov_get_enabled_vfs(pf_fd) == 0);
+
+ igt_sriov_enable_driver_autoprobe(pf_fd);
+ igt_sriov_enable_vfs(pf_fd, 1);
+ igt_assert_fd(igt_sriov_open_vf_drm_device(pf_fd, 1));
+ igt_sriov_disable_vfs(pf_fd);
+}
+
igt_main
{
int pf_fd;
@@ -209,6 +224,10 @@ igt_main
}
}
+ igt_describe("Verify the VF disabling when its file descriptor remains open");
+ igt_subtest("disable-vf-with-open-fd")
+ disable_vf_with_open_fd(pf_fd);
+
igt_fixture {
igt_sriov_disable_vfs(pf_fd);
/* abort to avoid execution of next tests with enabled VFs */
--
2.40.0
next reply other threads:[~2025-02-26 14:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-26 14:42 Lukasz Laguna [this message]
2025-02-27 18:32 ` ✓ Xe.CI.BAT: success for tests/sriov_basic: verify VF disabling when its fd remains open Patchwork
2025-02-27 18:46 ` ✓ i915.CI.BAT: " Patchwork
2025-02-27 22:26 ` ✗ Xe.CI.Full: failure " Patchwork
2025-02-28 4:08 ` ✗ 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=20250226144254.28129-1-lukasz.laguna@intel.com \
--to=lukasz.laguna@intel.com \
--cc=adam.miszczak@linux.intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=jakub1.kolakowski@intel.com \
--cc=marcin.bernatowicz@linux.intel.com \
--cc=michal.wajdeczko@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