From: Michal Wajdeczko <michal.wajdeczko@intel.com>
To: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>,
igt-dev@lists.freedesktop.org
Cc: kamil.konieczny@linux.intel.com, lukasz.laguna@intel.com
Subject: Re: [PATCH i-g-t] tests/sriov_basic: Skip tests if sriov_totalvfs is zero
Date: Thu, 9 May 2024 13:56:52 +0200 [thread overview]
Message-ID: <9e997027-8539-4303-8b2b-6451bb801c94@intel.com> (raw)
In-Reply-To: <20240508193258.4069853-1-marcin.bernatowicz@linux.intel.com>
On 08.05.2024 21:32, Marcin Bernatowicz wrote:
> 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));
shouldn't the check for supported_vfs > 0 be a part of is_pf ?
IMO if a driver can't support any VF it's hard to name it a PF
> igt_require(igt_sriov_get_enabled_vfs(pf_fd) == 0);
> autoprobe = igt_sriov_is_driver_autoprobe_enabled(pf_fd);
> }
prev parent reply other threads:[~2024-05-09 11:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-08 19:32 [PATCH i-g-t] tests/sriov_basic: Skip tests if sriov_totalvfs is zero Marcin Bernatowicz
2024-05-08 21:04 ` ✓ Fi.CI.BAT: success for " 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 ` Michal Wajdeczko [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=9e997027-8539-4303-8b2b-6451bb801c94@intel.com \
--to=michal.wajdeczko@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=kamil.konieczny@linux.intel.com \
--cc=lukasz.laguna@intel.com \
--cc=marcin.bernatowicz@linux.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