From: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>
To: igt-dev@lists.freedesktop.org
Cc: kamil.konieczny@linux.intel.com, lukasz.laguna@intel.com,
michal.wajdeczko@intel.com
Subject: [PATCH i-g-t] tests/sriov_basic: Skip tests if sriov_totalvfs is zero
Date: Wed, 8 May 2024 19:32:58 +0000 [thread overview]
Message-ID: <20240508193258.4069853-1-marcin.bernatowicz@linux.intel.com> (raw)
There is no point to run the tests if no VFs can be enabled.
Additionally, the `for_random_sriov_num_vfs` macro will lead
to undefined behavior if `sriov_totalvfs` is zero.
Signed-off-by: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>
---
tests/sriov_basic.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/sriov_basic.c b/tests/sriov_basic.c
index f58b3b7ba..1bc082d76 100644
--- a/tests/sriov_basic.c
+++ b/tests/sriov_basic.c
@@ -120,7 +120,7 @@ igt_main
igt_fixture {
pf_fd = drm_open_driver(DRIVER_ANY);
- igt_require(igt_sriov_is_pf(pf_fd));
+ igt_require(igt_sriov_vfs_supported(pf_fd));
igt_require(igt_sriov_get_enabled_vfs(pf_fd) == 0);
autoprobe = igt_sriov_is_driver_autoprobe_enabled(pf_fd);
}
--
2.31.1
next reply other threads:[~2024-05-08 19:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-08 19:32 Marcin Bernatowicz [this message]
2024-05-08 21:04 ` ✓ Fi.CI.BAT: success for tests/sriov_basic: Skip tests if sriov_totalvfs is zero Patchwork
2024-05-08 21:32 ` ✓ CI.xeBAT: " Patchwork
2024-05-09 6:41 ` [PATCH i-g-t] " Laguna, Lukasz
2024-05-09 9:03 ` ✗ CI.xeFULL: failure for " Patchwork
2024-05-09 9:34 ` [PATCH i-g-t] " Kamil Konieczny
2024-05-09 10:12 ` ✗ Fi.CI.IGT: failure for " Patchwork
2024-05-09 11:56 ` [PATCH i-g-t] " Michal Wajdeczko
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=20240508193258.4069853-1-marcin.bernatowicz@linux.intel.com \
--to=marcin.bernatowicz@linux.intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=kamil.konieczny@linux.intel.com \
--cc=lukasz.laguna@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