diff options
author | Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com> | 2024-05-08 20:57:41 +0200 |
---|---|---|
committer | Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com> | 2024-05-09 07:26:15 +0000 |
commit | 7348b4fe58a3ce76897b12ee84de3db4e85d7e8a (patch) | |
tree | 92be2f3799b6c98f21a7fe66c225e9086a1487a6 | |
parent | 0df7b9b97f9da0e364f5ee30fe331004b8c86b56 (diff) |
tests/sriov_basic: Skip tests if sriov_totalvfs is zero
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>
Reviewed-by: Lukasz Laguna <lukasz.laguna@intel.com>
-rw-r--r-- | tests/sriov_basic.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); } |