Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t] tests/sriov_basic: Skip tests if sriov_totalvfs is zero
@ 2024-05-08 19:32 Marcin Bernatowicz
  2024-05-08 21:04 ` ✓ Fi.CI.BAT: success for " Patchwork
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Marcin Bernatowicz @ 2024-05-08 19:32 UTC (permalink / raw)
  To: igt-dev; +Cc: kamil.konieczny, lukasz.laguna, michal.wajdeczko

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


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-05-09 11:56 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH i-g-t] " Michal Wajdeczko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox